Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: DragonDon on April 29, 2011, 07:18:19 AM

Title: Did I break something?
Post by: DragonDon on April 29, 2011, 07:18:19 AM
Greetings all,

I need to verify if I broke something in my setup and now can't do what I think should work just fine.

The system:  P4 2.66GHz, 1GB RAM, 1X 80GB HD(IDE), 1X 1TB HD(SATA)

The Network:  1X 4 port router, 1X 8port hub (SME & two laptops on hub, it seems that win7starter does NOT like file sharing/drive mapping over wireless).

When I installed SME there was no issues.   It installed just fine on the 80GB as I told it.

I created some users but as soon as I mapped their drives I realize that it was mapping to a folder on the 80GB drive.  So formatted the drive, eventually learned that the best way to use the 1TB drive for users home folders was to use a 'mount --bind' command.  Still, the users were seeing the 80GB folders only!  I deleted the users, recreated them and now I cannot map their user folders at all.

/dev/main/root          /                       ext3    usrquota,grpquota      $
/dev/md1                /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/main/swap          swap                    swap    defaults        0 0
/dev/sda2               /mnt/1tb                ext3    usrquota,grpquota 1 2

I created a new IBay and new group, added the users to that and THAT folder they can see/map to just fine!?

So, where to go from here?

Biggest question, why can't users map to their own folders when I try to map \\servername\userfolder using a username created on the SME server and a password created on the SME server for the user?
Title: Re: Did I break something?
Post by: MSmith on April 29, 2011, 11:56:49 PM
Just discard that 80GB hard drive and install on the 1TB drive, it'll save you a lot of aggravation.
Title: Re: Did I break something?
Post by: janet on April 30, 2011, 05:00:30 AM
DragonDon

I agree that you should just use the one 1Tb disk for simplicity.

If you must use a second drive see
http://wiki.contribs.org/AddExtraHardDisk
Title: Re: Did I break something?
Post by: DragonDon on April 30, 2011, 06:37:25 AM
Thanks allf or the replies.

Trust me Mary, already been to that link, was all over that when adding the second drive.

And, what may be simple for one person is not for another.  :)
Title: Re: Did I break something?
Post by: MSmith on May 01, 2011, 03:45:55 PM
Computer work doesn't get much simpler than:
1) Back up any data on the 80GB drive
2) Remove the 80 GB drive & install the 1TB drive
3) Install a fresh instance of SME on the 1TB drive
4) Restore your data
Title: Re: Did I break something?
Post by: DragonDon on May 02, 2011, 01:10:20 AM
Actually that sounds great but there is a rather large issue.  There is 200GB on the 1TB.

Now, that being the case, I have just bought  a 2nd 1TB to properly setup a RAID 1 configuration.

So, unless I purchase a 3rd drive to backup that to, doesn't look like I'll be removing the 80GB anytime soon.

Besides, there are some performance gains for having the 1TB on a separate 'communication channel' from the OS Drive.
Title: Re: Did I break something?
Post by: MSmith on May 02, 2011, 04:14:09 AM
Not enough of a performance gain to offset the greater performance of a 1TB drive over an 80GB, from storage density if nothing else.  So ... make a new SME installation on the new 1TB drive, copy over your data from the "old" 1TB drive, then wipe it & make it the second drive in your RAID-1 array.  Dump the 80GB drive.
Title: Re: Did I break something?
Post by: DragonDon on May 04, 2011, 06:14:47 AM
Hi,

Ok, so I attempted to follow your instructions.  In fact, the majority of them were fine but the generalization of 'copy over your data from the "old" 1TB drive' does not work.

This is obviously because of the previous way the HD was mounted versus the way I have mounted it now.

Knowing that the 'old 1TB' drive was in a RAID 1 (single-drive) format, what parameters should I be mounting this drive (/dev/sdb)?
Title: Re: Did I break something?
Post by: DragonDon on May 04, 2011, 07:09:29 AM
Ok, after some more Googling I belive that I will have to use the mdadm command.  My thoughts are thus:

1/ use mdadm to 'assemble' the array on /dev/sdb
  - 'build' should be unnecessary as the 'array' is already on the drive, just not talking with SME

2/ then I can copy the data from it/wipe it/build new array from the server console.

So, is my logic wrong?

If it's right, what is the correct mdadm command where I don't screw up and loose all the 300GB of data that's sitting on that drive?
Title: Re: Did I break something?
Post by: MSmith on May 04, 2011, 02:40:24 PM
The way *I* would do it would be:

(optional:  back up to USB or to workstation, if you have space)
carefully remove or disconnect the drive containing the valuable data
build fresh SME on the new 1TB drive & create iBay(s)
connect the data drive and boot from a Knoppix or other Linux "Live CD"
copy valuable data files from old drive to the fresh SME's iBay(s) while booted into the Live CD
shut down, *disconnect* the old drive that you're sure has the good data
boot from the new SME and *verify* that the data was copied correctly
fix permissions if necessary
double-check that users can access the copied data
after a day or so, shut down again
disconnect the new SME drive with verified-good copied data
connect the "old" 1TB drive
use the Linux LiveCD to wipe the drive clean of all partitions
shut down, connect both drives, boot from good SME
use admin interface to add newly-wiped drive to RAID1 array
done.

Alternative, if you have external drive with enough space:
backup to USB
disconnect current setup
connect new 1TB drive, build fresh SME
restore to new drive, verify all OK, run for a day or so on new system to be sure all's well
disconnect new, use maker's drive tools CD or Linux Live CD to wipe "old" 1TB drive
connect both, use admin interface to add wiped drive to RAID array.

No need for scary mdadm commands
Title: Re: Did I break something?
Post by: DragonDon on May 04, 2011, 04:03:45 PM

No need for scary mdadm commands

From my current understanding, your solution doesn't change a thing.  The 'old 1TB' is still in a 'raid' format.  The problem comes down to essentially how to mount it regardless of which flavour of Linux I am running.
Title: Re: Did I break something?
Post by: MSmith on May 04, 2011, 04:17:56 PM
Your current understanding is incomplete.  SME sets up a single drive as a one-drive RAID array (sounds like a contradiction, but it isn't) so it's easy to add disks through the "admin" interface (what you see if you login as admin either directly at console or via SSH).  The key is to *wipe* your "old" 1TB drive so it's seen as available.

If you've been looking at the "AddExtraHardDrive" page (http://wiki.contribs.org/AddExtraHardDisk) please re-read the "Notes about RAID", especially this:

"* If you want the new drive to be part of the SME RAID array instead, get shell access, login as admin and select "5. Manage disk redundancy" and follow the instructions. The new disk should be empty and contain no partitions before doing this."

Also have a look here:
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter6

The procedure I outlined, if followed carefully, will yield a functional two-disk RAID1 array on your two 1TB disks with your data intact and the 80-GB drive discarded.

Naturally you'll want to review the steps and double-check with others to make sure I'm not leading you into error.  I proofread and edited the steps carefully but I'm no more immune to mistakes than anybody else.

I do see that I skipped over how to mount the existing hard drives when you're booted into the LiveCD, but that's highly dependent on which LiveCD you choose and is not in the scope of this procedure.  I suggest you practice with the LiveCD of your choice and get comfortable with its drive mount options before you implement on your production drives.
Title: Re: Did I break something?
Post by: DragonDon on May 08, 2011, 03:47:22 PM
HI Mary,

thanks for all your help but after looking at trying to learn how to mount something like this, it was becomming a longer and longer process.  I did it the easier way.  Went back to the original setup (i.e. the 80 & 1tb) and copied them of the drive, went back to the new setup and let everything go normally.  The 'old' 1TB was added, formatted and raided in just fine.  Then I copied back the data.

This whole process took about about 3 days due to the ftp connection being encrypted and copying 210GB of data at 1.8-2.0MB/s.  Next up, understanding FTP connections to SME :)