Install with /var in separate partition - Zfs / 10

This is my first time working with ZFS on Solaris 10. I am trying to set up /var in a separate partition from /.

During the installation, I came across the ZFS settings where I selected disks 0 and 1 to be mirrored with ZFS. Next was the option to have /var and / on separate datasets.

Is selecting this option like setting them up with different partitons? I am not quite up to speed with ZFS ... any suggestions?

Thanks in advance.

Yes it is like setting up with partitions.
But then zfs uses pooled storage

So if you wan't to use zfs /var on a different filesystem you could use the following.

 
       # zfs create pool/var
       # zfs set mountpoint=/var
1 Like

Within the default pool "rpool" I do have /var as a "filesystem".

rpool                          7.86G   126G    97K  /rpool
rpool/ROOT                     4.36G   126G    21K  legacy
rpool/ROOT/s10s_u8wos_08a      4.36G   126G  4.29G  /
rpool/ROOT/s10s_u8wos_08a/var  68.8M   126G  68.8M  /var
rpool/dump                     1.50G   126G  1.50G  -
rpool/export                     44K   126G    23K  /export
rpool/export/home                21K   126G    21K  /export/home
rpool/swap                        2G   128G    16K  -

If I were to create another pool for /var and set its mountpoint as /var also, would that cause any problems or lost data?

For the most part, I don't see what the problem with the current setup so most likely I will not be changing this.

You already have /var as a separate file system so that would make no sense. I suppose jld suggestion what just an (probably non functional) example showing how to create a new file system for a given directory. It wasn't at all something that directly apply to a critical system directory like /var.

No immediate loss of data as the old dataset would still keep its content but, assuming it succeeded, it would have crashed and rendered your system unusable as it substitutes /var by an empty directory. Even if properly done, it would have make your system not upgradeable as live upgrade expects /var to be part of a boot environment (like yours it is currently Solaris 10 update 8).

That's a wise decision. There is actually no problem with your current setup.

1 Like