From: Milan Broz Date: Wed, 25 Feb 2009 23:31:06 +0000 (+0000) Subject: pe_start can be overwritten in VG metadata, so it is not PV label-only field. X-Git-Tag: old-v2_02_45~8 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=d0b99cb26078bd64fd049734647bfc00cb1ede25;p=lvm2.git pe_start can be overwritten in VG metadata, so it is not PV label-only field. --- diff --git a/lib/report/columns.h b/lib/report/columns.h index 18c83faba..b731ff9e0 100644 --- a/lib/report/columns.h +++ b/lib/report/columns.h @@ -41,11 +41,11 @@ FIELD(LVS, lv, STR, "Modules", lvid, 7, modules, "modules", "Kernel device-mappe FIELD(LABEL, pv, STR, "Fmt", id, 3, pvfmt, "pv_fmt", "Type of metadata.") FIELD(LABEL, pv, STR, "PV UUID", id, 38, uuid, "pv_uuid", "Unique identifier.") FIELD(LABEL, pv, NUM, "DevSize", dev, 7, devsize, "dev_size", "Size of underlying device in current units.") -FIELD(LABEL, pv, NUM, "1st PE", pe_start, 7, size64, "pe_start", "Offset to the start of data on the underlying device.") FIELD(LABEL, pv, STR, "PV", dev, 10, dev_name, "pv_name", "Name.") FIELD(LABEL, pv, NUM, "PMdaFree", id, 9, pvmdafree, "pv_mda_free", "Free metadata area space on this device in current units.") FIELD(LABEL, pv, NUM, "PMdaSize", id, 9, pvmdasize, "pv_mda_size", "Size of smallest metadata area on this device in current units.") +FIELD(PVS, pv, NUM, "1st PE", pe_start, 7, size64, "pe_start", "Offset to the start of data on the underlying device.") FIELD(PVS, pv, NUM, "PSize", id, 5, pvsize, "pv_size", "Size of PV in current units.") FIELD(PVS, pv, NUM, "PFree", id, 5, pvfree, "pv_free", "Total amount of unallocated space in current units.") FIELD(PVS, pv, NUM, "Used", id, 4, pvused, "pv_used", "Total amount of allocated space in current units.") diff --git a/test/t-pvcreate-usage.sh b/test/t-pvcreate-usage.sh index 5f9021118..dc4537e90 100755 --- a/test/t-pvcreate-usage.sh +++ b/test/t-pvcreate-usage.sh @@ -118,9 +118,6 @@ vgcreate $vg $dev1 $dev2 vgcfgbackup -f "$(pwd)/backup.$$" $vg sed 's/pe_start = [0-9]*/pe_start = 0/' "$(pwd)/backup.$$" > "$(pwd)/backup.$$1" vgcfgrestore -f "$(pwd)/backup.$$1" $vg - -# BUG! this one fails, because now we read only label and vgcfgrestore does -# not fix pe_start in label and there is no text metadta on this PV -#check_pv_field_ $dev1 pe_start 0 -#check_pv_field_ $dev2 pe_start 0 +check_pv_field_ $dev1 pe_start 0 +check_pv_field_ $dev2 pe_start 0 vgremove $vg