[OpenIndiana-discuss] Relocated root home directory
Jim Klimov
jimklimov at cos.ru
Sun Feb 10 11:01:04 UTC 2013
Okay, I see the list is not very excited about this idea. Oh well :)
If somebody ever needs it, the black magic part is now published here ;)
On 2013-02-09 13:14, Sašo Kiselkov wrote:
> Worst thing is you won't get your precious home directory.
Worst is that the mountpoint /root/ can get trashed and then on
reboot I get svc:/filesystem/local failure (as I wrote, for the
"zfs create -o mountpoint=/root rpool/export/home/root" case)
and unavailable system while I clean out this problem too.
> And locating /root on anything other than rpool is a "Bad Idea(tm)".
I guess so, won't argue :)
> # umount /root
> # chmod 500 /root
> # zfs mount rpool/export/home/root
Hm... does this help against non-empty /root as a mountpoint?
> Why exactly would I want ssh keys in single user?
I dunno actually, it was an impulsive idea :)
Still, I might easily imagine repairs involving rsync/ssh
somewhere to a backup or similarly configured system to
fetch or store some files, with networking config manually
set up for this uptime...
>
>> or your bash aliases and history of repair commands, etc.
>
> # mkdir /tmp/whatever
> # zfs set mountpoint=/tmp/whatever rpool/export/home/root
> # zfs mount rpool/export/home/root
>
> If filesystems on your rpool are unmountable (and yet the system
> booted), then you have a whole different heap of problems than "I want
> my bash history".
Easily - my tests with split rootfs (separate /usr /var /opt
and such) in their "youth" could lead to situations where
/usr is unavailable (due to non-empty mountpoint or a bad
combination of canmount and mountpoint attributes) - sending
the OS into single-user state upon bootup.
While I have mostly weeded these errors out so they don't pop
up even after OS upgrades, I can imagine a need for such lower
level repairs involving an rpool, and these particular ones
are rather trivial problems. And in fact, bash history of
previous such remounts is particularly useful in these cases :)
---
Oh well, if we're going on to ask why should you use this trick
or discuss why I shouldn't - I guess there is indeed no point
in spending our time on typing... Let's say, to each his own ;)
//Jim
More information about the OpenIndiana-discuss
mailing list