[lvm-devel] [PATCH] pvcreate: check the label after writing

Zdenek Kabelac zkabelac at redhat.com
Thu Sep 25 07:52:06 UTC 2014


Dne 25.9.2014 v 04:20 Lidong Zhong napsal(a):
> Some device will place metadata area at the beginning part and writing
> label may fail.Take our test for example, when running pvcreate on a CDL
> formatted DASD device(without partition), it shows successfully create
> a pv, but the label is not written on the second sector and pvs shows
> nothing. Although it is not supposed to run lvm on dasd device, it's a
> friendly behavior to check the label and return error if it fails.

Hmm - if device drive tells you - it has accepted and written some bytes
on your storage device - they really should be written there.

So IMHO driver should not lie and reject write request with error ?

Otherwise you would need to validate every single written byte by LVM ?

Maybe DASD devices should by automatically ignored by lvm filtering
as unusable device for PV  (just like i.e. too small devices)

Zdenek




More information about the lvm-devel mailing list