Bug 878046 - findmnt -S UUID= doesn't work as expected
Summary: findmnt -S UUID= doesn't work as expected
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-19 14:33 UTC by Ondrej Kozina
Modified: 2012-11-19 16:30 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-19 16:30:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
test script used to reproduce the issue (852 bytes, text/x-sh)
2012-11-19 14:33 UTC, Ondrej Kozina
no flags Details

Description Ondrej Kozina 2012-11-19 14:33:07 UTC
Created attachment 647795 [details]
test script used to reproduce the  issue

Description of problem:

it seems that findmnt doesn't print output for filesystems mounted from device nods placed out of /dev directory. It happens only when you request mountpoints (targets) for explicit source fs UUID (i.e. findmnt -o TARGET -S UUID=blabla)

findmnt w/o parameters prints these targets as expected.

Version-Release number of selected component (if applicable):
util-linux-2.21.2-3.fc17

How reproducible:
always

Steps to Reproduce:
attached script

Actual results:
findmnt doesn't show mountpoint for explicit fs UUID source option

Expected results:
findmnt should show mountpoint for explicit fs UUID source option

Additional info:
The loop device is just an example. It can be reproduced also for other block devices.

Also experienced same behavior on f18 and rawhide

Comment 1 Ondrej Kozina 2012-11-19 14:44:23 UTC
some debug info:

findmnt -o SOURCE,TARGET,UUID:
(...)
/root/dev/test-dev    /mnt/test-mnt  b47665de-9acd-408c-bc5e-3b26ec7a430a
-----------------------------------------------------------------------

LIBMOUNT_DEBUG=0xffff findmnt -o TARGET -S UUID=b47665de-9acd-408c-bc5e-3b26ec7a430a:

libmount: debug mask set to 0xffff.
11452: libmount:      TAB: [0xd78040]: alloc
11452: libmount:      TAB: [0xd78040]: /proc/self/mountinfo: start parsing (0 entries)
11452: libmount:      TAB: [0xd78040]: add entry: proc /proc
11452: libmount:      TAB: [0xd78040]: add entry: sysfs /sys
11452: libmount:      TAB: [0xd78040]: add entry: devtmpfs /dev
11452: libmount:      TAB: [0xd78040]: add entry: devpts /dev/pts
11452: libmount:      TAB: [0xd78040]: add entry: tmpfs /dev/shm
11452: libmount:      TAB: [0xd78040]: add entry: tmpfs /run
11452: libmount:      TAB: [0xd78040]: add entry: /dev/mapper/vg_mtf-lv_root /
11452: libmount:      TAB: [0xd78040]: add entry: securityfs /sys/kernel/security
11452: libmount:      TAB: [0xd78040]: add entry: tmpfs /sys/fs/cgroup
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/systemd
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/cpuset
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/cpu,cpuacct
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/memory
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/devices
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/freezer
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/net_cls
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/blkio
11452: libmount:      TAB: [0xd78040]: add entry: cgroup /sys/fs/cgroup/perf_event
11452: libmount:      TAB: [0xd78040]: add entry: systemd-1 /proc/sys/fs/binfmt_misc
11452: libmount:      TAB: [0xd78040]: add entry: debugfs /sys/kernel/debug
11452: libmount:      TAB: [0xd78040]: add entry: configfs /sys/kernel/config
11452: libmount:      TAB: [0xd78040]: add entry: hugetlbfs /dev/hugepages
11452: libmount:      TAB: [0xd78040]: add entry: tmpfs /media
11452: libmount:      TAB: [0xd78040]: add entry: mqueue /dev/mqueue
11452: libmount:      TAB: [0xd78040]: add entry: /dev/vda1 /boot
11452: libmount:      TAB: [0xd78040]: add entry: /dev/mapper/vg_mtf-lv_home /home
11452: libmount:      TAB: [0xd78040]: add entry: 10.0.1.10:/home/okozina/work /home/okozina/work_nfs
11452: libmount:      TAB: [0xd78040]: add entry: /root/dev/test-dev /mnt/test-mnt
11452: libmount:      TAB: [0xd78040]: /proc/self/mountinfo: stop parsing (28 entries)
11452: libmount:    CACHE: [0xd7c280]: alloc
11452: libmount:      TAB: [0xd78040]: lookup next fs
11452: libmount:    CACHE: [0xd7c280]: add entry [ 1] (tag): /dev/loop2: UUID
11452: libmount:    CACHE: [0xd7c280]: add entry [ 2] (path): /dev/mapper/vg_mtf-lv_root: /dev/mapper/vg_mtf-lv_root
11452: libmount:    CACHE: [0xd7c280]: add entry [ 3] (path): /dev/vda1: /dev/vda1
11452: libmount:    CACHE: [0xd7c280]: add entry [ 4] (path): /dev/mapper/vg_mtf-lv_home: /dev/mapper/vg_mtf-lv_home
11452: libmount:    CACHE: [0xd7c280]: add entry [ 5] (path): /root/dev/test-dev: /root/dev/test-dev
11452: libmount:      TAB: [0xd78040]: reset
11452: libmount:      TAB: [0xd78040]: free
11452: libmount:    CACHE: [0xd7c280]: free

/root/dev/test-dev is node for /dev/loop2 (7:2) device

Comment 2 Karel Zak 2012-11-19 16:30:21 UTC
Yes, we use /dev/disk/by-uuid symlinks for conversion from UUID to the device name and all this stuff expects that your devices are in the /dev directory.

You can use 

  blkid -U <uuid>

for conversion to device name and

  findmnt -S maj:min

to make your search independent on device names.

Anyway, don't think that support devices outside /dev is a good idea, I don't think we need to open this Pandora's box. WONTFIX.


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