Re: [PATCH 3/3] Add dracutSetupData() method to DASDDevice (#526354).

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 13 Oct 2009, Steffen Maier wrote:

Before committing this, we should come to a conclusion with Harald on
how dracut would parse and handle these.

On 10/13/2009 03:51 AM, David Cantrell wrote:
Return kernel parameter information for the DASD.
---
 storage/devices.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 7d31b26..e404e9c 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -3161,6 +3161,15 @@ class DASDDevice(DiskDevice):
         self.opts = kwargs.get('opts')
         DiskDevice.__init__(self, device, kwargs)

+    def dracutSetupString(self):
+        arg = "dasd=%s" % (self.busid,)

"dasd" or "DASD" is already a kernel parameter and also parameter of the
dasd_mod kernel module. In order to avoid funny coincidences because of
the same option name, we should choose another name here. Since it is a
dracut parameter, it would typically start with "rd_". Harald already
renamed the former "DASD" dracut parameter to "rd_DASD". But that's the
one containing the global string recognized by the kernel or dasd_mod. I
would suggest to Harald to rename it once more to something like
"rd_DASD_MOD" to indicate its usage and semantics.

Here, we speak about a new dracut parameter for activating exactly one
DASD and potentially configuring some of its sysfs attributes. "rd_DASD"
sounds good to me and would also be consistent with "rd_ZFCP" for
configuring single zFCP LUNs.

+        opts = ":".join(filter(lambda s: self.opts[s], self.opts.keys()))

I'm not sure, if we want to inherit the syntax of the kernel parameter.
With this new dracut parameter we are free to choose any user-friendly
flexible syntax which dracut can easily parse. For zFCP we have
"rd_ZFCP=<HBA-busid>,<WWPN>,<LUN>". Basically we just want to append any
arbitrary number of name-value-pairs to write to sysfs attributes. Just
like we do with the "OPTIONS='layer2=1 portno=0'" option in network
ifcfg files. Putting all this together, I was thinking of something like
the following:
rd_DASD=0.0.beef,readonly=0,use_diag=0

This is fine, I'll talk to Harald.

+
+        if opts:
+            arg += "(" + opts + ")"
+
+        return arg
+

 class NFSDevice(StorageDevice, NetworkStorageDevice):
     """ An NFS device """

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrU53kACgkQ5hsjjIy1VkmULwCgpw1+wLdw1z1nOZ8KzbYn7Vx2
7OMAoKjbI2N+V/7OmoecVr3q2gOmVBgb
=Vp8z
-----END PGP SIGNATURE-----
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux