Bug 656419
| Summary: | blkid sometimes fails to retrieve UUIDs for device mapper devices | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Lucas Meneghel Rodrigues <lmr> | ||||
| Component: | util-linux-ng | Assignee: | Karel Zak <kzak> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | qe-baseos-daemons | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.0 | CC: | areis, rvokal | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-11-24 14:54:19 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Lucas Meneghel Rodrigues
2010-11-23 17:18:58 UTC
Other important info about my environment:
[root@virtlab105 ~]# dmsetup ls --tree
vg_virtlab105-lv_home (253:3)
├─ (8:2)
└─mpathbp1 (253:1)
└─mpathb (253:0)
├─ (8:32)
└─ (8:16)
vg_virtlab105-lv_swap (253:4)
└─ (8:2)
vg_virtlab105-lv_root (253:2)
└─mpathbp1 (253:1)
└─mpathb (253:0)
├─ (8:32)
└─ (8:16)
[root@virtlab105 ~]# ls -l /dev/mapper
total 0
crw-rw---- 1 root root 10, 58 Nov 23 11:45 control
lrwxrwxrwx 1 root root 7 Nov 23 11:45 mpathb -> ../dm-0
lrwxrwxrwx 1 root root 7 Nov 23 11:45 mpathbp1 -> ../dm-1
lrwxrwxrwx 1 root root 7 Nov 23 11:45 vg_virtlab105-lv_home -> ../dm-3
lrwxrwxrwx 1 root root 7 Nov 23 11:45 vg_virtlab105-lv_root -> ../dm-2
lrwxrwxrwx 1 root root 7 Nov 23 11:45 vg_virtlab105-lv_swap -> ../dm-4
[root@virtlab105 ~]# blkid
/dev/dm-1: UUID="pt9vo6-x3qR-3fvV-peKY-npAC-e352-wdgLh9" TYPE="LVM2_member"
/dev/dm-2: UUID="87cae285-94bc-4450-92c7-a8c5fd1ee566" TYPE="ext4"
/dev/sda1: UUID="9eb9563c-25df-4b31-96c2-e8fb2905c5fb" TYPE="ext4"
/dev/sda2: UUID="gxOcle-BJLN-XQrl-QznC-6I0T-IpkZ-G0VvWg" TYPE="LVM2_member"
/dev/mapper/vg_virtlab105-lv_home: UUID="c2822ad2-4b97-4c02-92d8-add7dd4ce875" TYPE="ext4"
/dev/mapper/vg_virtlab105-lv_swap: UUID="3e0a2c65-d7a6-485e-8e3c-e796a4242c8c" TYPE="swap"
The machine's partitioning was automatically setup by anaconda, from an older development release of rhel6.
(In reply to comment #0) > 1. Run blkid in all the device mapper devices. Some of the runs will fail > blkid -s UUID -o value /dev/dm-* Pretty vague information... what exactly does it return? Nothing? > Actual results: Allways return a UUID while using blkid in /dev/dm-* The cache evaluates dependencies between devices. It means that not all devices from system have to be visible on blkid output. Please, try: # rm -r /etc/blkid/blkid.tab # blkid # cat /etc/blkid/blkid.tab # for i in $(ls -d /sys/block/dm-*); do echo "$i: $(cat $i/dm/name)"; done I'd like see output from these commands. Thanks. I forgot.. try also: BLKID_DEBUG=0xffff blkid -s UUID -o value /dev/dm-* to get more information. (In reply to comment #3) > (In reply to comment #0) > > 1. Run blkid in all the device mapper devices. Some of the runs will fail > > blkid -s UUID -o value /dev/dm-* > > Pretty vague information... what exactly does it return? Nothing? It returns no UUID in console and return code != 0. Example: $ blkid -s UUID -o value /dev/dm-3 $ $ echo $? $ 1 (the return code here was invented, my test code caught it was different from 0 anyway) > > Actual results: Allways return a UUID while using blkid in /dev/dm-* > > The cache evaluates dependencies between devices. It means that not all devices > from system have to be visible on blkid output. > > Please, try: > > # rm -r /etc/blkid/blkid.tab > # blkid > # cat /etc/blkid/blkid.tab > > # for i in $(ls -d /sys/block/dm-*); do echo "$i: $(cat $i/dm/name)"; done > > I'd like see output from these commands. Thanks. [root@virtlab105 ~]# rm -r /etc/blkid/blkid.tab rm: remove regular file `/etc/blkid/blkid.tab'? y [root@virtlab105 ~]# blkid /dev/sdb1: UUID="9eb9563c-25df-4b31-96c2-e8fb2905c5fb" TYPE="ext4" /dev/sdb2: UUID="gxOcle-BJLN-XQrl-QznC-6I0T-IpkZ-G0VvWg" TYPE="LVM2_member" /dev/mapper/mpathbp1: UUID="pt9vo6-x3qR-3fvV-peKY-npAC-e352-wdgLh9" TYPE="LVM2_member" /dev/mapper/vg_virtlab105-lv_root: UUID="87cae285-94bc-4450-92c7-a8c5fd1ee566" TYPE="ext4" /dev/mapper/vg_virtlab105-lv_home: UUID="c2822ad2-4b97-4c02-92d8-add7dd4ce875" TYPE="ext4" /dev/mapper/vg_virtlab105-lv_swap: UUID="3e0a2c65-d7a6-485e-8e3c-e796a4242c8c" TYPE="swap" [root@virtlab105 ~]# cat /etc/blkid/blkid.tab <device DEVNO="0x0811" TIME="1290542157.988957" UUID="9eb9563c-25df-4b31-96c2-e8fb2905c5fb" TYPE="ext4">/dev/sdb1</device> <device DEVNO="0x0812" TIME="1290542157.989005" UUID="gxOcle-BJLN-XQrl-QznC-6I0T-IpkZ-G0VvWg" TYPE="LVM2_member">/dev/sdb2</device> <device DEVNO="0xfd01" TIME="1290542157.989273" PRI="40" UUID="pt9vo6-x3qR-3fvV-peKY-npAC-e352-wdgLh9" TYPE="LVM2_member">/dev/mapper/mpathbp1</device> <device DEVNO="0xfd02" TIME="1290542157.989526" PRI="45" UUID="87cae285-94bc-4450-92c7-a8c5fd1ee566" TYPE="ext4">/dev/mapper/vg_virtlab105-lv_root</device> <device DEVNO="0xfd03" TIME="1290542157.989801" PRI="45" UUID="c2822ad2-4b97-4c02-92d8-add7dd4ce875" TYPE="ext4">/dev/mapper/vg_virtlab105-lv_home</device> <device DEVNO="0xfd04" TIME="1290542157.990063" PRI="45" UUID="3e0a2c65-d7a6-485e-8e3c-e796a4242c8c" TYPE="swap">/dev/mapper/vg_virtlab105-lv_swap</device> [root@virtlab105 ~]# for i in $(ls -d /sys/block/dm-*); do echo "$i: $(cat $i/dm/name)"; done /sys/block/dm-0: mpathb /sys/block/dm-1: mpathbp1 /sys/block/dm-2: vg_virtlab105-lv_root /sys/block/dm-3: vg_virtlab105-lv_home /sys/block/dm-4: vg_virtlab105-lv_swap And the debug flag, I tried it and the output is enormous. I am running some tests on the box now, but in the next round I'll make the test code execute the UUIDs with the debug flag set. It seems that the cache contains all devices, the problem is probably in the way how libblkid works with device names (e.g. dm-3 vs. vg_virtlab105-lv_home). Please: rm -f /etc/blkid/blkid.tab blkid BLKID_DEBUG=0xffff blkid /dev/dm-3 &> ~/log and add the log file to BZ as attachment. Thanks. Other important info about my environment:
[root@virtlab105 ~]# dmsetup ls --tree
vg_virtlab105-lv_home (253:3)
├─ (8:2)
└─mpathbp1 (253:1)
└─mpathb (253:0)
├─ (8:32)
└─ (8:16)
vg_virtlab105-lv_swap (253:4)
└─ (8:2)
vg_virtlab105-lv_root (253:2)
└─mpathbp1 (253:1)
└─mpathb (253:0)
├─ (8:32)
└─ (8:16)
[root@virtlab105 ~]# ls -l /dev/mapper
total 0
crw-rw---- 1 root root 10, 58 Nov 23 11:45 control
lrwxrwxrwx 1 root root 7 Nov 23 11:45 mpathb -> ../dm-0
lrwxrwxrwx 1 root root 7 Nov 23 11:45 mpathbp1 -> ../dm-1
lrwxrwxrwx 1 root root 7 Nov 23 11:45 vg_virtlab105-lv_home -> ../dm-3
lrwxrwxrwx 1 root root 7 Nov 23 11:45 vg_virtlab105-lv_root -> ../dm-2
lrwxrwxrwx 1 root root 7 Nov 23 11:45 vg_virtlab105-lv_swap -> ../dm-4
[root@virtlab105 ~]# blkid
/dev/dm-1: UUID="pt9vo6-x3qR-3fvV-peKY-npAC-e352-wdgLh9" TYPE="LVM2_member"
/dev/dm-2: UUID="87cae285-94bc-4450-92c7-a8c5fd1ee566" TYPE="ext4"
/dev/sda1: UUID="9eb9563c-25df-4b31-96c2-e8fb2905c5fb" TYPE="ext4"
/dev/sda2: UUID="gxOcle-BJLN-XQrl-QznC-6I0T-IpkZ-G0VvWg" TYPE="LVM2_member"
/dev/mapper/vg_virtlab105-lv_home: UUID="c2822ad2-4b97-4c02-92d8-add7dd4ce875" TYPE="ext4"
/dev/mapper/vg_virtlab105-lv_swap: UUID="3e0a2c65-d7a6-485e-8e3c-e796a4242c8c" TYPE="swap"
The machine's partitioning was automatically setup by anaconda, from an older development release of rhel6.
Ops, my mistake, posted a repeated comment. Anyway, I've got the log you asked, I am attaching it to the bug. Created attachment 462502 [details]
blkid log
blkid log with full debug turned on
I see /dev/dm-3: UUID="3e0a2c65-d7a6-485e-8e3c-e796a4242c8c" TYPE="swap" in the log. It works :-) Is the machine accessible within Red Hat? I'd like to play with that a little. Posted login details to Karel via IRC. *** This bug has been marked as a duplicate of bug 656453 *** |