* [linux-lvm] can't use LVM2 - "Failed to write physical volume"?
@ 2008-01-09 16:42 Tomasz Chmielewski
2008-01-10 12:12 ` [linux-lvm] can't use LVM2 - "Failed to write physical volume"? [SOLVED] Tomasz Chmielewski
0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Chmielewski @ 2008-01-09 16:42 UTC (permalink / raw)
To: LVM general discussion and development
It seems to me that for some reason it's not possible to create a
physical volume on a DRBD device. Below, we can see that running
"pvcreate" succeeds and than fails, then it succeeds again etc.:
# pvcreate -d -v /dev/drbd0
Set up physical volume for "/dev/drbd0" with 976544952 available
sectors
Zeroing start of device /dev/drbd0
Physical volume "/dev/drbd0" successfully created
# pvcreate -d -v /dev/drbd0
Wiping cache of LVM-capable devices
Set up physical volume for "/dev/drbd0" with 976544952 available
sectors
Zeroing start of device /dev/drbd0
Failed to write physical volume "/dev/drbd0"
# pvcreate -d -v /dev/drbd0
Set up physical volume for "/dev/drbd0" with 976544952 available
sectors
Zeroing start of device /dev/drbd0
Physical volume "/dev/drbd0" successfully created
Running vgcreate fails:
# vgcreate san2_data /dev/drbd0
No physical volume label read from /dev/drbd0
/dev/drbd0 not identified as an existing physical volume
Unable to add physical volume '/dev/drbd0' to volume group 'san2_data'.
This is the setup used:
encrypted /dev/sdb -> unencrypted /dev/mapper/san2_crypt -> partition
/dev/mapper/san2_crypt1 -> /dev/drbd0
I can create physical volume on /dev/mapper/san2_crypt2 (no DRBD) just fine.
The machine is running Debian Etch on a 2.6.23.12 kernel.
# lvm version
LVM version: 2.02.07 (2006-07-17)
Library version: 1.02.08 (2006-07-17)
Driver version: 4.11.0
I found a similar post, where DRBD wasn't used:
http://linux.derkeiler.com/Mailing-Lists/Ubuntu/2006-11/msg00414.html
Any clues why this happens?
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-lvm] can't use LVM2 - "Failed to write physical volume"? [SOLVED]
2008-01-09 16:42 [linux-lvm] can't use LVM2 - "Failed to write physical volume"? Tomasz Chmielewski
@ 2008-01-10 12:12 ` Tomasz Chmielewski
0 siblings, 0 replies; 2+ messages in thread
From: Tomasz Chmielewski @ 2008-01-10 12:12 UTC (permalink / raw)
To: LVM general discussion and development
Tomasz Chmielewski schrieb:
> It seems to me that for some reason it's not possible to create a
> physical volume on a DRBD device. Below, we can see that running
> "pvcreate" succeeds and than fails, then it succeeds again etc.:
>
> # pvcreate -d -v /dev/drbd0
> Set up physical volume for "/dev/drbd0" with 976544952 available
> sectors
> Zeroing start of device /dev/drbd0
> Physical volume "/dev/drbd0" successfully created
>
> # pvcreate -d -v /dev/drbd0
> Wiping cache of LVM-capable devices
> Set up physical volume for "/dev/drbd0" with 976544952 available
> sectors
> Zeroing start of device /dev/drbd0
> Failed to write physical volume "/dev/drbd0"
Looks like LVM doesn't like some raw devices?
I added a partition to /dev/drbd0 with fdisk.
Then, I added a drive mapping with kpartx.
It works fine now.
# kpartx -a -v /dev/drbd0
add map drbd0p1 : 0 976543092 linear /dev/drbd0 63
# pvcreate -d -v /dev/mapper/drbd0p1
Set up physical volume for "/dev/mapper/drbd0p1" with 976542708
available sectors
Zeroing start of device /dev/mapper/drbd0p1
Physical volume "/dev/mapper/drbd0p1" successfully created
Anyway, why does it fail if I want to set up LVM on raw DRBD device? A
bug or a feature?
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-10 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09 16:42 [linux-lvm] can't use LVM2 - "Failed to write physical volume"? Tomasz Chmielewski
2008-01-10 12:12 ` [linux-lvm] can't use LVM2 - "Failed to write physical volume"? [SOLVED] Tomasz Chmielewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).