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

tuning raid filsystems



For Core 4 I patched it to allow kickstart installs the ability to tune 
inode denisity on raid volumes. It was pretty much cut-and-past from the 
existing partion and lolvol routines.

Hacking anaconda after the fact was no fun. So hopefully this idea will be 
received upstream. It tried my patch against HEAD but alas, the kickstart 
file parser has left anaconda and evolved.

The solution was to remove the kickstart hunks and write a new patch for 
pykickstart. Both patches are below; and *untested* if someone doing 
active testing would like to add them to their test cases.

../C


diff -urN anaconda-10.2.1.5.orig/docs/kickstart-docs.txt anaconda-10.2.1.5/docs/kickstart-docs.txt
--- anaconda-10.2.1.5.orig/docs/kickstart-docs.txt	2005-04-27 13:12:56.000000000 -0700
+++ anaconda-10.2.1.5/docs/kickstart-docs.txt	2005-06-16 22:12:50.000000000 -0700
@@ -996,6 +996,12 @@
            /etc/fstab file of the installed system and should be enclosed
            in quotes.
 
+       --bytes-per-inode=
+
+           Specifies the size of inodes on the filesystem to be made on
+           the raid array.  Not all filesystems support this option, so it
+           is silently ignored for those cases.
+
        --noformat
 
            Use an existing RAID device and do not format the RAID array.
diff -urN anaconda-10.2.1.5.orig/partRequests.py anaconda-10.2.1.5/partRequests.py
--- anaconda-10.2.1.5.orig/partRequests.py	2005-05-03 14:21:58.000000000 -0700
+++ anaconda-10.2.1.5/partRequests.py	2005-06-16 22:07:05.000000000 -0700
@@ -560,6 +560,7 @@
     def __init__(self, fstype, format = None, mountpoint = None,
                  raidlevel = None, raidmembers = None,
                  raidspares = None, raidminor = None,
+                 bytesPerInode = 4096,
 		 preexist = 0, chunksize = None):
         """Create a new RaidRequestSpec object.
 
@@ -571,6 +572,7 @@
         raidmembers is list of ids corresponding to the members of the RAID.
         raidspares is the number of spares to setup.
         raidminor is the minor of the device which should be used.
+        bytesPerInode is the size of the inodes on the filesystem.
         """
 
         # if it's preexisting, the original fstype should be set
@@ -581,6 +583,7 @@
 
         RequestSpec.__init__(self, fstype = fstype, format = format,
                              mountpoint = mountpoint, preexist = preexist,
+                             bytesPerInode = bytesPerInode,
                              origfstype = origfs)
         self.type = REQUEST_RAID
         
@@ -603,10 +606,12 @@
                 
         str = ("RAID Request -- mountpoint: %(mount)s  uniqueID: %(id)s\n"
                "  type: %(fstype)s  format: %(format)s  badblocks: %(bb)s\n"
+               "  bytesPerInode: %(bytesPerInode)s\n"
                "  raidlevel: %(level)s  raidspares: %(spares)s\n"
                "  raidmembers: %(members)s" % 
                {"mount": self.mountpoint, "id": self.uniqueID,
                 "fstype": fsname, "format": self.format, "bb": self.badblocks,
+                "bytesPerInode": self.bytesPerInode,
                 "level": self.raidlevel, "spares": self.raidspares,
                 "members": self.raidmembers})
         return str


--- pykickstart-0.9/pykickstart/parser.py.raid-inodes	2005-11-16 16:52:56.000000000 -0800
+++ pykickstart-0.9/pykickstart/parser.py	2005-12-05 05:04:32.000000000 -0800
@@ -601,6 +601,8 @@
                 parser.values.ensure_value(option.dest, "RAID6")
 
         op = KSOptionParser(lineno=self.lineno)
+        op.add_option("--bytes-per-inode", dest="bytesPerInode", action="store",
+                      type="int", nargs=1)
         op.add_option("--device", action="callback", callback=device_cb,
                       dest="device", type="string", nargs=1, required=1)
         op.add_option("--fsoptions", dest="fsopts")
--- pykickstart-0.9/pykickstart/data.py.raid-inodes	2005-11-03 13:07:54.000000000 -0800
+++ pykickstart-0.9/pykickstart/data.py	2005-12-05 05:14:43.000000000 -0800
@@ -126,6 +126,7 @@
 
 class KickstartRaidData:
     def __init__ (self):
+        self.bytesPerInode = 4096
         self.device = ""
         self.fsopts = ""
         self.fstype = ""
--- pykickstart-0.9/pykickstart/writer.py.raid-inodes	2005-11-01 19:21:31.000000000 -0800
+++ pykickstart-0.9/pykickstart/writer.py	2005-12-05 05:10:43.000000000 -0800
@@ -359,6 +359,8 @@
         for raid in self.ksdata.raidList:
             str = str + "raid %s" % raid.mountpoint
 
+            if raid.bytesPerInode != 0:
+                str = str + " --bytes-per-inode=%d" % raid.bytesPerInode
             if raid.device != "":
                 str = str + " --device=%s" % raid.device
             if raid.fsopts != "":


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