Hello,
I'm unable to deactivate an lvm.
My system is RHEL 6.5 with lvm2-2.02.100-8.el6.x86_64 and kernel 2.6.32-431.29.2.el6.x86_64
I get error code 5 with message
Logical volume VG_AAA_TEMP/LV_AAA_TEMP in use.
You can find output of
lvchange -d -d -d -d -d -d -an VG_AAA_TEMP/LV_AAA_TEMP
here:
Recreating sources from the related src.rpm the problem (as stated anyway in error message too) is in code
activate/activate.c:711 Logical volume in use
that is
while (open_count_check_retries--) {
if (info->open_count > 0) {
if (open_count_check_retries) {
usleep(OPEN_COUNT_CHECK_USLEEP_DELAY);
log_debug_activation("Retrying open_count check for %s/%s.",
lv->vg->name, lv->name);
if (!lv_info(cmd, lv, 0, info, 1, 0))
return -1;
continue;
}
log_error("Logical volume %s/%s in use.",
lv->vg->name, lv->name);
return 0;
} else
break;
}
In fact I get this information querying device:
[root@orapr2 activate]# dmsetup info --checks 360a9800037543544465d424130533177
Name: 360a9800037543544465d424130533177
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 1
Event number: 23
Major, minor: 253, 4
Number of targets: 1
UUID: mpath-360a9800037543544465d424130533177
[root@orapr2 activate]# dmsetup table 360a9800037543544465d424130533177
0 2097152 multipath 4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handler 1 alua 2 1 round-robin 0 4 1 66:160 1 69:192 1 133:224 1 8:288 1 round-robin 0 4 1 8:96 1 68:48 1 129:32 1 130:128 1
I got in past days a problem related to sempahores
(maximum number of semaphore sets has been exceeded)
and I suspect that some resource could have been incorrectly locked.
The device is sort of
[root@orapr2 ~]# multipath -l 360a9800037543544465d424130533177
360a9800037543544465d424130533177 dm-4 NETAPP,LUN
size=1.0G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=0 status=active
| |- 1:0:1:7 sdaq 66:160 active undef running
| |- 1:0:2:7 sdco 69:192 active undef running
| |- 2:0:2:7 sdho 133:224 active undef running
| `- 2:0:3:7 sdiy 8:288 active undef running
`-+- policy='round-robin 0' prio=0 status=enabled
|- 1:0:0:7 sdg 8:96 active undef running
|- 2:0:0:7 sdbp 68:48 active undef running
|- 1:0:3:7 sdeq 129:32 active undef running
`- 2:0:1:7 sdfm 130:128 active undef running
and the filesystem on it has been successfully umounted, but
[root@orapr2 ~]# lvs VG_AAA_TEMP/LV_AAA_TEMP
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
LV_AAA_TEMP VG_AAA_TEMP -wi-ao---- 1020.00m
How can I see the responsible for the reference that apparently keeps it open?
Open count: 1
so I can check and eventually fix??
Thanks in advance.
Gianluca
-- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel