Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!news.larc.nasa.gov!saimiri.primate.wisc.edu!sdd.hp.com!usc!acsc.com!not-for-mail From: fmayhar@acsc.com (Frank Mayhar) Newsgroups: comp.os.386bsd.questions Subject: Re: what is fs_clean for? Date: 1 Oct 1993 21:14:32 -0700 Organization: Advanced Computing Services Company Lines: 47 Message-ID: <28iv78$1s6b@cpuserver.acsc.com> References: <28fmis$12b9@acsc.com> <28hoa4$ccg@umd5.umd.edu> NNTP-Posting-Host: cpuserver.acsc.com In article <28hoa4$ccg@umd5.umd.edu>, Mark Sienkiewicz <mark@elea.umd.edu> wrote: >In article <28fmis$12b9@acsc.com>, Jerry Chen <jerry@acsc.com> wrote: >>During the mount time, what should be done if the file system is not clean? >>Should the mount request be rejected or should the mount succeed? Thanks >>for the answer. >There are two answers to this: >WRONG: Reject the mount of filesystems that are not clean. >RIGHT: Mount it anyway. >The argument for rejecting it is that you don't know that the filesystem >is clean - by mounting it, you can make it worse. Also, you might have >a detrimental effect on the rest of the system. True. But you might also crash the system in the first few minutes, and leave the filesystem in even worse shape than it was. >The argument for allowing the mount is that the filesystem probably is not >in very bad shape. You can *safely* run for *months* with blocks missing >from the free list or unreferenced inodes allocated. So I don't want my >entire system failing (e.g. can't mount /usr) because I lost a temporary file. Yes, but. What is stopping you from running fsck, hmm? Certainly you must always mount root, but fsck should *always* be run before mounting a file system like /usr, and if it's a nonessential filesystem (in terms of system operation, not in terms of your application, of course), the mount failure should just tell you "Gee, I forgot to run fsck -- I better do that now." >I also don't like systems that say "I won't do what you told me to do because >somebody programmed me to be smarter than you". Computers that say that >are lying. Maybe *I* know that the damage is not bad enough to prevent me >from doing what I want to do. Maybe *you* know that, but the *system* doesn't know that. >Ideally, one of these two behaviours could be selected by an option in >the config file. e.g. No, it should be an option on the mount, e.g. -f (force), if that's not already taken. Then change the mount vfsop to look for a 'force' flag as passed in the flags parameter of the mount syscall (this is true in AIX, the system I have at hand, I'm not sure about *BSD, and I don't have one easily available). If force is clear and the fs is dirty, fail the mount, else do it anyway. -- Frank Mayhar fmayhar@acsc.com Advanced Computing Systems Company 3000 S. Robertson Blvd. Suite 400, LA, CA 90034 (310) 815-4858