SUMMARY: Solaris 2.x: fsck without unmounting

From: Michael Heitkamp (heitkamp@is.danet.de)
Date: Wed Jan 05 1994 - 06:55:40 CST


Hello net,

My original problem was as follows:

I have a NFS-server running solaris 2.2 and want to do a fsck on partitions
before i do a full backup.
The simple fsck relying on the stable bit isn't that trusty. Some time ago
I got file system errors due to a firmware problem of the disk that were
not detected until the system crashed. I cannot proof that all of the
(more than hundreds) errors result from the single crash, but i can't
imagine.
On solaris 2.2 this doesn't work on mounted partitions and simple unmount
would not work if anyone is 'working' on the file system.

Here are the hints for solution:

1. Many people told that doing fsck on a mounted file system is dangerous
   because i f fsck repairs something on the filesystem the OS has
   another view of the filesystem as it really is.
2. 'fuser' can be used to detect the processes which are working on a
   file system
   [ I think i still would have problems if a nfs-client is working !? ]
3. Solaris 2.3 allows fsck on mounted partitions (see 1.)
4. fsck can be forced during boot by doing
    - create a file /etc/whatever
    - install a shell script in /etc/rcS.d which tests if /etc/whatever
      exists. If so it does a fsck on the partitions and then removes
      /etc/whatever
    - run 'init 6'

The last idea seems the most elegant and secure way for a fsck to me.
The same mechanism can be used to do a backup.
And - it works !

Thanks to all who responded.

-- 
| Michael Heitkamp         |   Phone:  +49-711/13353-27 FAX: +49-711/13353-53 |
| Danet-IS GmbH            |   UUCP:   heitkamp@is.danet.de                   |
| Waldburgstrasse 17 - 19  |   BANG:   uunet!mcsun!unido!danetis!heitkamp     |
| D-7000 Stuttgart 80      |   X.400:  C=DE;A=DBP;P=DANET;O=IS;S=Heitkamp     |



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:53 CDT