[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#815916: marked as done (Failure to create empty partition table on s390 DASD)



Your message dated Wed, 16 Nov 2016 09:21:00 +0000
with message-id <E1c6wOq-0009zt-9R@fasolo.debian.org>
and subject line Bug#815916: fixed in partman-partitioning 114
has caused the Debian Bug report #815916,
regarding Failure to create empty partition table on s390 DASD
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
815916: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815916
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: partman-partitioning
Version: 111
Severity: important
Tags: d-i patch
X-Debbugs-CC: debian-s390@lists.debian.org, brueckner@linux.vnet.ibm.com

Dear Maintainer,

when I try to create an empty partition table on a DASD, the
partitioning code instructs parted to write an msdos label instead of a
dasd label to the disk. This is effectively destroying the volume
metadata rendering the disk unusable. The disk can only be recovered by
low level formatting.

This is caused by the default label determination logic in
partman-partitioning/lib/disk-label.sh which only uses the architecture
to decide which default label to use.
We can't switch that unconditionally to dasd, because we would break
SCSI (and most of virtio) partitioning.

The suggested patches make sure the disk type is respected and the
appropriate label type is used:
Patch 1 is for d-i/partman-base and stores the disk label type in
/var/lib/partman/devices/<DISK>/label, which will be dasd for natively
attached DASDs as well as virtio attached DASDs in KVM.
Patch 2 is a change in d-i/partman-partitioning and uses the stored
label type to determine the proper partition table format (only when
executing on s390).

Thanks for your consideration.

-- 

Kind Regards
   Viktor Mihajlovski

>From 6d71c4fb3eb679a5df4e1aa3028f0e6d6ec5df19 Mon Sep 17 00:00:00 2001
From: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Date: Tue, 23 Feb 2016 15:23:21 +0100
Subject: [PATCH] parted_devices: Add disk label type to device directory

At least for s390 the default disk label type is device
dependent. We record the current disk label type in the
/var/lib/partman/devices/<DEV> for later retrieval.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
---
 init.d/parted    | 2 ++
 parted_devices.c | 7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/init.d/parted b/init.d/parted
index 81cdafc..6f96b07 100755
--- a/init.d/parted
+++ b/init.d/parted
@@ -87,6 +87,7 @@ if [ ! -f /var/run/parted_server.pid ]; then
 		device=$1
 		size=$2
 		model=$3
+		label=$4
 
 		# Skip mtd (not supported by parted) and mmcblk odities
 		case "${device#/dev/}" in
@@ -130,6 +131,7 @@ if [ ! -f /var/run/parted_server.pid ]; then
 		printf "%s" "$device" >$dev/device
 		printf "%s" "$size" >$dev/size
 		printf "%s" "$model" >$dev/model
+		printf "%s" "$label" >$dev/label
 
 		# Set the sataraid flag for dmraid arrays.
 		if type dmraid >/dev/null 2>&1 && \
diff --git a/parted_devices.c b/parted_devices.c
index de15355..4fc64c7 100644
--- a/parted_devices.c
+++ b/parted_devices.c
@@ -76,6 +76,7 @@ is_floppy(const char *path)
 void
 process_device(PedDevice *dev)
 {
+	PedDisk *disk;
 	if (dev->read_only)
 		return;
 	if (is_cdrom(dev->path) || is_floppy(dev->path))
@@ -84,10 +85,12 @@ process_device(PedDevice *dev)
 	if (strstr(dev->path, "/dev/ramzswap") != NULL ||
 	    strstr(dev->path, "/dev/zram") != NULL)
 		return;
-	printf("%s\t%lli\t%s\n",
+	disk = ped_disk_new(dev);
+	printf("%s\t%lli\t%s\t%s\n",
 	       dev->path,
 	       dev->length * dev->sector_size,
-	       dev->model);
+	       dev->model,
+	       disk->type->name ? disk->type->name : "unknown");
 }
 
 int
-- 
1.9.1

>From 38daa8b0d78607139aa66b225ae9c4ab04daf3be Mon Sep 17 00:00:00 2001
From: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Date: Tue, 23 Feb 2016 15:33:45 +0100
Subject: [PATCH] create_new_label: Use correct label for DASDs

Requires an updated partman-base. In case a disk is indentified
as DASD, make sure that the default disk label is "dasd".

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
---
 lib/disk-label.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/disk-label.sh b/lib/disk-label.sh
index b24f4a8..167f3c3 100644
--- a/lib/disk-label.sh
+++ b/lib/disk-label.sh
@@ -118,7 +118,13 @@ default_disk_label () {
 	    ppc64el)
 		echo gpt;;
 	    s390|s390x)
-		echo msdos;;
+		if [ -e ./label ]; then
+		    disklabel=$(cat label)
+		fi
+		if [ "$disklabel" != dasd ]; then
+		    disklabel=msdos
+		fi
+		echo $disklabel;;
 	    sh4)
 		echo msdos;;
 	    sparc|sparc64)
-- 
1.9.1


--- End Message ---
--- Begin Message ---
Source: partman-partitioning
Source-Version: 114

We believe that the bug you reported is fixed in the latest version of
partman-partitioning, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 815916@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated partman-partitioning package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 16 Nov 2016 06:47:57 +0100
Source: partman-partitioning
Binary: partman-partitioning
Architecture: source i386
Version: 114
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description:
 partman-partitioning - Partitioning operations for partman (udeb)
Closes: 815916
Changes:
 partman-partitioning (114) unstable; urgency=medium
 .
   [ Viktor Mihajlovski ]
   * In case a disk is identified as type=dasd, make sure to preserve
     this in the disk label. (Closes: #815916)
     Requires partman-base 190.
Checksums-Sha1:
 55b1f28ed758b2c23cabb1fdac3a5ef50d842c85 1680 partman-partitioning_114.dsc
 6de42f2519d84f8e7908d2ebc67dbe44d310c78a 175972 partman-partitioning_114.tar.xz
 a215a5e150ea4c13585e5357d3fdc2f486efecca 4596 partman-partitioning_114_20161116T074137z-f219f2d0.buildinfo
 d0befd640b7c59586f6cd6533643a3a4576d2830 189420 partman-partitioning_114_i386.udeb
Checksums-Sha256:
 79dfaef08d79375adcf254c8b2d22fe453896e5220d37fbb64c5a202a14233c7 1680 partman-partitioning_114.dsc
 adc6428127b8d6f8485a7a6e265a4ff2298b851d4fd0ffb805d804441e630cb8 175972 partman-partitioning_114.tar.xz
 3d31f1ff3760835e63a05e921e08350c53fc08cb87e6a9cfb702e14aa1a3a208 4596 partman-partitioning_114_20161116T074137z-f219f2d0.buildinfo
 7dd8ef3a9a07898d43c7d5611166b942fcb4110af02011c0d1a2021123b63314 189420 partman-partitioning_114_i386.udeb
Files:
 72fa9d67caa5123e99be6f04aebdf0f3 1680 debian-installer optional partman-partitioning_114.dsc
 c20eef15df5d4e32dd75558b61870d80 175972 debian-installer optional partman-partitioning_114.tar.xz
 f219f2d0f2681a32f8b077b9ddf214e5 4596 debian-installer optional partman-partitioning_114_20161116T074137z-f219f2d0.buildinfo
 a6c2a21068b6af95688fa635d2ee91ff 189420 debian-installer optional partman-partitioning_114_i386.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJYLA8uAAoJEIcvcCxNbiWob9MQAIcknJsicHwxO1+Nn+D0NlhR
2U/Gj0eNfgx0CacfNyAWB2o5vLCULi60ZU5vE9ao1C4Zg1TXhBKvHi3fEAdoknky
47dE2KtYePiQp7RXDeFmNsN7TpvYx4XopVKhLSZ6t5fjnP1R1C7YzmVKui+Z72sU
8y2CPU+hFD1ta8Ubywpd2yAZwhiNpDAgNYSvH4Bhg7Jng32i3Na5gZ0CCA9YxKSm
tcrYE9AA7wvmRBNH8Yy+LYF40tffJ0UCcOcKrLSCNnGyRAGkSP2NafTIORlybJPG
e5C5fKkr2Mo0q0sfyDebw6X5a7F/AGLejndyEle77HZq9UuEx1TG+wlC6ShapcQx
LIOsFh3PbZi01yy3s+MHr7hzo9cZnk4oazCzWHfsMhdtvW41B6i9KPD/ZD1vxJxK
XyH+4m2reD//84PDuULS928NgqBRXGvo/GOoubvBACr9rla5AQ1ro0PW3gAQDxy+
+FlBht75vKKeYtYh68LVhIhztTiobcBvZCtP5i2jZtzCSg/dBdyk9PgVewBSgYFI
0v3fVzftroYBR2+CPDVAqd0KZDBcEzSbuCnBeGUY0K346mAy/nsnqdwRjOrxy35P
u9OiWz7MhWJsm8Mv0dRtnoLRuFdhFAdmtBYHd51Wt4IOXRJyOLJ/S5CxI5Q5h9TB
VaY5sPl/W9IZcQIAHVq9
=wo8c
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: