On Tue, Jun 13, 2006 at 07:00:59AM -0700, parry wrote:
> hi,
> 
> i was trying to write a service that checks attributes of rootfs
> before it is checked by fsck. The service has a dependency on
> boot-archive and has a dependent "/system/filesystem/usr" service. It
> seems "/" is being mounted in r/w mode before a check is done on it.
> is that correct?

'/' is read-only until svc:/system/filesystem/usr:default runs.  Because
/ is mounted in a special way by the kernel, it may be that the
reporting of its read-only state is inaccurate; how are you querying the
state?

> When is the rootfs first mounted in the boot process ? Is it ever mounted in
> read-only mode or is Solaris fsck capable of checking filesystems that are 
> mounted w/o damaging them?

The root filesystem is mounted in read-only mode by the kernel before any
userland processes run.  system/filesystem/root mounts /usr read-only, and
system/filesystem/usr re-mount / and /usr read-write, after fscking them.

fsck running against a read-only filesystem is generally not damaging,
but the system sometimes needs to be rebooted afterwards, depending on the
exact change.  If something like that occurs, sulogin(1m) will be invoked
so that the administrator can handle it.


It's not like the system has a choice; / and /usr must be checked while
they are mounted and being used, since the fsck binaries live there.

Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to