summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-05-19 03:40:31 +0000
committerJeremy Katz <katzj@redhat.com>2004-05-19 03:40:31 +0000
commit4f4a93c00fe2e46c9901895d58ddcff1ad2e5736 (patch)
tree5b9273dd5297235d42a7f91fbfc38206fc5c4faf
parent63c6b2666ff7fd9b064bb867225c12daae0af149 (diff)
downloadanaconda-4f4a93c00fe2e46c9901895d58ddcff1ad2e5736.tar.gz
anaconda-4f4a93c00fe2e46c9901895d58ddcff1ad2e5736.tar.xz
anaconda-4f4a93c00fe2e46c9901895d58ddcff1ad2e5736.zip
this should add raid6 support (#122360)
-rw-r--r--fsset.py2
-rw-r--r--kickstart.py2
-rw-r--r--raid.py13
-rw-r--r--scripts/mk-images.i3862
-rw-r--r--scripts/mk-images.ia642
-rw-r--r--scripts/mk-images.ppc2
-rw-r--r--scripts/mk-images.s3902
-rw-r--r--scripts/mk-images.x86_642
8 files changed, 20 insertions, 7 deletions
diff --git a/fsset.py b/fsset.py
index 6b1d12586..1fb8ffe8d 100644
--- a/fsset.py
+++ b/fsset.py
@@ -49,7 +49,7 @@ fileSystemTypes = {}
# XXX define availraidlevels and defaultmntpts as arch characteristics
# FIXME: this should be done dynamically by reading /proc/mdstat
-availRaidLevels = ['RAID0', 'RAID1', 'RAID5']
+availRaidLevels = ['RAID0', 'RAID1', 'RAID5', 'RAID6']
def fileSystemTypeGetDefault():
if fileSystemTypeGet('ext3').isSupported():
diff --git a/kickstart.py b/kickstart.py
index 0f24545c6..dab46684f 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -1082,6 +1082,8 @@ class KickstartBase(BaseInstallClass):
level = "RAID1"
elif raid.isRaid5(level):
level = "RAID5"
+ elif raid.isRaid6(level):
+ level = "RAID6"
if not level and preexist == 0:
raise KickstartValueError, "RAID Partition defined without RAID level"
diff --git a/raid.py b/raid.py
index d489f5409..c0b616763 100644
--- a/raid.py
+++ b/raid.py
@@ -115,6 +115,15 @@ def stopAllRaid(mdList):
for dev, devices, level, numActive in mdList:
isys.raidstop(dev)
+def isRaid6(raidlevel):
+ """Return whether raidlevel is a valid descriptor of RAID6."""
+ if raidlevel == "RAID6":
+ return 1
+ elif raidlevel == 6:
+ return 1
+ elif raidlevel == "6":
+ return 1
+ return 0
def isRaid5(raidlevel):
"""Return whether raidlevel is a valid descriptor of RAID5."""
@@ -154,6 +163,8 @@ def get_raid_min_members(raidlevel):
return 2
elif isRaid5(raidlevel):
return 3
+ elif isRaid6(raidlevel):
+ return 4
else:
raise ValueError, "invalid raidlevel in get_raid_min_members"
@@ -161,7 +172,7 @@ def get_raid_max_spares(raidlevel, nummembers):
"""Return the maximum number of raid spares for raidlevel."""
if isRaid0(raidlevel):
return 0
- elif isRaid1(raidlevel) or isRaid5(raidlevel):
+ elif isRaid1(raidlevel) or isRaid5(raidlevel) or isRaid6(raidlevel):
return max(0, nummembers - get_raid_min_members(raidlevel))
else:
raise ValueError, "invalid raidlevel in get_raid_max_spares"
diff --git a/scripts/mk-images.i386 b/scripts/mk-images.i386
index 0e24e8f68..c7b9974fe 100644
--- a/scripts/mk-images.i386
+++ b/scripts/mk-images.i386
@@ -69,7 +69,7 @@ IDEMODS="cdrom ide-cd"
SCSIMODS="cdrom scsi_mod sd_mod sg sr_mod st"
FSMODS="fat msdos vfat ext3 reiserfs jfs xfs"
-SECSTAGE="agpgart md raid0 raid1 raid5 dm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport"
+SECSTAGE="agpgart md raid0 raid1 raid5 raid6 dm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport"
BTERMMODULES="vga16fb vgastate"
COMMONMODULES="fat vfat nfs sunrpc lockd floppy cramfs loop $USBMODS $BTERMMODULES"
diff --git a/scripts/mk-images.ia64 b/scripts/mk-images.ia64
index fc6f01713..b1b731e2b 100644
--- a/scripts/mk-images.ia64
+++ b/scripts/mk-images.ia64
@@ -6,7 +6,7 @@ LATEUSBMODS="mousedev"
BTERMMODULES="vga16fb"
COMMONMODULES="nfs fat vfat cramfs loop floppy $BTERMMODULES"
FSMODS="msdos vfat ext3 reiserfs jfs xfs"
-SECSTAGE="nfs fat vfat md raid0 raid1 raid5 dm-mod $FSMODS $LATEUSBMODS"
+SECSTAGE="nfs fat vfat md raid0 raid1 raid5 raid6 dm-mod $FSMODS $LATEUSBMODS"
NETMODULES="3c59x acenic bcm5700 e100 e1000 eepro100 hamachi sk98lin starfire sunhme tulip yellowfin tg3"
SCSIMODULES="sd_mod sg sr_mod st scsi_mod DAC960 cciss cpqarray aic7xxx aic7xxx_mod megaraid qla1280 qla2200 qla2300 sym53c8xx sym53c8xx_2 mptscsih mptbase ips"
IDEMODULES="ide-mod ide-probe-mod ide-disk ide-cd"
diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc
index 22b0500c5..3e8a1ea13 100644
--- a/scripts/mk-images.ppc
+++ b/scripts/mk-images.ppc
@@ -4,7 +4,7 @@ IDEMODS="ide-cd"
SCSIMODS="sd_mod sg sr_mod st"
USBMODS="ohci-hcd uhci-hcd hid usb-storage sd_mod sr_mod"
LATEUSBMODS="mousedev usb-storage"
-SECSTAGE="md raid0 raid1 raid5 dm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS"
+SECSTAGE="md raid0 raid1 raid5 raid6 dm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS"
NETMODULES="sungem tg3 ne2k-pci 3c59x 8139too olympic
de4x5 acenic pcnet32 tulip natsemi e100 e1000 airport"
diff --git a/scripts/mk-images.s390 b/scripts/mk-images.s390
index 024f734b8..1bf401864 100644
--- a/scripts/mk-images.s390
+++ b/scripts/mk-images.s390
@@ -12,7 +12,7 @@ IDEMODS=""
SCSIMODS=""
FSMODS="vfat msdos ext3 reiserfs jfs xfs"
-SECSTAGE="$IDEMODS $SCSIMODS $FSMODS md raid0 raid1 raid5 dm-mod"
+SECSTAGE="$IDEMODS $SCSIMODS $FSMODS md raid0 raid1 raid5 raid6 dm-mod"
DASDMODS=" dasd_diag_mod dasd_eckd_mod dasd_fba_mod dasd_mod"
COMMONMODULES="loop cramfs tape390 isofs $DASDMODS"
LOCALMODULES="$COMMONMODULES tape390 $IDEMODS $SCSIMODS"
diff --git a/scripts/mk-images.x86_64 b/scripts/mk-images.x86_64
index 38ebcc63e..b05257ae6 100644
--- a/scripts/mk-images.x86_64
+++ b/scripts/mk-images.x86_64
@@ -42,7 +42,7 @@ IDEMODS="ide-cd"
SCSIMODS="sd_mod sg sr_mod st"
FSMODS="msdos vfat ext3 reiserfs jfs xfs"
-SECSTAGE="agpgart md raid0 raid1 raid5 dm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport"
+SECSTAGE="agpgart md raid0 raid1 raid5 raid6 dm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport"
BTERMMODULES="vga16fb"
COMMONMODULES="vfat loop cramfs floppy $USBMODS $BTERMMODULES"