Page 1 of 1

System won't boot after mistake in changing mountpoint of dataset

Posted: 06 Oct 2015 22:16
by Jyjon
I have a few questions about ZFS and booting.
Is there a way to boot nas4free so it will skip loading the zfs pools?
If a zfs pool is not mounted or imported will 'zfs set mountpoint=/mnt pool/dataset' work? If not is there a way to change the mountpoint without importing the pool?
I could if there is no other option destroy the dataset, that one didn't have much on it of importance, so another question is can a dataset be destroyed before it's imported?

I imported a pool that I had previously on OS X. The mountpoint was set to /Volumes I wanted it to be on /mnt
the GUI wouldn't import the pool so I SSH'd in and and I changed the mountpoint from the command line. Everything stopped working on next reboot. Looking thru my terminal scroll back I see what stupid mistake I made. I did 'zfs set mountpoint=/ pool/dataset' so I'm guessing it mounted as root, which means no /bin /sbin no /*anything*... the machine doesn't boot all the way, it spits out an error that it is not able to find /etc/rc.d

Re: System won't boot after mistake in changing mountpoint of dataset

Posted: 07 Oct 2015 00:03
by ChriZathens
You could try a clean installation and afterwards import your pool(s)

Re: System won't boot after mistake in changing mountpoint of dataset

Posted: 07 Oct 2015 00:31
by Jyjon
That won't work, as soon as it is imported all commands go away. Which is why I need to know how to boot so zfs doesn't load and I guess I'm gonna have to destroy that dataset in the pool. Not sure if you can destroy a dataset with it not imported.

Re: System won't boot after mistake in changing mountpoint of dataset

Posted: 07 Oct 2015 01:21
by Parkcomm
Do NOT destroy (not yet anyways) this sounds recoverable.

The install disks do not automatically import the zpool so you should be able to boot.

Then

Code: Select all

zpool import -R /mnt/RecoveryMountPoint YourPoolName
zfs set mountpoint=/mnt/YourMountPoint pool/dataset
Reboot

The Recovery mount point name can be anything you want

PS. make sure mount in a directory below /mnt not the /mnt directory itself, thats just asking for trouble

Re: System won't boot after mistake in changing mountpoint of dataset

Posted: 07 Oct 2015 01:28
by Jyjon
Thank you

I read up on that in the oracle docs as well as setting an altroot.
booted to the install USB stick and it worked.
Got it fixed, thank you.

Re: System won't boot after mistake in changing mountpoint of dataset

Posted: 07 Oct 2015 03:25
by Parkcomm
My pleasure