[zfs-discuss] Moving ONLY /var and /tmp to ZFS pool on Ubuntu

Darik Horn dajhorn at vanadac.com
Wed Jun 15 10:51:30 EDT 2011


> QUESTION:  What is the best way to accomplish this goal?

You can't.


> Long Version:

You can't easily do this until some things are changed to accommodate
putting /usr and /var in separate ZFS filesystems.


> log_begin_msg "Importing /var and /tmp filesystems"
>  $ZFS mount -o mountpoint=${rootmnt}/var raid-zfs/var
>  $ZFS mount -o mountpoint=${rootmnt}/tmp raid-zfs/tmp
>  log_end_msg

Doing this has at least two side-effects:

* The pivot into the regular system mangles the namespace, which is why
you must use the `-o zfsutils` option, which can cause things like
`mountall` to choke later.

* Pivoting more than one real mount point is unreliable.


> 8. Update initramfs to do an early load/mount of ZFS
> # vi /usr/share/initramfs/init
> 
> Insert the following right before '# Chain to real filesystem'

Why did you put this into the `maybe_break init` paragraph?

This seems too late because it is happening after the mount moves and
init check.  You could be missing an important error message here.


> make sure that we have 'vmalloc=512M' on the kernel line in grub.cfg,
> since our machine only has 1GB RAM.

You are exercising a heavy corner case on a weak computer.  Move step 8
into the mount paragraph, set break=bottom, and check the dmesg for
warnings.



More information about the zfs-discuss mailing list