PATCH 1/2 is the same as the previous attempt for the gfs support. However, the previous version had self.check set to 1 that caused problems on reboot because fsck.gfs failed. I believe 0 is the right value here.
PATCH 2/2 adds the unknownFileSystem class that allows us to just comment out the fstab lines with unknown (not supported) filesystem on upgrade. We could just copy such lines, but that may result in non-booting system, because of for example fsck problems (fsck for such filesystem may be not installed or whatever). Ending up in a shell during boot process is a lot worse then fixing the configuration from the running system with all utilities available.
-- Vratislav Podzimek
--- fsset.py | 30 ++++++++++++++++++++++++++++++ loader2/loader.c | 2 +- partitions.py | 6 +++--- scripts/mk-images | 2 +- scripts/upd-instroot | 5 +++-- 5 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/fsset.py b/fsset.py index e157519..9636003 100644 --- a/fsset.py +++ b/fsset.py @@ -539,6 +539,36 @@ class jfsFileSystem(FileSystemType):
fileSystemTypeRegister(jfsFileSystem())
+class gfsFileSystem(FileSystemType): + def __init__(self): + FileSystemType.__init__(self) + self.partedFileSystemType = None + self.formattable = 1 + self.checked = 0 + self.linuxnativefs = 1 + if flags.cmdline.has_key("gfs"): + self.supported = -1 + else: + self.supported = 0 + + self.name = "gfs" + self.packages = [ "gfs-utils" ] + + self.maxSizeMB = 8 * 1024 * 1024 + + def formatDevice(self, entry, progress, chroot='/'): + devicePath = entry.device.setupDevice(chroot) + rc = iutil.execWithRedirect("/usr/sbin/mkfs.gfs", + ["-j", "1", "-p", "lock_nolock", + "-O", devicePath], + stdout = "/dev/tty5", + stderr = "/dev/tty5") + + if rc: + raise SystemError + +fileSystemTypeRegister(gfsFileSystem()) + class gfs2FileSystem(FileSystemType): def __init__(self): FileSystemType.__init__(self) diff --git a/loader2/loader.c b/loader2/loader.c index 84e9088..b68601a 100644 --- a/loader2/loader.c +++ b/loader2/loader.c @@ -1810,7 +1810,7 @@ int main(int argc, char ** argv) { else if (FL_UPDATES(flags)) loadUpdates(&loaderData);
- mlLoadModuleSet("md:raid0:raid1:raid10:raid5:raid6:raid456:dm-raid45:fat:msdos:jbd2:crc16:ext4:jbd:ext3:lock_nolock:gfs2:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc:dm-crypt:dm-mem-cache:dm-region_hash:dm-message", modLoaded, modDeps, modInfo); + mlLoadModuleSet("md:raid0:raid1:raid10:raid5:raid6:raid456:dm-raid45:fat:msdos:jbd2:crc16:ext4:jbd:ext3:lock_nolock:gfs2:gfs:reiserfs:jfs:xfs:dm-mod:dm-zero:dm-mirror:dm-snapshot:dm-multipath:dm-round-robin:dm-emc:dm-crypt:dm-mem-cache:dm-region_hash:dm-message", modLoaded, modDeps, modInfo);
/* crypto modules */ mlLoadModuleSet("aead:aes_generic:rng:ansi_cprng:krng:anubis:crypto_blkcipher:authenc:blowfish:cast5:cast6:cbc:ccm:chainiv:crypto_hash:cryptomgr:ctr:zlib_deflate:deflate:crypto_null:des:ecb:eseqiv:gf128mul:hmac:khazad:md4:md5:michael_mic:seqiv:serpent:sha256:sha512:tea:tgr192:twofish:wp512:xcbc:xts", modLoaded, modDeps, modInfo); diff --git a/partitions.py b/partitions.py index 52d0b8c..208a8d5 100644 --- a/partitions.py +++ b/partitions.py @@ -1224,9 +1224,9 @@ class Partitions:
# no gfs support in grub if (bootreq and bootreq.fstype and - bootreq.fstype.getName() == "gfs2"): - errors.append("Bootable partitions cannot be on a GFS2 " - "filesystem.") + bootreq.fstype.getName() in ["gfs", "gfs2"]): + errors.append("Bootable partitions cannot be on a GFS " + "nor a GFS2 filesystem.")
# no ext4 support in grub if (bootreq and bootreq.fstype and diff --git a/scripts/mk-images b/scripts/mk-images index ef29709..95429f5 100755 --- a/scripts/mk-images +++ b/scripts/mk-images @@ -42,7 +42,7 @@ USBMODS="ohci-hcd uhci-hcd ehci-hcd hid mousedev usb-storage sd_mod sr_mod ub" FIREWIREMODS="ieee1394 ohci1394 sbp2" IDEMODS="ide-cd ide-cs" SCSIMODS="sr_mod sg st sd_mod scsi_mod iscsi_tcp iscsi_ibft" -FSMODS="fat msdos vfat ext3 ext4 reiserfs jfs xfs gfs2 lock_nolock" +FSMODS="fat msdos vfat ext3 ext4 reiserfs jfs xfs gfs gfs2 lock_nolock" LVMMODS="dm-mod dm-zero dm-snapshot dm-mirror dm-multipath dm-round-robin dm-emc dm-crypt" RAIDMODS="md raid0 raid1 raid10 raid5 raid6 raid456 dm-raid45 dm-mem-cache dm-region_hash dm-message" SECSTAGE="$RAIDMODS $LVMMODS $FSMODS $IDEMODS $SCSIMODS" diff --git a/scripts/upd-instroot b/scripts/upd-instroot index 09cf644..d83d375 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -118,8 +118,9 @@ PACKAGES="glibc glibc-common setup openssl python python-libs newt slang libseli libstdc++ expat libgcc readline ncurses yum python-sqlite python-elementtree pykickstart e2fsprogs-libs iscsi-initiator-utils db4 rhpxl xorg-x11-server-Xorg libuser system-config-date - yum-metadata-parser gfs2-utils libvolume_id rhel-instnum yum-kmod - libdhcp libnl libdhcp6client libdhcp4client device-mapper-multipath + yum-metadata-parser gfs-utils kmod-gfs gfs2-utils libvolume_id + rhel-instnum yum-kmod libdhcp libnl libdhcp6client libdhcp4client + device-mapper-multipath kpartx dmraid python-pyblock mkinitrd libbdevid libbdevid-python libselinux-python nss udev keyutils-libs nspr python-iniparse cryptsetup-luks e4fsprogs fipscheck fipscheck-lib libdrm libmlx4
When doing upgrade, there is no need to ignore the fstab lines with filesystem Anaconda does not support. We can leave the lines as they are and just comment them out to prevent mounting problems during the next boot.
Resolves: rhbz#754213 --- fsset.py | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/fsset.py b/fsset.py index 9636003..64d948d 100644 --- a/fsset.py +++ b/fsset.py @@ -1297,6 +1297,20 @@ class AutoFileSystem(PsudoFileSystem):
fileSystemTypeRegister(AutoFileSystem())
+class unknownFileSystem(FileSystemType): + def __init__(self, fstype): + FileSystemType.__init__(self) + self.partedFileSystemType = None + self.formattable = 0 + self.checked = 0 + self.linuxnativefs = 0 + self.supported = 0 + + self.name = fstype + + def formatDevice(self, entry, progress, chroot='/'): + pass + class BindFileSystem(PsudoFileSystem): def __init__(self): PsudoFileSystem.__init__(self, "bind") @@ -1456,6 +1470,10 @@ class FileSystemSet: options = entry.getOptions() if entry.mountpoint == "/" and options is not None: options = options.replace(",_netdev", ",_rnetdev") + + # comment out lines with unknown filesystem + if isinstance(entry.fsystem, unknownFileSystem): + device = "#" + device fstab = fstab + format % (device, entry.mountpoint, entry.fsystem.getName(), options, entry.fsck, @@ -2969,8 +2987,8 @@ def readFstab (anaconda): break # "none" is valid as an fs type for bind mounts (#151458) if fsystem is None and (string.find(fields[3], "bind") == -1): - continue - + fsystem = unknownFileSystem(fstotry[0]) + label = None if fields[0] == "none": device = Device()
My first attempt to send the patches to the new list failed, so I've sent it also here. The second attempt was successful, so you can ignore these emails and read the ones on the new list.
On Tue, 2012-06-26 at 14:08 +0200, Vratislav Podzimek wrote:
PATCH 1/2 is the same as the previous attempt for the gfs support. However, the previous version had self.check set to 1 that caused problems on reboot because fsck.gfs failed. I believe 0 is the right value here.
PATCH 2/2 adds the unknownFileSystem class that allows us to just comment out the fstab lines with unknown (not supported) filesystem on upgrade. We could just copy such lines, but that may result in non-booting system, because of for example fsck problems (fsck for such filesystem may be not installed or whatever). Ending up in a shell during boot process is a lot worse then fixing the configuration from the running system with all utilities available.
-- Vratislav Podzimek
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
anaconda-devel@lists.stg.fedoraproject.org