On 12/09/2013 11:58 AM, Konstantin Olchanski wrote:
On Mon, Dec 09, 2013 at 11:35:03AM -0800, ToddAndMargo wrote:
Bug 836696 has been driving me nuts for years. This is
where you drop to fsck on boot for the backup drive,
but you can't do anything with the drive when you get
to maintenance mode.
And, I finally figured out what is causing this. My
OS and my backup drive's devices are randomly reversing
themselves at boot. For details, see comment #37:
https://bugzilla.redhat.com/show_bug.cgi?id=836696#c37
Hope no one else has to figure this one out the hard way,
as I did.
Doh! This linux "feature" bites rookie and wizard all the same.
Linux assigns the sdN names in the order that devices are discovered
and this order is not deterministic - SCSI, SATA and USB may all be scanned
at the same time mixing up all the names each time. Mr. Torvalds cares
about this not one bit, he has only a single drive inside his mac air
and no usb ports to accidentally confuse things by leaving a usb drive
connected during reboot.
Therefore, on linux, you cannot put "/dev/sda1" & co into /etc/fstab.
You have to mount filesystems by UUID or by label. This was true and
worked quite well for ages now. (Even with IDE disks, the /dev/hda, /dev/hdb,
etc
assignement was not super fixed - it depended on the order that IDE
host adapters were initialized and this order has been known to change
between different linux releases).
Hi Konstantin,
The OS drive is mounted by label, but the backup drive is mounted
by device.
And, (real biggie here), the backup drive is deliberately NOT
in fstab. Maybe adding it to fstab by UUID or LABEL would
solve this?
How would you mount this thing by label? What is its label any
way? Plus, the backup drives rotate (several drive). I presume
I can not add the same label to each backup drive?
$ ls -al /dev/disk/by-label
lrwxrwxrwx. 1 root root 10 Dec 9 10:58 lin-bak -> ../../dm-2
$ ls -al /dev/dm-2
brw-rw----. 1 root disk 253, 2 Dec 9 10:58 /dev/dm-2
$ ls -al /dev/mapper/lin-bak
lrwxrwxrwx. 1 root root 7 Dec 9 10:58 /dev/mapper/lin-bak -> ../dm-2
$ mount -l | grep -i lin-bak
/dev/mapper/lin-bak on /lin-bak type ext4 (rw) [lin-bak]
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~