Score:0

How do I move /home to a raidz pool/dataset?

jp flag

This question has been raised but never answered in a way that I was able to get to work.

Goal: Install Ubuntu disk 1 and move /home to a 3 disk raidz.

Progress: Installed Ubuntu with the 'experimental' zfs file system on a 1TB drive. Three 2TB drives used for zpool configured as raidz and named zhome. zfs dataset created named home.

zpool status

pool: bpool state: ONLINE scan: none requested config:

NAME                               STATE     READ WRIT  CKSUM
bpool                               ONLINE     0     0     0

303e0a42-8a9d-6a41-87de-9eba201128bd ONLINE 0 0 0

errors: No known data errors

pool: rpool state: ONLINE scan: none requested config:

NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 d282d21c-f3ab-c24b-bff6-846a1327654a ONLINE 0 0 0

errors: No known data errors

pool: zhome state: ONLINE scan: none requested config:

NAME                        STATE     READ WRITE CKSUM
zhome                       ONLINE       0     0     0
  raidz1-0                  ONLINE       0     0     0
    wwn-0x5002538f3191984e  ONLINE       0     0     0
    wwn-0x500a0751e4fa5033  ONLINE       0     0     0
    wwn-0x500a0751e4fa5440  ONLINE       0     0     0

errors: No known data errors

File system successfully copied from /home to zhome/home using

cp -a /home/* /zhome/home

As noted in the below link, ZFS by default rejects mount points that contain something which can be changed by setting overlay to on.

zfs set overlay=on zhome

The next step is the changing the mountpoint to /home by

zfs set mountpoint=/home zhome/home

zfs list

NAME USED AVAIL REFER MOUNTPOINT

zhome 174M 3.52T 128K /zhome

zhome/home 173M 3.52T 173M /home

df -h -t zfs

Filesystem Size Used Avail Use% Mounted on

zhome/home 3.6T 2.7G 3.6T 1% /home

zhome 3.6T 128K 3.6T 1% /zhome

All of the above accepted by my system, but on reboot, programs like stacer don't list my larger raidz, but that the system is still writing to the original /home on the 1TB drive.

I looked at this reference (Migrating /home to ZFS) which the asker was never able to get the response to work. Me neither. Some answers say add XXX to /etc/fstab while others say not necessary. I think I am close. Am I missing something?

in flag
Which version of Ubuntu are you using? ZFS is not experimental anymore ...
Scott Albright avatar
jp flag
It was on my install disk. Running Ubuntu 20.04.3 LTS
freezed avatar
cn flag
@matigo ZFS installation on root [is still experimental on Ubuntu](https://ubuntu.com/blog/tag/zfs).
freezed avatar
cn flag
@ScottAlbright welcome to Ask Ubuntu. Please [take the tour](https://askubuntu.com/tour) to learn how Ask Ubuntu works. Read [how to ask](https://askubuntu.com/questions/how-to-ask) to improve the quality of your question.
Scott Albright avatar
jp flag
I don't really want to install the OS on the zfs, Just applicable file storage (music, documents et al). The series of steps for zfs on root is way over my ability to troubleshoot. https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubuntu/Ubuntu%2020.04%20Root%20on%20ZFS.html
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.