[rhel6-branch] Detect and show a warning for LDL DASDs. (#1144979)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Tue Dec 23 20:21:40 UTC 2014
Check if any of the DASDs on an s390x system are LDL formatted. If they
are, show a warning to users and give them the option to run dasdfmt
against them, which will (re-)format them as CDL DASDs.
Resolves: rhbz#1144979
---
installinterfacebase.py | 4 ++--
storage/dasd.py | 21 +++++++++++++++------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/installinterfacebase.py b/installinterfacebase.py
index d4f20fa..6d454e0 100644
--- a/installinterfacebase.py
+++ b/installinterfacebase.py
@@ -80,12 +80,12 @@ class InstallInterfaceBase(object):
title = P_("Unformatted DASD Device Found",
"Unformatted DASD Devices Found", c)
msg = P_("Format uninitialized DASD device?\n\n"
- "There is %d uninitialized DASD device on this "
+ "There is %d uninitialized or LDL DASD device on this "
"system. To continue installation, the device must "
"be formatted. Formatting will remove any data on "
"this device." % c,
"Format uninitialized DASD devices?\n\n"
- "There are %d uninitialized DASD devices on this "
+ "There are %d uninitialized or LDL DASD devices on this "
"system. To continue installation, the devices must "
"be formatted. Formatting will remove any data on "
"these devices." % c,
diff --git a/storage/dasd.py b/storage/dasd.py
index 3a20b16..1576048 100644
--- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -20,6 +20,7 @@
#
import iutil
+import isys
import sys
import os
from storage.errors import DasdFormatError
@@ -59,6 +60,9 @@ class DASD:
def startup(self, intf, exclusiveDisks, zeroMbr):
""" Look for any unformatted DASDs in the system and offer the user
the option for format them with dasdfmt or exit the installer.
+
+ Also check if any DASDs are LDL formatted and show a warning to
+ users, since these disks will not be usable during installation.
"""
if self.started:
return
@@ -73,7 +77,7 @@ class DASD:
# Trigger udev data about the dasd devices on the system
udev_trigger(action="change", name="dasd*")
- log.info("Checking for unformatted DASD devices:")
+ log.info("Checking for unformatted and LDL DASD devices:")
for device in os.listdir("/sys/block"):
if not device.startswith("dasd"):
@@ -87,18 +91,23 @@ class DASD:
status = f.read().strip()
f.close()
- if status in ["unformatted"] and device not in exclusiveDisks:
- bypath = deviceNameToDiskByPath(device)
- if not bypath:
- bypath = "/dev/" + device
+ bypath = deviceNameToDiskByPath(device)
+ if not bypath:
+ bypath = "/dev/" + device
+ if status in ["unformatted"] and device not in exclusiveDisks:
log.info(" %s (%s) status is %s, needs dasdfmt" % (device,
bypath,
status,))
self._dasdlist.append((device, bypath))
+ elif isys.isLdlDasd(device):
+ log.info(" %s (%s) is an LDL DASD, needs dasdfmt" % (device,
+ bypath))
+ self._dasdlist.append((device, bypath))
+
if not len(self._dasdlist):
- log.info(" no unformatted DASD devices found")
+ log.info(" no unformatted or LDL DASD devices found")
return
askUser = True
--
1.9.3
More information about the anaconda-patches
mailing list