Discussion:
[linux-lvm] VG won't activate -- dm problem
Scott Hazelhurst
2017-04-24 16:06:01 UTC
Permalink
Dear all

I did an upgrade of my Ubuntu 16.04.2 system and when I rebooted my key volume group won’t activate properly. If I do a pvs, vgs, or lvs all the volumes appear good but dmsetup doesn’t show any information

For example I do this and I see the volume (VM70POOL is the VG I am interested in)
vgs
VG #PV #LV #SN Attr VSize VFree
VM70POOL 1 11 0 wz--n- 1.82t 1.08t
ubuntu-vg 2 2 0 wz--n- 3.64t 48.19g

and
***@vmhost:/var/log# lvdisplay /dev/VM70POOL/health-root-1610
--- Logical volume ---
LV Path /dev/VM70POOL/health-root-1610
LV Name health-root-1610
VG Name VM70POOL
LV UUID jVkRfy-tQ6M-D9RM-xcvO-NxGX-24RY-jQv1r1
LV Write Access read/write
LV Creation host, time vmhost, 2016-11-16 10:10:58 +0200
LV Status NOT available
LV Size 64.00 GiB
Current LE 16384
Segments 1
Allocation inherit
Read ahead sectors auto


But I can’t activate the volume — I get

***@vmhost:/var/log# vgchange -ay VM70POOL
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
device-mapper: reload ioctl on (252:6) failed: Device or resource busy
0 logical volume(s) in volume group "VM70POOL" now active

and in kern.log we have "kernel: [ 3819.113149] device-mapper: table: 252:6: linear: Device lookup failed"

Indeed there is no /dev/dm-6 or above

and dmsetup ls shows no sign of the volume
***@vmhost:/var/log# dmsetup ls --tree -o device
ubuntu--vg-swap_1 (252:5)
└─ (8:5)
ubuntu--vg-root (252:4)
├─ubuntu--vg-root_rimage_1 (252:3)
│ └─ (8:21)
├─ubuntu--vg-root_rmeta_1 (252:2)
│ └─ (8:21)
├─ubuntu--vg-root_rimage_0 (252:1)
│ └─ (8:5)
└─ubuntu--vg-root_rmeta_0 (252:0)
└─ (8:5)



For the record
***@vmhost:/var/log#***@vmhost:/var/log# pvdisplay
--- Physical volume ---
PV Name /dev/sdc
VG Name VM70POOL
PV Size 1.82 TiB / not usable 1.09 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 476932
Free PE 284420
Allocated PE 192512
PV UUID X2Pzgr-nqNp-ri8n-HoT6-Zs7y-e7FC-sNURM6




smartmon shows no problem with the disk though I realize that doesn’t necessarily mean anything


FWIW, in one posting I found that someone with a similar problem had there was a suggestion to do vgscan —mknodes
This had no effect.

I have rebooted the machine too

Any suggestions gratefully received?

Many thanks

Scott






<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;">
<tr>
<td align="left" style="text-align:justify;"><font face="arial,sans-serif" size="1" color="#999999"><span style="font-size:11px;">This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorised signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary. </span></font></td>
</tr>
</table
Scott Hazelhurst
2017-04-26 05:29:57 UTC
Permalink
A couple of days ago I raised the problem of not being able to activate a volume group, and getting an error message device-mapper: reload ioctl on (252:6) failed: Device or resource busy.

In case, this is of help to anyone else, I found the problem. The PV for the volume group was /dev/sdc. About 18 months ago, it was part of a software raid volume (not using LVM). I decided not to run RAID and disabled it. All was fine for a long time through various OS updates and machine reboots. However, after I upgraded Ubuntu from 14.04 to 16.04, something got reactivated in some way. I presume I did something wrong originally. [As an aside I have checked and another of my machines that went through the same update had the same problem]

So here the error message was relatively spot on. I was distracted by the 252:6 part of the message and the absence of /dev/dm-6. The VG could not be activated because the raid was managing it. I used mdadm to stop and delete the RAID and restarted and all is well.

Scott



<table width="100%" border="0" cellspacing="0" cellpadding="0" style="width:100%;">
<tr>
<td align="left" style="text-align:justify;"><font face="arial,sans-serif" size="1" color="#999999"><span style="font-size:11px;">This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorised signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary. </span></font></td>
</tr>
</table

Loading...