master - pvcreate: don't support unpartitioned DASD devices with CDL formatted
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=729f489009b4dfc8488265bc64414edcfeae0755 Commit: 729f489009b4dfc8488265bc64414edcfeae0755 Parent: 5d76bdcdbdf6bef81872e8eef2cce156cfce228f Author: Lidong Zhong <[email protected]> AuthorDate: Mon Oct 12 15:09:11 2015 +0800 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Oct 27 11:42:47 2015 +0100
pvcreate: don't support unpartitioned DASD devices with CDL formatted
The former patch(dab3ebce4c7) is a little bit strict. For example, it is OK to create PV on unpartitioned DASD devices with LDL formatted. So after lvm version containing the patch, LVs created on those devices could not be found.
Signed-off-by Lidong Zhong <[email protected]>
--- WHATS_NEW | 1 + lib/Makefile.in | 1 + lib/device/dev-dasd.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ lib/device/dev-type.c | 2 +- lib/device/dev-type.h | 1 + 5 files changed, 78 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.133 - ====================================== + Do not support unpartitioned DASD devices with CDL formatted with pvcreate. For thins use flush for suspend only when volume size is reduced. Enable code which detects the need of flush during suspend. Ensure --use-policy will resize volume to fit below threshold.
lib/Makefile.in +1 -0
@@ -62,6 +62,7 @@ SOURCES =\ device/dev-swap.c \ device/dev-type.c \ device/dev-luks.c \ + device/dev-dasd.c \ display/display.c \ error/errseg.c \ unknown/unknown.c \
lib/device/dev-dasd.c new file +74 -0
74 lines not on this page · raw message
lib/device/dev-type.c +1 -1
@@ -363,7 +363,7 @@ static int _native_dev_is_partitioned(struct dev_types *dt, struct device *dev)return 0 ;/* Unpartitioned DASD devices are not supported. */ -if (MAJOR (dev->dev) == dt->dasd_major) +if ((MAJOR (dev->dev) == dt->dasd_major) &&dasd_is_cdl_formatted (dev))return 1 ;if (!dev_open_readonly_quiet (dev)) {
lib/device/dev-type.h +1 -0
@@ -59,6 +59,7 @@ int major_is_scsi_device(struct dev_types *dt, int major);int dev_is_md (struct device *dev,uint64_t *sb);int dev_is_swap (struct device *dev,uint64_t *signature);int dev_is_luks (struct device *dev,uint64_t *signature); +int dasd_is_cdl_formatted (struct device *dev);/* Signature wiping. */ #define TYPE_LVM1_MEMBER 0x001