Page MenuHomeFreeBSD

bsdinstall(8) umount target should be able to unmount zfs filesystems
AbandonedPublic

Authored by kczekirda on Dec 22 2015, 9:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 4 2024, 6:01 PM
Unknown Object (File)
Oct 4 2024, 11:41 AM
Unknown Object (File)
Oct 3 2024, 7:12 PM
Unknown Object (File)
Oct 3 2024, 12:05 AM
Unknown Object (File)
Oct 2 2024, 5:26 PM
Unknown Object (File)
Oct 2 2024, 5:12 PM
Unknown Object (File)
Oct 2 2024, 2:38 PM
Unknown Object (File)
Oct 2 2024, 5:29 AM
Subscribers
None

Details

Summary

It's not a perfect, but it's enough for 99% use cases.

From Bugzilla:

fre.fbsdpr@expertmaker.com 2015-11-12 15:41:13 UTC
Hi,

When calling the script target with the ZFSBOOT_DISKS variable set, the zfsboot target will be run. This logic should also be used for the umount target, choosing 'zfs umount -a' to be run.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kczekirda retitled this revision from to bsdinstall(8) umount target should be able to unmount zfs filesystems.
kczekirda updated this object.
kczekirda edited the test plan for this revision. (Show Details)
kczekirda added reviewers: allanjude, dteske.

The use case when installing multiuser is not that uncommon and is something that needs to continue working. One of two things needs to happen here before being committed:
(a) it needs to use only those ZFS filesystems previously mounted
(b) the zfsboot script should use the ZFS support in partedit, which already works with umount

usr.sbin/bsdinstall/scripts/umount
43 ↗(On Diff #11620)

in multiuser mode, this command will fail, because you can't umount / while your CWD is / or a subdirectory of it.

When bsdinstall sees an error, it will prompt the user to start the entire install over again.

Wouldn't 'zfs unmount $BSDINSTALL_CHROOT' work here? ($BSDINSTALL_CHROOT = /mnt)

It would unmount only the file systems mounted under the chroot and their descendants.

The use case when installing multiuser is not that uncommon and is something that needs to continue working. One of two things needs to happen here before being committed:
(a) it needs to use only those ZFS filesystems previously mounted
(b) the zfsboot script should use the ZFS support in partedit, which already works with umount

I can do (a), but I'm not able to work on (b).

kczekirda edited edge metadata.
kczekirda marked an inline comment as done.
scripts/umount
49

If this were to return an error, wouldn't it cause bsdinstall to prompt the user to start the installation over again?

Also, if there is somehow a mountpoint that will not unmount because it is in use (say, the shell on console #4 was in that directory), this will loop forever.