Re: dmsetup says "Device does not exist", though it exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have a volume group with 20 logical volumes. Only the last one of these volumes has a strange problem with dmsetup, shown by these commands and output on the command line:

root@host:/home/linux# /sbin/dmsetup info -c -o name --noheadings /dev/vg/lv20
Device does not exist.
Command failed

root@host:/home/linux# lvdisplay -c /dev/vg/lv20
   /dev/vg/lv20:vg:3:1:-1:0:4194304:512:-1:0:-1:253:19

root@host:/home/linux# mount /dev/vg/lv20 /mnt
root@host:/home/linux# ls /mnt
lost+found data1 data2

That is, dmsetup says "Device does not exist" about a logical volume, though the volume exists and is operating normally. What is the possible problem here?



Have you tried  strace ?

I attached the relevant lines of the strace output. I am really wondering what is happening there:

1. A stat() on /dev/mapper/lv20 is performed, though I requested /dev/mapper/vg-lv20 2. A stat() on/dev/mapper/vg-lv15-real is performed. What does this have to do with lv20 (after I wrote what is at number 3, I know) 3. I do not even know where /dev/mapper/vg-lv15-real is coming from. I created a logical volume named lv15, but none named lv15-real. And really, 'ls -l /dev/vg/' does not list lv15-real, but 'ls -l /dev/mapper' lists vg-lv15-real and shows that is has the same link target /dev/dm-18 as lv20. 4. Though stat() found /dev/mapper/vg-lv15-real, ioctl() says that this device does not exist.


Kernel version, lvm version,  distribution... ?

Kernel Debian amd64 4.9.168-1+deb9u2, LVM version 2.03.02(2), Debian 9 (stretch)

Regards
  Christoph
ioctl(3, DM_VERSION, {version=4.0.0, data_size=16384, flags=DM_EXISTS_FLAG} => {version=4.35.0, data_size=16384, flags=DM_EXISTS_FLAG}) = 0
stat("/dev/vg/lv20", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 18), ...}) = 0
stat("/dev/mapper/lv20", 0x7ffd1b0ce0d0) = -1 ENOENT (No such file or directory)
open("/dev/mapper", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=460, ...}) = 0
getdents(4, /* 23 entries */, 32768)    = 992
stat("/dev/mapper/vg-lv15-real", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 18), ...}) = 0
close(4)                                = 0
ioctl(3, DM_DEV_STATUS, {version=4.0.0, data_size=16384, name="vg-lv15-real", flags=DM_EXISTS_FLAG} => {version=4.35.0, data_size=16384, name="vg-lv15-real", flags=DM_EXISTS_FLAG}) = -1 ENXIO (No such device or address)
write(2, "Device does not exist.", 22Device does not exist.)  = 22
write(2, "\n", 1
)                       = 1
write(2, "Command failed.", 15Command failed.)         = 15
write(2, "\n", 1
)                       = 1
close(3)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++
_______________________________________________
linux-lvm mailing list
linux-lvm@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux