Review request.

View: New views
2 Messages — Rating Filter:   Alert me  

Review request.

by Pawel Jakub Dawidek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

I'm looking for a review of the following:

Currently there is a problem with fscking UFS file systems created on
top of ZVOLs. The problem is that rc.d/fsck runs before rc.d/zfs. The
latter makes ZVOLs to appear in /dev/. In such case rc.d/fsck cannot
find devfs entry and aborts. We cannot simply move rc.d/zfs before
rc.d/fsck, because we first want kern.hostid to be configured (by
rc.d/hostid). If we won't wait (hostid will be 0) we can reuse disks
which are in use by different systems (eg. in SAN/NAS environment).
We also cannot move rc.d/hostid before rc.d/fsck, because rc.d/hostid on
first system start stores generated kern.hostuuid in /etc/hostid file,
so it needs root file system to be mounted read-write.
 
My fix is to split rc.d/hostid so that rc.d/hostid (which will now run
before rc.d/fsck) only generates hostid and sets up sysctls, but doesn't
touch root file system and rc.d/hostid_save (which is run after
rc.d/root) and only creates /etc/hostid file.
 
With that in place, I can move ZVOL initialization to dedicated
rc.d/zvol script which runs before rc.d/fsck.

The patch is here:

        http://people.freebsd.org/~pjd/patches/zvol_fsck.patch
 
--
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@...                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!


attachment0 (194 bytes) Download Attachment

Re: Review request.

by Brooks Davis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 28, 2009 at 03:29:38PM +0200, Pawel Jakub Dawidek wrote:

> Hi.
>
> I'm looking for a review of the following:
>
> Currently there is a problem with fscking UFS file systems created on
> top of ZVOLs. The problem is that rc.d/fsck runs before rc.d/zfs. The
> latter makes ZVOLs to appear in /dev/. In such case rc.d/fsck cannot
> find devfs entry and aborts. We cannot simply move rc.d/zfs before
> rc.d/fsck, because we first want kern.hostid to be configured (by
> rc.d/hostid). If we won't wait (hostid will be 0) we can reuse disks
> which are in use by different systems (eg. in SAN/NAS environment).
> We also cannot move rc.d/hostid before rc.d/fsck, because rc.d/hostid on
> first system start stores generated kern.hostuuid in /etc/hostid file,
> so it needs root file system to be mounted read-write.
>  
> My fix is to split rc.d/hostid so that rc.d/hostid (which will now run
> before rc.d/fsck) only generates hostid and sets up sysctls, but doesn't
> touch root file system and rc.d/hostid_save (which is run after
> rc.d/root) and only creates /etc/hostid file.
>  
> With that in place, I can move ZVOL initialization to dedicated
> rc.d/zvol script which runs before rc.d/fsck.
>
> The patch is here:
>
> http://people.freebsd.org/~pjd/patches/zvol_fsck.patch
This looks fine to me and seems like a good solution to this problem.

-- Brooks


attachment0 (194 bytes) Download Attachment