Bug 75966 - mount-by-label of devices on LVM doesn't work
Summary: mount-by-label of devices on LVM doesn't work
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Beta 4
Hardware: All All
: P5 - None : Normal
Target Milestone: ---
Assignee: Mads Martin Joergensen
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 17:32 UTC by Carl-Daniel Hailfinger
Modified: 2005-09-01 10:47 UTC (History)
0 users

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Contents of /var after reboot (1.58 KB, application/x-gtar)
2005-04-19 02:20 UTC, Carl-Daniel Hailfinger
Details
Contents of /var before reboot (368.79 KB, application/x-gtar)
2005-04-19 02:24 UTC, Carl-Daniel Hailfinger
Details
strace -o out.mount -f mount LABEL="Linux_srv" /srv/ (8.97 KB, text/plain)
2005-04-19 11:46 UTC, Carl-Daniel Hailfinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl-Daniel Hailfinger 2005-04-06 17:32:11 UTC
Installation with UseSSH=1
/boot is ext2 on hda1, LABEL=Linux_boot, mount by label
/ is reiser on LVM, LABEL=Linux_slash, mount by label
/var is reiser on LVM, LABEL=Linux_var, mount by label

Installation works fine until first reboot. After that, the installation doesn't
continue because /var is not mounted. /var/log/messages is not created, either.
Will try to extract y2logs if possible.
Comment 1 Lukas Ocilka 2005-04-06 18:18:24 UTC
Yes, y2logs are needed.

Bugreporing Howto (logs):
http://www.suse.de/~sh/Bugreporting-faq/index.html#id2518240

Thank you
Comment 2 Lukas Ocilka 2005-04-15 07:46:35 UTC
arvin, fehr: are you able to test/fix this bug without logs, please?
Comment 3 Thomas Fehr 2005-04-18 10:21:10 UTC
We will try to reproduce this here.
Comment 4 Carl-Daniel Hailfinger 2005-04-19 02:20:52 UTC
Created attachment 34762 [details]
Contents of /var after reboot
Comment 5 Carl-Daniel Hailfinger 2005-04-19 02:24:58 UTC
Created attachment 34763 [details]
Contents of /var before reboot
Comment 6 Carl-Daniel Hailfinger 2005-04-19 02:30:23 UTC
It seems this is a problem with mount. mount-by-label doesn't work for
device-mapper devices. Strangely enough, blkid sees the labels on these devices
just fine. Mount-by-UUID also fails for these devices. So it could well be that
this is a bug of mount and not yast.

blkid output follows:
switch:~ # blkid 
/dev/sda1: LABEL="Linux_boot" UUID="5e0bcc0b-eafc-4546-bd81-b5b1c19ea8ad"
TYPE="ext2" 
/dev/sda5: TYPE="swap" 
/dev/system/slash: UUID="ba5d89b4-1ef6-4f8e-98f1-8346163c4e6b"
LABEL="Linux_slash" TYPE="reiserfs" 
/dev/system/var: UUID="854ed0b3-5062-49b6-bde4-2f9e02048f4a" LABEL="Linux_var"
TYPE="reiserfs" 
/dev/system/tmp: UUID="1c5ffc21-4aa6-44a9-8a30-4e219a468d28" LABEL="Linux_tmp"
TYPE="reiserfs" 
/dev/system/home: UUID="81e8ed06-7bef-4484-84f1-80d6553d0ed7" LABEL="Linux_home"
TYPE="reiserfs" 
/dev/system/srv: UUID="dc14ee6c-88f9-418a-9243-0214ef81fd32" LABEL="Linux_srv"
TYPE="reiserfs" 
/dev/system/storage: UUID="7334140f-dbe0-429f-a45b-5d8b64827712"
LABEL="Linux_storage" TYPE="reiserfs" 
/dev/mapper/system-slash: UUID="ba5d89b4-1ef6-4f8e-98f1-8346163c4e6b"
LABEL="Linux_slash" TYPE="reiserfs" 
/dev/mapper/system-var: UUID="854ed0b3-5062-49b6-bde4-2f9e02048f4a"
LABEL="Linux_var" TYPE="reiserfs" 
/dev/mapper/system-storage: UUID="7334140f-dbe0-429f-a45b-5d8b64827712"
LABEL="Linux_storage" TYPE="reiserfs" 
/dev/mapper/system-srv: UUID="dc14ee6c-88f9-418a-9243-0214ef81fd32"
LABEL="Linux_srv" TYPE="reiserfs" 
/dev/hdc: TYPE="iso9660" 
/dev/mapper/system-home: UUID="81e8ed06-7bef-4484-84f1-80d6553d0ed7"
LABEL="Linux_home" TYPE="reiserfs" 
/dev/mapper/system-tmp: UUID="1c5ffc21-4aa6-44a9-8a30-4e219a468d28"
LABEL="Linux_tmp" TYPE="reiserfs" 

switch:~ # mount LABEL="Linux_srv" /srv/
mount: special device LABEL=Linux_srv does not exist
switch:~ # mount UUID="dc14ee6c-88f9-418a-9243-0214ef81fd32" /srv/
mount: special device UUID=dc14ee6c-88f9-418a-9243-0214ef81fd32 does not exist
Comment 7 Thomas Fehr 2005-04-19 09:01:03 UTC
The I reassigne this to maintainer of util-linux so that he can investigate
why mount-by-uuid and -label does not work with device-mapper devices.
Comment 8 Mads Martin Joergensen 2005-04-19 09:16:46 UTC
mount by uuid and mount by label works fine with device mapper devices, otherwise
LVM2 wouldn't work.
Comment 9 Thomas Fehr 2005-04-19 09:28:48 UTC
In a first glance it works here too, but apparently it did not work in the
sequence Carl-Daniel posted in comment #6. Since I see no conjunction to YaST 
in the sequence Carl-Daniel posted, I do not see what I could do with this bug.

If you are sure that Carl-Daniel is wrong, please close with INVALID or WORKSFORME.
Comment 10 Mads Martin Joergensen 2005-04-19 09:39:16 UTC
It's not a mount bug.
Comment 11 Carl-Daniel Hailfinger 2005-04-19 11:35:50 UTC
Mads, have you actually tested this on a 9.3 box? I tried it on one box, it
failed, I reinstalled, it still failed. On another box it failed, too.
Comment 12 Mads Martin Joergensen 2005-04-19 11:40:09 UTC
Just regular mount by label and mount by uuid on a device mapper device?
Comment 13 Carl-Daniel Hailfinger 2005-04-19 11:44:05 UTC
Regular mount by label/uuid works just fine. It's only mount by label/uuid of a
device mapper device that fails.
To convince you that this actually happens, I'll attach a strace of the failing
mount.
Comment 14 Carl-Daniel Hailfinger 2005-04-19 11:46:28 UTC
Created attachment 34787 [details]
strace -o out.mount -f mount LABEL="Linux_srv" /srv/
Comment 15 Mads Martin Joergensen 2005-04-19 11:53:29 UTC
What if you specify

mount -L Linux_srv like the manpage suggests?
Comment 16 Mads Martin Joergensen 2005-04-19 11:56:25 UTC
What's the output of:

ls -l /dev/mapper ?
Comment 17 Carl-Daniel Hailfinger 2005-04-19 12:09:35 UTC
switch:~ # mount -L Linux_srv
mount: no such partition found
switch:~ # ls -l /dev/mapper/
total 177
drwxr-xr-x   2 root root    296 Apr 15 10:34 .
drwxr-xr-x  36 root root 181536 Apr 16 16:54 ..
lrwxrwxrwx   1 root root     16 Apr 15 10:34 control -> ../device-mapper
brw-------   1 root root 253, 3 Apr  7 02:12 system-home
brw-------   1 root root 253, 0 Apr  7 02:12 system-slash
brw-------   1 root root 253, 4 Apr  7 02:12 system-srv
brw-------   1 root root 253, 5 Apr  7 02:12 system-storage
brw-------   1 root root 253, 2 Apr  7 02:12 system-tmp
brw-------   1 root root 253, 1 Apr  7 02:12 system-var
Comment 18 Mads Martin Joergensen 2005-04-19 12:17:23 UTC
mount -L Linux_srv /srv of course
Comment 19 Carl-Daniel Hailfinger 2005-04-19 12:22:30 UTC
switch:~ # mount -L Linux_srv /srv/
mount: no such partition found
Comment 20 Carl-Daniel Hailfinger 2005-04-19 12:26:29 UTC
If you look closely at the strace, it seems mount tries to open /dev/dm-[0-5]
which don't exist. It should instead try to open /dev/mapper/* or open by
major/minor.

switch:~ # cat /proc/partitions 
major minor  #blocks  name

   8     0  156290904 sda
   8     1     530113 sda1
   8     2          1 sda2
   8     5    2104483 sda5
   8     6  153645628 sda6
 253     0    8388608 dm-0
 253     1    4194304 dm-1
 253     2    4194304 dm-2
 253     3   20971520 dm-3
 253     4    4194304 dm-4
 253     5   41943040 dm-5
Comment 21 Mads Martin Joergensen 2005-04-26 18:46:16 UTC
Carl-Daniel, you have the setup and the hardware--is there a chance you can debug
this further and maybe narrow it down a bit more?
Comment 22 Carl-Daniel Hailfinger 2005-04-27 11:53:46 UTC
Quoting from comment #20:
"mount tries to open /dev/dm-[0-5] which don't exist. It should instead try to
open /dev/mapper/* or open by major/minor."
An additional way to solve this problem would be to ask some udev tools what the
name of the real device is.
Comment 23 Carl-Daniel Hailfinger 2005-08-31 23:56:34 UTC
Still happens with 10.0beta4.

Suggested fix:
mount should try to open the devices /dev/mapper/* instead of /dev/dm-*
Comment 24 Mads Martin Joergensen 2005-09-01 09:03:30 UTC
Can you try /work/built/mbuild/barry-mmj-49?
Comment 25 Mads Martin Joergensen 2005-09-01 09:41:09 UTC
The above are 10.0 packages
Comment 26 Carl-Daniel Hailfinger 2005-09-01 10:44:26 UTC
This fixes it. I tested mount-by-label on LVM and on normal partitions. Both
work now.
Comment 27 Mads Martin Joergensen 2005-09-01 10:47:29 UTC
Submitted for STABLE