DragonFly kernel List (threaded) for 2008-07
Re: vfs.root.mountfrom hammer?
Matthew Dillon schrieb:
:Hi,The following patch works perfectly:
It isn't possible to use more than one volume, but I think thats a minor
problem for a hammer root mount.
I'm also not quite sure where this line
mp->mnt_flag &= ~MNT_RDONLY; /* mount R/W */
best belongs to. Right now it has the effect that every hammer root mount
:I'm trying to mount a hammer filesystem as root via vfs.root.mountfrom.
:I tried some simple patches to make it work, but I still get panics. Is
:it any harder than calling VFS_MOUNT for the hammer filesystem?
:That would allow to have a small partition with /boot on it, and the
:rest would be loaded from the hammer partition.
A root mount wil call mount with a NULL path and NULL data
pointer. I think it would be fairly easy to adjust HAMMER to
deal with that.
You can look at the UFS code as an example. Look at
/usr/src/sys/vfs/ufs/ffs_vfsops.c starting on line 151.
is read/write. I'm also not 100% sure if I did it right to create the root vnode
(which is required in hammer_install_volume, otherwise nlookup seems to fail).
Feel free to fix/commit it.
For those that want to try out the patch, you have to add a line to /boot/loader.conf:
And change that ad4s1d to your hammer partition.
This partition will be mounted as "/". For the boot loader you still need the
ad4s1a partition where "/boot/*" , "/kernel" and "/modules/*" reside. So you
may want to boot ad4s1a as /bootdir and "ln -s /bootdir/boot /boot".
This is btw more or less exactly how one can use ZFS as root mount: