From: Marc G. <gr...@at...> - 2009-12-26 21:57:19
|
----- "Gordan Bobic" <go...@bo...> wrote: > I'll have a look, but wouldn't glfs be a little different? It's a > 2-step > mount, first the underlying backing fs (in my case ext3, but it could > be > anything), and then glfs on top of that. At a glance, the "local > device=$1" would return the glfs volume spec file, not the underlying > > backing fs which is what would actually need to be fsck-ed. > > That means that at the very least what is passed to > glusterfs_fsck_needed would need to be different. It would need to be > > rootsource, rather than rootvolume.name. Ok. Got it. I didn't see that (forgot about the glusterfs dependencies and fs being mounted in clusterfs_services_start). So there is no other way. I cannot move the rootfsck functionality before clusterfs_services_start cause there are clusterfilesystems that require a running cluster before being able to fsck the rootfs and it belongs at this place. I don't "like" your approach cause fsck does not belong in glusterfs_services_start but I don't see any other way. Give me one or two days to think about and decide if there are other ways. I'll let you know in a few days. But I think we'll do it the way you have proposed. What do you think? Marc > > Oh, and should I CC this to the list? > > Gordan > > On 25/12/2009 20:56, Marc Grimme wrote: > > Hi Gordan, > > latest version have this already prepared. > > Have a look at linuxrc.generic.sh:427. > > This means the glusterfs-lib.sh needs to implement two functions in > order to support fsck: > > 1. glusterfs_fsck_needed rootdevice rootfs > > should return 0 if the fs does not need to be checked otherwise the > following function is called. > > 2. glusterfs_fsck rootdevice rootfs > > should call the fsck itself. > > The library ocfs2-lib.sh should give a good example on how to use > this. > > See: > > function ocfs2_fsck_needed { > > local device=$1 > > fsck -t noopts -T $device > > } > > function ocfs2_fsck { > > local root="$1" > > local fsck="fsck.ocfs2" > > local options="" > > echo_local -n "Calling $fsck on filesystem $root" > > exec_local $fsck $options $root > > return_code > > } > > > > What do you think? > > > > Marc. > > ----- "Gordan Bobic"<go...@bo...> wrote: > > > >> Since GlusterFS is backed by a local rather than a cluster file > >> system, > >> it is possible to fsck the file system properly before mounting. > Here > >> is > >> a patch that implements fscking of the file system based on the > same > >> criteria as in RHEL5 rc.sysinit (mount counts, unclean shutdowns, > >> etc.). > >> > >> I haven't tested it with a broken file system yet, but fsck seems > to > >> do > >> a cursory glance at the fs and if it's clean, things just move on, > so > >> > >> please treat this is as experimental at the moment. > >> > >> Most of this is ripped straight out of RHEL5 rc.sysinit, but it > >> doesn't > >> do the checking of things like fastboot, etc. > >> > >> The reason I did this is because I've had a problem in the past > where > >> a > >> small amount of corruption crept in somehow (possibly through an > >> unclean > >> power-down) and caused problems. > >> > >> Gordan > >> > >> > ------------------------------------------------------------------------------ > >> This SF.Net email is sponsored by the Verizon Developer Community > >> Take advantage of Verizon's best-in-class app development support > >> A streamlined, 14 day to market process makes app distribution > fast > >> and easy > >> Join now and get one step closer to millions of Verizon customers > >> http://p.sf.net/sfu/verizon-dev2dev > >> _______________________________________________ > >> Open-sharedroot-devel mailing list > >> Ope...@li... > >> https://lists.sourceforge.net/lists/listinfo/open-sharedroot-devel > > -- Marc Grimme Tel: +49 89 4523538-14 Fax: +49 89 9901766-0 E-Mail: gr...@at... ATIX Informationstechnologie und Consulting AG | Einsteinstrasse 10 | 85716 Unterschleissheim | www.atix.de | www.open-sharedroot.org Registergericht: Amtsgericht Muenchen, Registernummer: HRB 168930, USt.-Id.: DE209485962 | Vorstand: Marc Grimme, Mark Hlawatschek, Thomas Merz (Vors.) | Vorsitzender des Aufsichtsrats: Dr. Martin Buss |