* [linux-lvm] dmsetup says "Device does not exist", though it exists
@ 2019-08-13 7:11 Christoph Pleger
2019-08-13 13:54 ` Zdenek Kabelac
0 siblings, 1 reply; 8+ messages in thread
From: Christoph Pleger @ 2019-08-13 7:11 UTC (permalink / raw)
To: linux-lvm
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?
Regards
Christoph
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
2019-08-13 7:11 [linux-lvm] dmsetup says "Device does not exist", though it exists Christoph Pleger
@ 2019-08-13 13:54 ` Zdenek Kabelac
2019-08-13 21:25 ` Bernd Eckenfels
2019-08-14 7:22 ` Christoph Pleger
0 siblings, 2 replies; 8+ messages in thread
From: Zdenek Kabelac @ 2019-08-13 13:54 UTC (permalink / raw)
To: LVM general discussion and development, Christoph Pleger
Dne 13. 08. 19 v 9:11 Christoph Pleger napsal(a):
> 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?
>
Hi
Have you tried strace ?
Are you using this only in singly machine with properly running udev ?
Kernel version, lvm version, distribution... ?
Zdenek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
2019-08-13 13:54 ` Zdenek Kabelac
@ 2019-08-13 21:25 ` Bernd Eckenfels
2019-08-14 11:09 ` Zdenek Kabelac
2019-08-14 7:22 ` Christoph Pleger
1 sibling, 1 reply; 8+ messages in thread
From: Bernd Eckenfels @ 2019-08-13 21:25 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]
Hello,
I did not know dmsetup works with lvm file names, did you try to run `dmsetup ls` to see the known devices and the dm compatible name?
Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
Von: linux-lvm-bounces@redhat.com im Auftrag von Zdenek Kabelac <zkabelac@redhat.com>
Gesendet: Dienstag, August 13, 2019 3:54 PM
An: LVM general discussion and development; Christoph Pleger
Betreff: Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
Dne 13. 08. 19 v 9:11 Christoph Pleger napsal(a):
> 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?
>
Hi
Have you tried strace ?
Are you using this only in singly machine with properly running udev ?
Kernel version, lvm version, distribution... ?
Zdenek
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
[-- Attachment #2: Type: text/html, Size: 9185 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
2019-08-13 13:54 ` Zdenek Kabelac
2019-08-13 21:25 ` Bernd Eckenfels
@ 2019-08-14 7:22 ` Christoph Pleger
2019-08-14 11:07 ` Zdenek Kabelac
1 sibling, 1 reply; 8+ messages in thread
From: Christoph Pleger @ 2019-08-14 7:22 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]
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
[-- Attachment #2: strace.txt --]
[-- Type: text/plain, Size: 1152 bytes --]
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 +++
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
2019-08-14 7:22 ` Christoph Pleger
@ 2019-08-14 11:07 ` Zdenek Kabelac
2019-08-14 12:49 ` Christoph Pleger
2019-08-14 13:06 ` Christoph Pleger
0 siblings, 2 replies; 8+ messages in thread
From: Zdenek Kabelac @ 2019-08-14 11:07 UTC (permalink / raw)
To: LVM general discussion and development, Christoph Pleger
Dne 14. 08. 19 v 9:22 Christoph Pleger napsal(a):
> 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)
Hi
So are you actually trying to access not a 'normal' LV - but an LV under
snapshot ?
Debian is using it's own modified udev-rules - so I can't really tell without
exactly looking what sort of rules are running there.
You can try to provide 'lvchange -ayvvvv' debug trace when you activate such
LV and you can enable verification of udev rule processing with lvm.conf option:
verify_udev_operations = 1
That should 'create' missing links if they were not created by udev.
NOTE: this is a cruel hack - nothing I'd advice to use normally - since udev
rules should handle this case normally - but it can give us some hints,
where the issue could be buried-in.
So try above steps and check if the LV links are in /dev/vgname dir.
Regards
Zdenek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
2019-08-13 21:25 ` Bernd Eckenfels
@ 2019-08-14 11:09 ` Zdenek Kabelac
0 siblings, 0 replies; 8+ messages in thread
From: Zdenek Kabelac @ 2019-08-14 11:09 UTC (permalink / raw)
To: LVM general discussion and development, Bernd Eckenfels
Dne 13. 08. 19 v 23:25 Bernd Eckenfels napsal(a):
> Hello,
>
> I did not know dmsetup works with lvm file names, did you try to run `dmsetup
> ls` to see the known devices and the dm compatible name?
Hi
Of course it has to work.
lvm2 names are just symlinks to /dev/dm-XXX real device nodes.
If symlinks are missing - something is broken in the setting configuration...
Regards
Zdenek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
2019-08-14 11:07 ` Zdenek Kabelac
@ 2019-08-14 12:49 ` Christoph Pleger
2019-08-14 13:06 ` Christoph Pleger
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Pleger @ 2019-08-14 12:49 UTC (permalink / raw)
To: Zdenek Kabelac; +Cc: LVM general discussion and development
Hello,
> So are you actually trying to access not a 'normal' LV - but an LV
> under snapshot ?
No, /dev/vg/lv20 is a normal logical volume. But /dev/vg/lv15 has been
under snapshot before.
Now, I created a snapshot manually (before. it was created by an
automatic backup mechanism) and saw what happened:
1. I created the snapshot with 'lvcreate -s -L 2G /dev/vg/lv15'
2. Afterwards, a symbolic link /dev/vg/lvol0 existed and pointed to
/dev/dm-21. Additionally, a link /dev/mapper/vg-lv15-real existed,
pointing to /dev/dm-19
3. I deleted the snapshot with lvremove
4. Afterwards, /dev/vg/lvol0 had disappeared. /dev/mapper/vg-lv15-real
was still present, and it did not point to /dev/dm-19 any more, but to
/dev/dm-18, the same as /dev/vg/lv20
Regards
Christoph
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [linux-lvm] dmsetup says "Device does not exist", though it exists
2019-08-14 11:07 ` Zdenek Kabelac
2019-08-14 12:49 ` Christoph Pleger
@ 2019-08-14 13:06 ` Christoph Pleger
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Pleger @ 2019-08-14 13:06 UTC (permalink / raw)
To: Zdenek Kabelac; +Cc: LVM general discussion and development
Hello,
> and you can enable verification of udev rule
> processing with lvm.conf option:
>
> verify_udev_operations = 1
after setting this, I got the following message from lvremove:
Node /dev/mapper/vg-lv15-real was not removed by udev. Falling back to
direct node removal.
Regards
Christoph
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-14 13:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 7:11 [linux-lvm] dmsetup says "Device does not exist", though it exists Christoph Pleger
2019-08-13 13:54 ` Zdenek Kabelac
2019-08-13 21:25 ` Bernd Eckenfels
2019-08-14 11:09 ` Zdenek Kabelac
2019-08-14 7:22 ` Christoph Pleger
2019-08-14 11:07 ` Zdenek Kabelac
2019-08-14 12:49 ` Christoph Pleger
2019-08-14 13:06 ` Christoph Pleger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).