Bug#533436: [lvm2] Unable to use use LVM with DRBD block devices as PV
Hi all, I just found a workaround: Create a partition on the drbd device with fdisk or cfdisk and set the partition type to 8E, which is LVM. If your newly created partition doesn't show up in /dev/mapper/ or /dev/disk/ you may use kpartx: h1:~# kpartx -a drbd-device then you can create your pv on the new partition and continue creating vgs and lvs. Still, using the drbd device as pv without partitioning would be nicer. What's still to be done with this solution is to add the kpartx-command to system startup so pvscan can find the drbd-partition. Also your drbd device has to be primary in order for kpartx to work. Best regards, David -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#533436: [lvm2] Unable to use use LVM with DRBD block devices as PV
On Wed, Jun 17, 2009 at 04:00:35PM +0200, Laurent Léonard wrote: I was unable to use a DRBD block device as a PV on an LVM-based system. See the following commands: DRBD is neither part of LVM nor of the core kernel. debian1:~# lvcreate --name foo --size 4G replicated device-mapper: reload ioctl failed: Invalid argument Aborting. Failed to activate new LV to wipe the start of it. Please add - and provide the output. debian1:~# tail /var/log/syslog -n 2 Jun 17 15:50:13 debian1 kernel: [ 2108.509080] device-mapper: table: 254:3: linear: dm-linear: Device lookup failed Jun 17 15:50:13 debian1 kernel: [ 2108.509086] device-mapper: ioctl: error adding target to table The kernel is not able to find the drbd device. What is the content of /proc/devices? Bastian -- There are some things worth dying for. -- Kirk, Errand of Mercy, stardate 3201.7 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#533436: [lvm2] Unable to use use LVM with DRBD block devices as PV
I can confirm this, too: Debian GNU/Linux 5.0 Kernel: 2.6.26-2-xen-amd64 Packages and Versions: lvm2: 2.02.39-7 drbd8-modules-2.6.26-2-xen-amd64: 2.6.26+8.0.14-6+lenny1 drbd8-utils: 2:8.0.14-2 Commands: h1:~# pvcreate /dev/drbd0 Physical volume /dev/drbd0 successfully created h1:~# vgcreate vg_drbd /dev/drbd0 Volume group vg_drbd successfully created h1:~# lvcreate -n lv_drbd -L 1G vg_drbd device-mapper: reload ioctl failed: Invalid argument Aborting. Failed to activate new LV to wipe the start of it. Best Regards, David Heidt -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#533436: [lvm2] Unable to use use LVM with DRBD block devices as PV
Package: lvm2 Version: 2.02.44-3 Severity: normal --- Please enter the report below this line. --- I was unable to use a DRBD block device as a PV on an LVM-based system. See the following commands: debian1:~# pvcreate /dev/drbd0 Physical volume /dev/drbd0 successfully created debian1:~# vgcreate replicated /dev/drbd0 Volume group replicated successfully created debian1:~# lvcreate --name foo --size 4G replicated device-mapper: reload ioctl failed: Invalid argument Aborting. Failed to activate new LV to wipe the start of it. debian1:~# tail /var/log/syslog -n 2 Jun 17 15:50:13 debian1 kernel: [ 2108.509080] device-mapper: table: 254:3: linear: dm-linear: Device lookup failed Jun 17 15:50:13 debian1 kernel: [ 2108.509086] device-mapper: ioctl: error adding target to table At this time there is no /dev/replicated VG. After I removed the DRBD block device and formatted it in ext3 to exclude any problem with the DRBD block device: debian1:~# vgremove replicated Volume group replicated successfully removed debian1:~# pvremove /dev/drbd0 Labels on physical volume /dev/drbd0 successfully wiped debian1:~# mkfs.ext3 /dev/drbd0 [...] debian1:~# mount /dev/drbd0 /test --- System information. --- Architecture: amd64 Kernel: Linux 2.6.29-2-amd64 -- Laurent Léonard signature.asc Description: This is a digitally signed message part.