One pool, multiple systems with nested datasets. How to configure mounting? #16866
Replies: 1 comment
-
You can have something like: Things to consider:
Having /var/log, etc.. on a different mount point has some benefits: e.g you can have different recordsize and compression settings. The nice part, you can experiment, try several variants, see which works for you. There is 'zpool checkpoint' feature, so if you want to do some drastic changes to your layout, you can checkpoint the pool before doing that and revert back to it if it doesn't work. |
Beta Was this translation helpful? Give feedback.
-
Suppose I wish to have two separate Linux installations on the same pool, under
tank/foo
andtank/bar
. Further suppose I wish to have separate datasets on each system, such as/home
or/var/log
or/var/lib/something
.Naively, these would have the same mountpoint set on both systems. As I understand, this would not work as is.
What is the recommended way to approach this kind of setup? Use
mountpoint=legacy
andfstab
? Usezfs-mount-generator
?Another user I asked suggested setting
canmount=noauto
and either writing a systemd unit that executes/sbin/zfs mount <datasets>
, with dependencies set up such that it "acts like" asystemd.mount
unit or to usemountpoint=legacy
but usesystemd.mount
units instead offstab
.Looking online you can find people talking about installing multiple systems on a single pool however they tend to simply have the entire system be on a single dataset.
Beta Was this translation helpful? Give feedback.
All reactions