[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:zfs_home [2020/09/02 03:21 (UTC)] dchmelikhowtos:zfs_home [2024/02/12 13:48 (UTC)] dchmelik
Line 10: Line 10:
 Of course, Xen (a hypervisor virtual machine) is another excellent option for multiple native-on-hardware OS, including Unix, but you might just have to copy between fs and not all OS write well... so you could even try Xen with ZFS storage...) Of course, Xen (a hypervisor virtual machine) is another excellent option for multiple native-on-hardware OS, including Unix, but you might just have to copy between fs and not all OS write well... so you could even try Xen with ZFS storage...)
  
-===== Always Backup /home Regularly=====+===== Always Backup /home Regularly.  Make the ZFS package=====
  
 Here's how you can prepare to create a ZFS /home. Here's how you can prepare to create a ZFS /home.
Line 21: Line 21:
  
 ===== Research/read At Least A Little ===== ===== Research/read At Least A Little =====
-Before first actual ZFS commands, you may want to view  /usr/doc/zfs-on-linux-* , cat or more (or less, most) /var/log/packages/zfs-on-linux-* , ‘man zpool,’ ‘man zfs.’  A zpool holds and manages one or more zfs and has many options, which for advanced/large storage, you will want some/all (maybe depending on compatibility with other systems accessing)... that case would be for new sections or advanced storage HOWTO... here it's assumed one may not use most/any extra options because might not be a data-centre (but one feature will be mentioned) rather than wanting to share /home with a Unix, which many may not have all options (as OpenSolaris' ZFS and zfs-on-linux are slightly different--at different stages of overall ZFS design, so some versions have things older ones don't, and won't even be readable with... you should check/view those project sites (linked here sooner or later,) even though zfs-on-linux people didn't bother to address the most long-time/influential GNU/Linux--Slackware--some/many command/option examples for others--even if not Unix-like--will be similar/same.)+Before first actual ZFS commands, you may want to view  /usr/doc/zfs-on-linux-* , cat or more (or less, most) /var/log/packages/zfs-on-linux-* , ‘man zpool,’ ‘man zfs.’  A zpool holds and manages one or more zfs and has many options, which for advanced/large storage, you will want some/all (maybe depending on compatibility with other systems accessing)... that case would be for new sections or advanced storage HOWTO... here it's assumed one may not use most/any extra options because might not be a data-centre (but one feature will be mentioned) rather than wanting to share /home with a Unix, which many may not have all options (as OpenSolaris/IllumOS' ZFS and zfs-on-linux are slightly different--at different stages of overall ZFS design, so some versions have things older ones don't, and won't even be readable with... you should check/view those project sites (linked here sooner or later,) even though zfs-on-linux people didn't bother to address the most long-time/influential GNU/Linux--Slackware--some/many command/option examples for others--even if not Unix-like--will be similar/same.)
  
 ===== Create & Start ZFS ===== ===== Create & Start ZFS =====
 Once you installed ZFS and all various /home files are backed up, start ZFS with rc script (run it or reboot)... login root (or su -) or use sudo for those commands below.  Remember, this will be with no extra options (-d option is ‘no options’ unless specified) other than use a ‘modern’ sector size (unless you have a drive so old it should probably be replaced if even still working, this size should be reasonable)... ‘-o ashift=12’ option creates 2<sup>12</sup>, i.e., 4KB sectors (you shouldn't actually use larger/8KB unless using //older// solid state drive, SSD designed 8KB.)  You can read zpool & zfs manpages to find/add more options.  If you do and share a /home, install ZFS on both OSes, dump zpool option list sets on each to see what's usable (only the [[http://mathworld.wolfram.com/Intersection.html|set intersection]].)  Most likely both will have compression and snapshots, so if you want those, read examples/manpages. Once you installed ZFS and all various /home files are backed up, start ZFS with rc script (run it or reboot)... login root (or su -) or use sudo for those commands below.  Remember, this will be with no extra options (-d option is ‘no options’ unless specified) other than use a ‘modern’ sector size (unless you have a drive so old it should probably be replaced if even still working, this size should be reasonable)... ‘-o ashift=12’ option creates 2<sup>12</sup>, i.e., 4KB sectors (you shouldn't actually use larger/8KB unless using //older// solid state drive, SSD designed 8KB.)  You can read zpool & zfs manpages to find/add more options.  If you do and share a /home, install ZFS on both OSes, dump zpool option list sets on each to see what's usable (only the [[http://mathworld.wolfram.com/Intersection.html|set intersection]].)  Most likely both will have compression and snapshots, so if you want those, read examples/manpages.
  
-Below is to create a ZFS drive (replace L with drive block device letter,number you want.)+Below is to create a ZFS drive (replace L with drive block device letter you want.)
 <code>zpool create -d -o ashift=12 home /dev/sdL</code> <code>zpool create -d -o ashift=12 home /dev/sdL</code>
  
-//Alternatively//, if //not using an entire drive//below is to create a ZFS partition (replace L,N with drive partition block device letter,number you want.)+//Alternatively//, if //not using an entire drive// (but normally a Solaris GPT partition) below is to create a ZFS partition (replace L,N with drive partition block device letter,number you want.)
 <code>zpool create -d -o ashift=12 home /dev/sdLN</code> <code>zpool create -d -o ashift=12 home /dev/sdLN</code>
  
 howtos:zfs_home ()