Description of problem: With the util-linux (2.11y-31.1) package on RHES3, I cannot mount whole disks by label or uuid. This is due to an "if" statement in mount_by_label.c. I cannot think of any good reason why mount would never want to allow a whole disk. For disks on our SAN (HP EVA), using whole disks is preferred. Patch will be attached. /etc/fstab: UUID=883097bc-7f21-413a-9334-1f48c89c3425 /ora/phadm00 ext3 defaults 2 2 # or LABEL=phadm00 /ora/phadm00 ext3 defaults 2 2 root> mount /ora/phadm00 mount: no such partition found
Created attachment 107560 [details] Tiny patch to util-linux to make mount capable of mounting whole disks by label or uuid Applies fine to util-linux-2.11y/2.11y-31.1.
With the patched version: root> mount /ora/phadm00 root> mount -l --snip-- /dev/sdh on /ora/phadm02 type ocfs (rw) [phadm02] /dev/sdg on /ora/phadm01 type ocfs (rw) [phadm01] /dev/sdf on /ora/phadm_rac type ocfs (rw) [phadm_rac] /dev/sdi on /ora/phadm00 type ext3 (rw) [phadm00] It even shows the labels on my OCFS filesystems after applying the attached patch. It didn't before.
IIRC, I tried to get this type of patch upstream a while back - no joy. Perhaps you would have better luck - email aeb and explain the situation.
The latest: util-linux-2.12j uses a different way (not isdigit) to decide whether a device is a whole disk or not. I think it's fairly intentional that things are that way. I'm not sure why, but on the other hand, it shouldn't hurt all that much to use a single partition for the whole disk. Since upstream put it in there and kept it in there, upstream probably has a good reason for having it there.
I'm interested in this limitation. Can you point me at any threads on lkml as to why this limitation exists? Thanks.
It's not a kernel limitation. Just a decision at the util-linux level. The only thing I can think of is that it may be difficult to distinguish between having a whole disk with a label, and having a disk with a label on the first partition. This could be the case if the partition table is not stored on the very first sector of the disk, for example. This is all wild guessing though - bunk is the current upstream maintainer and can give you a better answer. I'm also not seeing a pressing need to allow whole disks, because creating one big partition is easy and produces effectively the same results.