drbd+lvm2 on quantal quetzal uname to de-activate logical volumes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
# lsb_release -rd
Description: Ubuntu 12.10
Release: 12.10
# apt-cache policy lvm2
lvm2:
Installed: 2.02.95-4ubuntu1
Candidate: 2.02.95-4ubuntu1
Version table:
*** 2.02.95-4ubuntu1 0
500 http://
100 /var/lib/
root@server01:~# apt-cache policy drbd
drbd8-utils drbdlinks
# apt-cache policy drbd8-utils
drbd8-utils:
Installed: 2:8.3.13-1.1ubuntu1
Candidate: 2:8.3.13-1.1ubuntu1
Version table:
*** 2:8.3.13-1.1ubuntu1 0
500 http://
100 /var/lib/
# uname -a
Linux server01 3.5.0-19-generic #30-Ubuntu SMP Tue Nov 13 17:48:01 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/drbd.
resource drbd_sp1 {
protocol C;
startup {
}
disk {
}
net {
}
syncer {
}
on server01 {
}
on server02 {
}
}
# pvdisplay
--- Physical volume ---
PV Name /dev/drbd1
VG Name sp1
PV Size 9.02 GiB / not usable 3.68 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 2308
Free PE 2052
Allocated PE 256
PV UUID PV1zLn-
# vgdisplay
--- Volume group ---
VG Name sp1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 9.02 GiB
PE Size 4.00 MiB
Total PE 2308
Alloc PE / Size 256 / 1.00 GiB
Free PE / Size 2052 / 8.02 GiB
VG UUID kfRfDM-
# lvdisplay
--- Logical volume ---
LV Path /dev/sp1/
LV Name test_disk01
VG Name sp1
LV UUID uNYEy7-
LV Write Access read/write
LV Creation host, time server01, 2012-12-14 11:40:56 +0100
LV Status available
# open 0
LV Size 1.00 GiB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 38445384 1488864 35003448 5% /
udev 2015328 4 2015324 1% /dev
tmpfs 809936 244 809692 1% /run
none 5120 4 5116 1% /run/lock
none 2024836 0 2024836 0% /run/shm
none 102400 0 102400 0% /run/user
# drbd-overview
1:drbd_sp1 Connected Primary/Secondary UpToDate/UpToDate C r-----
# lvchange -a n /dev/sp1/
(cannot see any error messages)
# lvscan
ACTIVE '/dev/sp1/
It seems lvm2 not change from ACTIVE to inactive if drbd driver used as pv.
# vgchange -a n sp1
0 logical volume(s) in volume group "sp1" now active
# lvscan
ACTIVE '/dev/sp1/
Same problem if you try to de-activate volume group.
In this situation you cannot migrate drbd device :
# drbdadm secondary drbd_sp1
1: State change failed: (-12) Device is held open by someone
Command 'drbdsetup 1 secondary' terminated with exit code 11
On Precise Pangolin this configuration run without problem.
This is potentially a duplicate of bug 1088081 .
It would be useful to increase udev debugging and attach udev events that happen during "vgchange -a n sp1" to check if this is the same as bug 1088081 or not.