Discussion:
[linux-lvm] pvs -a on a partition of ZFS block device
alessandro macuz
2014-06-10 18:44:47 UTC
Permalink
Hi all,

the goal is to mount a LVM volume that is contained in a 8e partition of a
zvol device.

Since we speak about a production system I stated from the basic and I
wanted to see if pvs would recognize the partition. No luck.

***@server02:/mnt# pvs -a /dev/zd1168p2
Failed to read physical volume "/dev/zd1168p2"

but on the other way on the same system I get

***@server02:/mnt# pvs -a /dev/sdb2
PV VG Fmt Attr PSize PFree
/dev/sdb2 vgserver01 lvm2 a- 464.83g 432.82g

The only difference I can see between the 2 is the major number

***@server02:/mnt# ls -la /dev/zd1168p2
brw-rw---- 1 root disk 230, 1170 Jun 10 19:56 /dev/zd1168p2

and

***@server02:/mnt# ls -la /dev/sdb2
brw-rw---- 1 root disk 8, 18 Feb 11 10:43 /dev/sdb2

Is it an expected behaviour that I pvs doesn't recognize "physical device"
within ZFS block devices?

Thanks, Alex
Oliver Rath
2014-06-11 07:53:28 UTC
Permalink
Hi Alex,

Im not sure if I understand right: You take a zfv-Volume to create a lvm
volume inside? Make it sense to mix two similar concepts in this way?
Imho zfs and lvm are focussed to different goals, so if you combine it,
you get the worse of both.

What is your goal mixing these concepts? If you have created a
zfs-volume, you can mount it directly without detouring over lvm and
vice versa.

I think it is much better to decide for one of these (zfs-volumes XOR
lvm-Volumes) depending on your needs.

Just my 2ct

Regards
Oliver
Post by alessandro macuz
Hi all,
the goal is to mount a LVM volume that is contained in a 8e partition
of a zvol device.
Since we speak about a production system I stated from the basic and I
wanted to see if pvs would recognize the partition. No luck.
Failed to read physical volume "/dev/zd1168p2"
but on the other way on the same system I get
PV VG Fmt Attr PSize PFree
/dev/sdb2 vgserver01 lvm2 a- 464.83g 432.82g
The only difference I can see between the 2 is the major number
brw-rw---- 1 root disk 230, 1170 Jun 10 19:56 /dev/zd1168p2
and
brw-rw---- 1 root disk 8, 18 Feb 11 10:43 /dev/sdb2
Is it an expected behaviour that I pvs doesn't recognize "physical
device" within ZFS block devices?
Thanks, Alex
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
alessandro macuz
2014-06-11 08:43:43 UTC
Permalink
Post by Oliver Rath
Hi Alex,
Im not sure if I understand right: You take a zfv-Volume to create a lvm
volume inside? Make it sense to mix two similar concepts in this way? Imho
zfs and lvm are focussed to different goals, so if you combine it, you get
the worse of both.
What is your goal mixing these concepts? If you have created a zfs-volume,
you can mount it directly without detouring over lvm and vice versa.
I think it is much better to decide for one of these (zfs-volumes XOR
lvm-Volumes) depending on your needs.
Just my 2ct
Regards
Oliver
Hi Oliver,

I see and back your point since the flexibility given by LVM can be
obtained with ZFS as well.
In this case I'm not trying to achieve anything but rather dealing with
something already existing and without making too many changes I'd like to
access that volume. I think my reasoning is correct but somehow I see
something non-expected. I thought I could use pvs, and lvs later on, on any
block device as for any physical disks.

Maybe pvs is coded to work only with some devices on purpose, I haven't
looked at the source. I don't think what I'm doing is wrong in theory and I
would like to know if instead, from the theoretically point of view, it is.

Thanks, Alex
Zdenek Kabelac
2014-06-11 09:33:22 UTC
Permalink
Post by Oliver Rath
Hi Alex,
Im not sure if I understand right: You take a zfv-Volume to create a lvm
volume inside? Make it sense to mix two similar concepts in this way? Imho
zfs and lvm are focussed to different goals, so if you combine it, you get
the worse of both.
What is your goal mixing these concepts? If you have created a zfs-volume,
you can mount it directly without detouring over lvm and vice versa.
I think it is much better to decide for one of these (zfs-volumes XOR
lvm-Volumes) depending on your needs.
Just my 2ct
Regards
Oliver
Hi Oliver,
I see and back your point since the flexibility given by LVM can be obtained
with ZFS as well.
In this case I'm not trying to achieve anything but rather dealing with
something already existing and without making too many changes I'd like to
access that volume. I think my reasoning is correct but somehow I see
something non-expected. I thought I could use pvs, and lvs later on, on any
block device as for any physical disks.
Maybe pvs is coded to work only with some devices on purpose, I haven't looked
at the source. I don't think what I'm doing is wrong in theory and I would
like to know if instead, from the theoretically point of view, it is.
Thanks, Alex
Support for ZFS partitions has been embedded into 2.02.106 lvm2 version.
You may as well add it to older version of lvm2 by updating your lvm.conf

https://bugzilla.redhat.com/show_bug.cgi?id=913597


You can add the following to your /etc/lvm.conf devices section to solve the
issue:

types = [ "zvol", 16 ]

Zdenek
alessandro macuz
2014-06-11 10:11:35 UTC
Permalink
Post by Zdenek Kabelac
Post by Oliver Rath
Hi Alex,
Im not sure if I understand right: You take a zfv-Volume to create a lvm
volume inside? Make it sense to mix two similar concepts in this way? Imho
zfs and lvm are focussed to different goals, so if you combine it, you get
the worse of both.
What is your goal mixing these concepts? If you have created a zfs-volume,
you can mount it directly without detouring over lvm and vice versa.
I think it is much better to decide for one of these (zfs-volumes XOR
lvm-Volumes) depending on your needs.
Just my 2ct
Regards
Oliver
Hi Oliver,
I see and back your point since the flexibility given by LVM can be obtained
with ZFS as well.
In this case I'm not trying to achieve anything but rather dealing with
something already existing and without making too many changes I'd like to
access that volume. I think my reasoning is correct but somehow I see
something non-expected. I thought I could use pvs, and lvs later on, on any
block device as for any physical disks.
Maybe pvs is coded to work only with some devices on purpose, I haven't looked
at the source. I don't think what I'm doing is wrong in theory and I would
like to know if instead, from the theoretically point of view, it is.
Thanks, Alex
Support for ZFS partitions has been embedded into 2.02.106 lvm2 version.
You may as well add it to older version of lvm2 by updating your lvm.conf
https://bugzilla.redhat.com/show_bug.cgi?id=913597
You can add the following to your /etc/lvm.conf devices section to solve
types = [ "zvol", 16 ]
Thanks Zdenek,

it works !

Alessandro

Loading...