Portal Home > Knowledgebase > Articles Database > SATA Drives


SATA Drives




Posted by GriffinRUN, 02-01-2008, 10:51 PM
Maybe someone here can help me with this problem, I installed 2 SATA raptors drives on my server. I formatted/partitioned one of the drives through WHM. After rebooting both drives disappeared. They are still detected within the BIOS but not in CentOS. It is possible that I installed a wrong driver or made a bad configuration change. Server Info: CentOS 4.6 64bit cPanel/WHM Motherboard: http://www.supermicro.com/products/m.../X6DVL-EG2.cfm OS is running on a 250GB IDE drive 2 SATA WD Raptors (That I am trying to get to work) Any help would be greatly appreciated. Thanks

Posted by david510, 02-02-2008, 12:10 AM
Did you try OS re-install?

Posted by GriffinRUN, 02-02-2008, 12:11 AM
Nope, using that as a last resort.

Posted by sitekeeper, 02-02-2008, 12:47 AM
Are the drives mounted? Bob

Posted by GriffinRUN, 02-02-2008, 12:49 AM
Drives arn't detected: "/sbin/fdisk -l " Disk /dev/hda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 1318 10482412+ 83 Linux /dev/hda3 1319 2232 7341705 83 Linux /dev/hda4 2233 30401 226267492+ 5 Extended /dev/hda5 2233 2493 2096451 82 Linux swap /dev/hda6 2494 2754 2096451 83 Linux /dev/hda7 2755 2885 1052226 83 Linux /dev/hda8 2886 30401 221022238+ 83 Linux

Posted by sitekeeper, 02-02-2008, 12:58 AM
What does /etc/fstab look like? Bob

Posted by GriffinRUN, 02-02-2008, 12:59 AM
Suprisingly after upgrading the kernal and rebooting the drives are now detected. Now what would be the best way to create a software RAID? Or would you recommend just using the drives seperatly?

Posted by sitekeeper, 02-02-2008, 01:14 AM
You would do this usally at the insatAll on linux.. You can take a look at http://www.linuxmanpages.com/man8/mdadm.8.php Bob

Posted by Steven, 02-02-2008, 01:21 AM
Pointless if they dont show up in fdisk. From what the user showed us he is not using software raid, in this case mdadm would not do anything.

Posted by sitekeeper, 02-02-2008, 01:39 AM
Not if it is trashed... Just pointing to a link on it nothing more... Are we in a bad mood or what!

Posted by FHDave, 02-02-2008, 01:48 AM
run away from software RAID ...

Posted by relichost, 02-02-2008, 07:31 AM
Hi I agree, dont use software RAID, its all okay until a drive fails (the whole point of RAID i know) but software raid in my experiance doesnt cope too well with a drive failure, as it tends to reboot the server or worse, make it hang. Often after a reboot GRUB then doesnt know how to boot, a further delay. On that board you should be able to get a 3ware Raid Card 8006 which supports 2 SATA drives. HTH

Posted by bitserve, 02-03-2008, 03:32 AM
What do you mean by "disappeared"? Did you just forget to mount them?

Posted by Lightwave, 02-03-2008, 04:16 AM
Grub not booting after a drive failure is more likely caused by people not remembering to install/setup grub on both drives. grub > root (hd0,0) > setup (hd0) > root (hd1,0) > setup (hd1) viola. Boots from either drive. Assuming the raid didn't correctly mirror bad data. I'd have to overall disagree with people advising against software raid given the options. Sure, if you can afford a simple hardware 2 port sata raid card then definitely use it over a software raid solution. But, if your choice is 2 individually mounted drives or a software raid1 mirror. Go with the software raid 1 mirror. I wouldn't advise a software raid5 setup ever... but that's rather different.

Posted by bitserve, 02-03-2008, 04:36 AM
I've found that software RAID 1 setups haven't been any worse as far as speed, but I have had Linux be pretty finicky about rebuilding the array. It's been so long since I've tried it though, that it was the 2.4 kernel and I can't even remember the exact problems we had, so mostly I would agree with daved. I wouldn't say to never use software RAID.

Posted by GriffinRUN, 02-03-2008, 01:15 PM
Okay, I now have the drives setup as /home2 and /home3. I want to move all customer data from /home to /home 2 and 3. And then rename /home to /backup for backups. Then I want to rename /home2 to /home and /home3 to /home2. What would be the best way to do this?

Posted by bitserve, 02-03-2008, 02:11 PM
With the mv command? mv /home/[a-l]* /home2 mv /home/[m-z]* /home3 mv /home /backup mv /home2 /home mv /home3 /home2 Are you going to say what you did to resolve your disappearance problem?

Posted by GriffinRUN, 02-03-2008, 02:14 PM
I upgraded the kernal, appearently there was a bug in the kernal I was using. But will cPanel's settings get messed up but just using the mv command?

Posted by bitserve, 02-03-2008, 02:16 PM
I'm not a cpanel expert, but if you have some customers on /home and move them to /home2, you'll probably have to "tell cpanel" about the changes somehow. Cpanel (WHM anyway) might even offter a web based feature for moving accounts. I have no idea. Maybe someone else will know.

Posted by GriffinRUN, 02-03-2008, 02:18 PM
They do have a feature called "Rearrange Accounts" that will move accounts to another drive. But also, wouldnt /etc/fstab need changes made to it? Using the mv command just seems to easy.

Posted by bitserve, 02-03-2008, 02:38 PM
Yes. I wasn't thinking.

Posted by GriffinRUN, 02-03-2008, 02:45 PM
I still need to figure out how to make the appropriate changes to cPanel.

Posted by bitserve, 02-03-2008, 02:52 PM
Is there room on one of the new drives for all of your accounts? If so, you'll probably want to mount one of the new drives at /home, your old drive at /backup, and move all of the home directories to /home from /backup. This would probably be transparent to cpanel Then mount the second new drive at /home2 and use the rearrange accounts tool to move half of the accounts over.

Posted by GriffinRUN, 02-03-2008, 02:55 PM
That would probably work. How can I remount /home to /backup and then remount one of the new drives as /home?

Posted by bitserve, 02-03-2008, 03:13 PM
Can you post the output of: fdisk -l mount | grep dev Last edited by bitserve; 02-03-2008 at 03:17 PM.

Posted by GriffinRUN, 02-03-2008, 03:16 PM
fdisk -l : Disk /dev/hda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 1318 10482412+ 83 Linux /dev/hda3 1319 2232 7341705 83 Linux /dev/hda4 2233 30401 226267492+ 5 Extended /dev/hda5 2233 2493 2096451 82 Linux swap /dev/hda6 2494 2754 2096451 83 Linux /dev/hda7 2755 2885 1052226 83 Linux /dev/hda8 2886 30401 221022238+ 83 Linux Disk /dev/sda: 150.0 GB, 150039945216 bytes 255 heads, 63 sectors/track, 18241 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 18241 146520801 83 Linux Disk /dev/sdb: 150.0 GB, 150039945216 bytes 255 heads, 63 sectors/track, 18241 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 18241 146520801 83 Linux mount: /dev/hda7 on / type ext3 (rw,usrquota) none on /proc type proc (rw) none on /sys type sysfs (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw) /dev/hda1 on /boot type ext3 (rw) none on /dev/shm type tmpfs (rw) /dev/hda8 on /home type ext3 (rw,usrquota) /dev/hda6 on /tmp type ext3 (rw,noexec,nosuid) /dev/hda2 on /usr type ext3 (rw,usrquota) /dev/hda3 on /var type ext3 (rw,usrquota) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) /tmp on /var/tmp type none (rw,noexec,nosuid,bind) /dev/sda1 on /home2 type ext3 (rw,usrquota) /dev/sdb1 on /home3 type ext3 (rw,usrquota)

Posted by Tim Greer, 02-03-2008, 03:22 PM
First of all, I don't have time to get into all of the questions, but if you can help it, don't just move them. Do a cp -a or use rsync or a number of other commands and if you verify everything has moved over, then feel free to delete the data from the old drive/partition. If something bad happens in the middle of a move command, you might lose data.

Posted by GriffinRUN, 02-03-2008, 03:45 PM
Actually I typed mount instead of mount | grep dev Here is the output of mount | grep dev: /dev/hda7 on / type ext3 (rw,usrquota) none on /dev/pts type devpts (rw,gid=5,mode=620) /dev/hda1 on /boot type ext3 (rw) none on /dev/shm type tmpfs (rw) /dev/hda8 on /home type ext3 (rw,usrquota) /dev/hda6 on /tmp type ext3 (rw,noexec,nosuid) /dev/hda2 on /usr type ext3 (rw,usrquota) /dev/hda3 on /var type ext3 (rw,usrquota) /dev/sda1 on /home2 type ext3 (rw,usrquota) /dev/sdb1 on /home3 type ext3 (rw,usrquota)

Posted by bitserve, 02-03-2008, 03:50 PM
Good pont Tim. Although the mv command doesn't delete the old file until the new file is written to disk successfully, might as well take extra precautions. Additionally, although William did say he wanted to move the data, I suspect when he says he's leaving the old drive as /backup that he meant it to be a backup of the original data. So we're just going to copy. You probably want to shut down all services writing to the drives. The easiest way, if you have console/kvm acess would be to go into single user mode. Then, I'd make sure that permissions, attributes, and ownership are the same on /home2 and /home3 as they are on /home. Then the following commands: cp -a /home /home2 umount /home2 umount /home mount /dev/sda1 /home mkdir -p /backup mount /dev/hda8 /backup umount /home3 mount /dev/sdb1 /home2 Update your fstab, verify data, and restart services. Although this looks like it should work to me, it's your data.

Posted by GriffinRUN, 02-03-2008, 03:52 PM
So I need to be in front of the machine or have KVM access to do this?

Posted by bitserve, 02-03-2008, 04:08 PM
It would be easiest. You may be able to just shut down all of the SysV services except for network and ssh, at least any writing to /home. Otherwise, I'm afraid that you'll get drive/resource busy errors during the remounts, and at the minimum get an inconsistent copy.

Posted by GriffinRUN, 02-04-2008, 07:41 AM
Well everytime I format and partition the drives through cPanel and reboot the system, it won't boot because it says something about there are bad superblocks or they cannot be read.

Posted by Tim Greer, 02-04-2008, 01:34 PM
I've never known anyone to partition or format a drive through Cpanel's WHM, and I don't think I'd ever suggest such a thing. Just use the command line. You can add a switch to check the device for bad blocks as you format the drive when using mkswap or mkfs (i.e., mkfs.ext3), by using the -c flag. You can specify it twice for a slower r/w test.

Posted by bitserve, 02-04-2008, 04:52 PM
How'd we go from moving data to formatting and rebooting?

Posted by Tim Greer, 02-04-2008, 05:04 PM
Good question.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
host name? (Views: 502)
js scripts (Views: 1515)
Reseller hosting (Views: 489)