S
S
syxoi2017-01-05 17:07:56
linux
syxoi, 2017-01-05 17:07:56

ZFS: Why create a dataset in a pooled dataset?

Hello! I want to migrate Ubuntu 16.04 OS from btrfs to zfs. btrfs sometimes "skips" file compression (you use it, then you do defragmentation and you notice that df shows less occupied space, in general, I don't trust this btrfs).
I had never contacted her before, and a lot of questions and misunderstandings accumulated, to which I could not google the answers.
So, I read a bunch of instructions and try:
1) zpool create kek -m none /dev/md0 - create a pool. You can specify options at once, such as compression or deduplication. That is, it turns out that you can not even create datasets, but immediately put the system in the pool?
2) zfs create -o mountpoint=/ kek/root - create a dataset. Why - it is not clear when you can put everything in the root (directly in the pool). There are a lot of misunderstandings here. If you specify mountpoint as the root, then it will refuse to mount, so I temporarily set the mount point as /mnt/os in order to copy the OS there and then put it back.
3) zfs set compression=gzip; bla bla - everything is clear here
I read it here , and there a ROOT dataset is created in the rpool pool and an ubuntu dataset in the ROOT - but why ?! What for to do such "hierarchy"?
4) If you can set the mount point via zfs set mountpoint=/ kek/root, then why do you need to add it to fstab? Or will it not work? Or do I need to zfs set mountpoint=none kek/root?
Thanks :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question