Bug#586985: Regression: grub-probe fails. [debug2]

Witold Baryluk baryluk at smp.if.uj.edu.pl
Thu Jul 8 13:00:27 UTC 2010


Additional to my previous informations.

# egrep -v '^#|^$' /etc/fstab
proc									/proc		proc		defaults							0       0
/dev/mapper/movax2_vg-movax2_lv_root	/				ext3		noatime,errors=remount-ro			0       1
LABEL=MOVAX-DEV-BOOT								/boot			ext3		nosuid,nodev,relatime				0       2
/dev/mapper/movax2_vg-movax2_lv_home	/home_local			reiserfs	nosuid,nodev,noatime,acl,user_xattr	0       2
/dev/mapper/movax2_vg-movax2_lv_tmp		/tmp			ext3		nosuid,nodev,noatime						0       2
/dev/mapper/movax2_vg-movax2_lv_usr		/usr			reiserfs	noatime								0       2
/dev/mapper/movax2_vg-movax2_lv_var		/var			reiserfs	noatime								0       2
/dev/mapper/movax2_vg-movax2_lv_swap	none			swap		sw,pri=1									0       0
LABEL=WB_ZEW_SWAP						none			swap		sw,pri=1								0       0
/dev/ramzswap0							none			swap		sw,pri=100								0       0
/dev/cdrom3								/media/cdrom0	udf,iso9660	user,noauto							0       0
/dev/scd0								/media/cdrom2	udf,iso9660	user,noauto							0       0
nodev	/debug	debugfs	defaults	0	0
#
# cat /etc/mtab 
/dev/mapper/movax2_vg-movax2_lv_root / ext3 rw 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,size=600m 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
/dev/mapper/movax2_vg-movax2_lv_home /home_local reiserfs rw,nosuid,nodev,noatime,acl,user_xattr 0 0
/dev/mapper/movax2_vg-movax2_lv_tmp /tmp ext3 rw,nosuid,nodev,noatime 0 0
/dev/mapper/movax2_vg-movax2_lv_usr /usr reiserfs rw,noatime 0 0
/dev/mapper/movax2_vg-movax2_lv_var /var reiserfs rw,noatime 0 0
nodev /debug debugfs rw 0 0
wbzewzfs/Backup /wbzewzfs/Backup fuse rw,allow_other 0 0
wbzewzfs/Books /wbzewzfs/Books fuse rw,allow_other 0 0
wbzewzfs/Download /wbzewzfs/Download fuse rw,allow_other 0 0
wbzewzfs/Download2 /wbzewzfs/Download2 fuse rw,allow_other 0 0
wbzewzfs/Films /wbzewzfs/Films fuse rw,allow_other 0 0
wbzewzfs/ISO /wbzewzfs/ISO fuse rw,allow_other 0 0
wbzewzfs/Music /wbzewzfs/Music fuse rw,allow_other 0 0
wbzewzfs/Photos /wbzewzfs/Photos fuse rw,allow_other 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
automount(pid2182) /home autofs rw,fd=4,pgrp=2182,minproto=2,maxproto=4 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
automount(pid31443) /scratch-remote autofs rw,fd=5,pgrp=31443,minproto=2,maxproto=4 0 0
automount(pid31497) /cdrom-remote autofs rw,fd=5,pgrp=31497,minproto=2,maxproto=4 0 0
/dev/sda1 /boot ext3 rw,nosuid,nodev,relatime 0 0
#

probing /boot works.

# /usr/sbin/grub-probe --target=device /boot
/dev/sda1
#


I think this is becuase /boot is on /dev/sda1,
but / is on encrypted (LUKS) LVM volume as /dev/mapper/movax2_vg-movax2_lv_root

# ls -l /dev/mapper/movax2_vg-movax2_lv_root
lrwxrwxrwx 1 root root 7 07-08 04:32 /dev/mapper/movax2_vg-movax2_lv_root -> ../dm-0
# ls -l /dev/dm-0 
brw-rw---- 1 root disk 254, 0 07-08 05:35 /dev/dm-0
#


#  strace /usr/sbin/grub-probe -v --target=device /
...
...
chdir("mapper")                         = 0
getdents64(4, /* 9 entries */, 32768)   = 368
lstat64("movax2_vg-movax2_lv_swap", {st_mode=S_IFLNK|0777, st_size=7, ...}) = 0
lstat64("movax2_vg-movax2_lv_root", {st_mode=S_IFLNK|0777, st_size=7, ...}) = 0
lstat64("movax2_vg-movax2_lv_tmp", {st_mode=S_IFLNK|0777, st_size=7, ...}) = 0
lstat64("movax2_vg-movax2_lv_var", {st_mode=S_IFLNK|0777, st_size=7, ...}) = 0
lstat64("movax2_vg-movax2_lv_usr", {st_mode=S_IFLNK|0777, st_size=7, ...}) = 0
lstat64("movax2_vg-movax2_lv_home", {st_mode=S_IFLNK|0777, st_size=7, ...}) = 0
lstat64("control", {st_mode=S_IFCHR|0600, st_rdev=makedev(10, 59), ...}) = 0
getdents64(4, /* 0 entries */, 32768)   = 0
chdir("/dev")                           = 0
close(4)                                = 0
lstat64("disk", {st_mode=S_IFDIR|0755, st_size=120, ...}) = 0
open("disk", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
...
...


It looks tht grub-probe ignore first files is they are symlinks!
Why grub-probe cannot just open /dev/mapper/movax2_vg-movax2_lv_root (as it is is mtab and /proc/mount)?
I just do not understand why grub-probe is enumerating all devices.
Not only this is error prone, but can be slow.

Thanks.


-- 
Witold Baryluk
JID: witold.baryluk // jabster.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20100708/743be642/attachment.pgp>


More information about the Pkg-grub-devel mailing list