Skip to contentSkip to conversation

lvm snapshot creation ends with the error message

DISCUSSION Gang He 2 participants 5 messages Apr 9, 2019 – Apr 12, 2019

lore
Share & tools
lore

Gang He

author
#0 lore raw

Hello Guys,

Our user complained a confused error message when create a LV snapshot successfully.
e.g.
lvcreate --snapshot "/dev/$vgroup/$volume" --name "$snapvol" -l '80%FREE'
returns the following:
Taking snapshot mongo_db-snap
device-mapper: remove ioctl on (254:2) failed: Device or resource busy <<== here, why we need to print this error message? since we can retry a few time before failure Logical volume "mongo_db-snap" created.

The related code is in libdm-iface.c file under libdm/ioctl.

1873 else {
1874 if (_log_suppress || dmt->ioctl_errno == EINTR)
1875 log_verbose("device-mapper: %s ioctl on %s %s%s%.0d%s%.0d%s%s "

1876                                             "failed: %s",
1877                                             _cmd_data_v4[dmt->type].name,
1878                                             dmi->name, dmi->uuid,
1879                                             dmt->major > 0 ? "(" : "",
1880                                             dmt->major > 0 ? dmt->major : 0,
1881                                             dmt->major > 0 ? ":" : "",
1882                                             dmt->minor > 0 ? dmt->minor : 0,
1883                                             dmt->major > 0 && dmt->minor == 0 ? "0" : "",
1884                                             dmt->major > 0 ? ")" : "",
1885                                             strerror(dmt->ioctl_errno));
1886                         else
1887                                 log_error("device-mapper: %s ioctl on %s %s%s%.0d%s%.0d%s%s "
1888                                           "failed: %s",
1889                                           _cmd_data_v4[dmt->type].name,
1890                                           dmi->name, dmi->uuid,
1891                                           dmt->major > 0 ? "(" : "",
1892                                           dmt->major > 0 ? dmt->major : 0,
1893                                           dmt->major > 0 ? ":" : "",
1894                                           dmt->minor > 0 ? dmt->minor : 0,
1895                                           dmt->major > 0 && dmt->minor == 0 ? "0" : "",
1896                                           dmt->major > 0 ? ")" : "",
1897                                           strerror(dmt->ioctl_errno));

1898

Thanks
Gang

#1 lore raw

Dne 09. 04. 19 v 12:14 Gang He napsal(a):

Quoted 11 lines

Hello Guys,

Our user complained a confused error message when create a LV snapshot successfully.
e.g.
lvcreate --snapshot "/dev/$vgroup/$volume" --name "$snapvol" -l '80%FREE'
returns the following:
Taking snapshot mongo_db-snap
device-mapper: remove ioctl on (254:2) failed: Device or resource busy <<== here, why we need to print this error message? since we can retry a few time before failure Logical volume "mongo_db-snap" created.

The related code is in libdm-iface.c file under libdm/ioctl.

Hi

The error should NOT happen - if you can observe this report - somewhere is something going out-of-sync.

So please - post the version and -vvvv log of this case.

It does look like somewhere is missing synchronization wait.

Zdenek

author
#2 lore raw

Hi Zdenek,

The LVM2 version is as below,
rpm -V lvm2-2.02.120-78.16.1.x86_64
The other information is attached, see lvm.txt.
My question is, how do we disable this intermediate error message printing?

Thanks
Gang

Quoted 1 line
Quoted 1 line
Quoted 1 line

On 2019/4/9 at 22:53, in message

<[email protected]>, Zdenek Kabelac

Quoted 21 lines · <[email protected]> wrote:

Dne 09. 04. 19 v 12:14 Gang He napsal(a):

Quoted 3 lines

Hello Guys,

Our user complained a confused error message when create a LV snapshot

successfully.

Quoted 5 lines

e.g.
lvcreate --snapshot "/dev/$vgroup/$volume" --name "$snapvol" -l '80%FREE' returns the following:
Taking snapshot mongo_db-snap
device-mapper: remove ioctl on (254:2) failed: Device or resource busy <<==

here, why we need to print this error message? since we can retry a few time before failure

Quoted 3 lines

Logical volume "mongo_db-snap" created.

The related code is in libdm-iface.c file under libdm/ioctl.

Hi

The error should NOT happen - if you can observe this report - somewhere is something going out-of-sync.

Quoted 6 lines

So please - post the version and -vvvv log of this case.

It does look like somewhere is missing synchronization wait.

Zdenek

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lvm.txt
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20190411/08c795a4/attachment.txt>

#3 lore raw

Dne 11. 04. 19 v 10:48 Gang He napsal(a):

Quoted 6 lines

Hi Zdenek,

The LVM2 version is as below,
rpm -V lvm2-2.02.120-78.16.1.x86_64
The other information is attached, see lvm.txt.
My question is, how do we disable this intermediate error message printing?

Hi

Why is anyone using lvm2 version 2.02.120 ?

Are you able to reproduce the error with more recent version of lvm2. (As there has been quite a long list of bug fixed).

Regards

Zdenek

author
#4 lore raw

Hi Zdenek,

Quoted 1 line
Quoted 1 line
Quoted 1 line

On 4/11/2019 at 7:23 pm, in message

<[email protected]>, Zdenek Kabelac

Quoted 9 lines · <[email protected]> wrote:

Dne 11. 04. 19 v 10:48 Gang He napsal(a):

Quoted 6 lines

Hi Zdenek,

The LVM2 version is as below,
rpm -V lvm2-2.02.120-78.16.1.x86_64
The other information is attached, see lvm.txt.
My question is, how do we disable this intermediate error message printing?

Quoted 3 lines

Hi

Why is anyone using lvm2 version 2.02.120 ?

SLE12sp3 still uses this lvm2 version, we can not upgrade it directly.

Quoted 3 lines

Are you able to reproduce the error with more recent version of lvm2. (As there has been quite a long list of bug fixed).

I can not reproduce this bug in local with v2.02.120.
It looks only the user's environment can meet this error message, this user is using a backup product via lvm2 snapshot feature. Do you have any suggestion for this situation? e.g.
how to disable this intermediate error message printing?
or, the possible reasons? then we can tell the customer to avoid this retry loop.

Thanks
Gang

Quoted 5 lines

Regards

Zdenek