PDA

View Full Version : Installed an additional HDD, caused problems


SideshowMel
29th March 2008, 01:12 AM
I installed a third HDD, and it caused a few problems:

first, my drive assignments all changed. I had previously had 2 SATA drives that were
/dev/sda (boot drive. WinXP/Fedora 8 on separate partitions)
/dev/sdb (data)

and I installed an IDE drive as master (master to the DVD burner on the same ribbon). Then all my drive assignments changed:
/dev/sda -> /dev/sdb
/dev/sdb -> /dev/sdc
new drive -> /dev/sda (don't ask me why... I thought it would be /dev/hda since it's IDE!!!)

So this totally f'ed up my /etc/fstab settings, but fortunately since the awesome developers at Fedora made the first fstab entry
LABEL=/ / ext3 defaults 1 1
instead of hard-coding it to a specific device, I was still able to boot normally. Whew!

But that still prevented all my other partitions on my two existing drives from mounting properly. So, I went through and edited the fstab entries based on my above analysis that all the drive assignments had changed. Now, I'm able to mount all drives where I want them properly and normally, but I receive an error message right after the kernel boots:

"Unable to access resume device (/dev/sda6)"

So I have some questions:
1) How can I fix that message? (While you're at it: what caused that error?)
2) Is it possible to manually override any automated procedure that assigns device assignments to each drive so that I can add additional drives without having to go through all this again?

Thanks.
oh.... Fedora 8 running on Intel D915GAV with 2 Seagate SATA HDD and one WD IDE HDD

b_martinez
29th March 2008, 01:22 AM
I installed a third HDD, and it caused a few problems:

first, my drive assignments all changed. I had previously had 2 SATA drives that were
/dev/sda (boot drive. WinXP/Fedora 8 on separate partitions)
/dev/sdb (data)

and I installed an IDE drive as master (master to the DVD burner on the same ribbon). Then all my drive assignments changed:
/dev/sda -> /dev/sdb
/dev/sdb -> /dev/sdc
new drive -> /dev/sda (don't ask me why... I thought it would be /dev/hda since it's IDE!!!)

So this totally f'ed up my /etc/fstab settings, but fortunately since the awesome developers at Fedora made the first fstab entry
LABEL=/ / ext3 defaults 1 1
instead of hard-coding it to a specific device, I was still able to boot normally. Whew!

But that still prevented all my other partitions on my two existing drives from mounting properly. So, I went through and edited the fstab entries based on my above analysis that all the drive assignments had changed. Now, I'm able to mount all drives where I want them properly and normally, but I receive an error message right after the kernel boots:

"Unable to access resume device (/dev/sda6)"

Yep, I've done that.
The change from hda to sda is from the way disks are handled now. [libata?]
[In your original fstab file, was /dev/sda6 the swap partition?]
Did you make sure to change it to /dev/sdb , since the old 'sda' is now 'sdb'?
This is my fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0

Notice that only the swap partition is shown as a device?
If you have it, use GParted or QTParted to show the hard drive partitions, and edit the /etc/fstab file to show the appropriate devices.
hth
Bill

marko
29th March 2008, 01:31 AM

make sure your /etc/fstab refers to the partitions via their labels as
set by either dosfslabel (for FAT partitions) or e2label (after formatting)
or mkfs.ext3 (as you format). Basically removable drives, usb keys and
so forth were a mounting nightmare. Now there's a unique label in
the filesystem (hopefully unique) to figure out the name of the mount
point. The actual mount directories don't persist in /media but appear
and disappear as managed by udev as drives come and go.
The reason the devices are always sd? instead of hd? is that
the ide and scsi codebases had lots of repeated code so it was
merged.

Mark

SideshowMel
30th March 2008, 02:56 AM
This is my fstab file... I did change my swap from sda6 to sdb6. I guess I should label all the drives, eh?

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb6 swap swap defaults 0 0
/dev/sdb1 /media/wroot ntfs-3g defaults,locale=en_US.UTF-8 1 2
/dev/sdc1 /share ext3 defaults 0 0
/dev/sdb7 /music ext3 defaults 0 0
/dev/sda1 /archive ext3 defaults 0 0

SideshowMel
21st April 2008, 07:02 PM
So this problem was cleared up by changing my fstab, the problem now is that the new HDD (always gets assigned sda for some reason) seems to get knocked offline for some reason and it will only come back after I completely power-down the machine, then it all works ok. If I reboot without powering down, however, that HDD doesn't recover, which means that the other two drives get reassigned different dev names (sdb reverts to sda, etc.) Anyways, this is an annoying problem, but it becomes even more annoying when I'm working remote (over SSH) and I have to reboot, then the other drives that ARE still working won't mount either, so I have to revert back to my old fstab file until I get home so I can physically power-down the machine to fix the aformentioned problem.

I guess that whole bit is not exactly necessary for you guys to know, but basically I would like to have it setup with labels so that in the future, even if my third HDD craps out, the other mounts will be successful until I'm available to fix the third HDD problem. So, my question is:

How do I label all the drives so that they are unique regardless of what dev assignment they receive on boot? And then, all I need to do is insert the label name instead of dev assignment (as in the "/" and "/home" labeled partitions), right? Thanks. I posted my fstab in my last post, so hopefully it makes more sense.

EDIT:
Pasting new fstab because I removed the NTFS partition because it constantly throws selinux errors and I don't even use that partition anyways.

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb6 swap swap defaults 0 0
/dev/sdc1 /share ext3 defaults 0 0
/dev/sdb7 /music ext3 defaults 0 0
/dev/sda1 /archive ext3 defaults 0 0

SideshowMel
21st April 2008, 07:18 PM
Nevermind...

"man e2label" DUH!

SideshowMel
21st April 2008, 07:33 PM
Ok, last question on this:

Is it possible to label the swap partition? This is the only one that won't mount if my HDD problem recurs again. (although if I'm not mistaken, the machine will still boot, just won't perform very well without a swap, correct?)

SideshowMel
21st April 2008, 08:03 PM
Please disregard my questions. My issue is resolved. Thanks.