Bug 141158 - Mount will not mount whole disks by label or uuid.
Mount will not mount whole disks by label or uuid.
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: mount (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-11-29 13:15 EST by Al Tobey
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-10 16:07:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Tiny patch to util-linux to make mount capable of mounting whole disks by label or uuid (716 bytes, patch)
2004-11-29 13:17 EST, Al Tobey
no flags Details | Diff

  None (edit)
Description Al Tobey 2004-11-29 13:15:41 EST
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.
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
Comment 1 Al Tobey 2004-11-29 13:17:46 EST
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.
Comment 2 Al Tobey 2004-11-29 13:21:18 EST
With the patched version:
root> mount /ora/phadm00
root> mount -l
/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.
Comment 3 Elliot Lee 2004-12-01 17:26:05 EST
IIRC, I tried to get this type of patch upstream a while back - no
joy. Perhaps you would have better luck - email aeb@cwi.nl and explain
the situation.
Comment 4 Elliot Lee 2004-12-10 16:07:25 EST
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.
Comment 5 Dave Wysochanski 2005-03-24 10:52:32 EST
I'm interested in this limitation.

Can you point me at any threads on lkml as to why this limitation

Comment 6 Elliot Lee 2005-03-24 12:32:15 EST
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@stusta.de 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.

Note You need to log in before you can comment on or make changes to this bug.