[OpenIndiana-discuss] Moving /var and/or /usr to own zfs filesystem

Jim Klimov jimklimov at cos.ru
Wed Sep 4 14:45:08 UTC 2013


On 2013-09-04 10:12, Richard Jones wrote:
> On Tue, Sep 03, 2013 at 04:45:18PM -0400, Christopher X. Candreva wrote:
>> This is somewhat embarassing.
>>
>> I know this is possible, because I have an oi 151a6 machine running
>> with /var and /usr as saparate filesystems on the zfs rpool. However I
>> did it I can't remember and can't find whatever instructions I used,
>> because I'm trying again on another install and failing.
>>
>> I started moving just /var. No matter what, it doesn't mount the zfs
>> filesystems before running filesystem/minimal , so /var isn't mounted
>> and it fails. I did the move by booting from install media,
>> importing the rpool, creating /var.new, mv /var /var.old , and then
>> change the zfs mountpoint of /var.new No dice, on reboot it doesn't
>> mount.
>
> I'm guessing that you remember to set the zfs mountpoint as "legacy" and
> the added it to /etc/vfstab?

Yes, this is one way of ensuring things work, though pretty clumsy :)
You might also want to ensure you use "-O" for overlay mounts in the
last column, which only works via /etc/vfstab and can't (yet) be done
with ZFS per-dataset attributes.

My research on the matter was discussed here:
* https://www.illumos.org/issues/829‎
* 
http://wiki.openindiana.org/oi/Advanced+-+Manual+installation+of+OpenIndiana+from+LiveCD+media

Apparently, there was said to be too little concern and interest about
such setups in the community at that time, so I comforted myself with
writing down all the steps to retrace the procedure when I need to :)

I think I posted all the script modifications there as well, though I
never got around to preparing a "complete solution" ready for posting
to review and integrate (possibly, I might have had some more tweaks
done after those posts too, would have to hunt them down though).
Don't go blindly copy-pasting my examples and patches into your setup
while you read through that "log", see if they need to be adapted to
your likely newer system on one hand, and if my newer post (in the
bugtracker especially) overrides it, on another :)

This is a more complex and potentially fragile setup, and perhaps an
unneeded one IF your OS release supports compressed rootfs - by far
this was my primary point for advantage of split-root setup. However,
another big advantage is the ability to reuse the same "data" datasets
in system path sharing them while switching the booted BEs - the email
data and spool, the logs, etc. Yet another is the ability to set the
quotas for such datasets and reservations for system datasets, so
that the system can function even if some daemon gets out of hand
and wastes disk space in system paths.

HTH,
//Jim Klimov




More information about the OpenIndiana-discuss mailing list