Other Question about partition "/zroot"

Hello guys,
I'm probably going to ask a stupid question but I have this doubt.
Today I was playing with my FreeBSD 11.3 Server and I found this partition list:

Code:
Filesystem            Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default     20G    2.5G     17G    13%    /
devfs                 1.0K    1.0K      0B   100%    /dev
zroot/home             92G     88K     92G     0%    /home
zroot                 105G    1.0G    104G     1%    /zroot

What is this partition called zroot? If I correctly understood, it is a ZFS partition, right?
Since it had the biggest size, I moved all my stuff inside it. Should I move back my folders to /root? (Yes, I'm using this system as root user)
Is this safe to do? What about other folders like /usr /etc?
From what I can see, "zroot/ROOT/default" is mounted on "/", this means all the folders are in this zroot partition?

Sorry for my very basic knowledge. I hope someone could clear my mind.
Thanks
 
What is this partition called zroot? If I correctly understood, it is a ZFS partition, right?
Yes and no. The automatic ZFS install creates a pool called zroot, during the creation of that pool ZFS automatically creates a filesystem with the same name. And the default mountpoint would then be /zroot too.

It should exist:
Code:
dice@maelcum:~ % zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
zroot               2.19G  47.7G    88K  /zroot
But it should not be mounted:
Code:
dice@maelcum:~ % mount | grep zroot
zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls)
zroot/usr/home on /usr/home (zfs, local, noatime, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot on /zroot (zfs, local, noatime, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)

From what I can see, "zroot/ROOT/default" is mounted on "/", this means all the folders are in this zroot partition?
No, they're different datasets. The zroot dataset itself should be empty and not mounted.

Since it had the biggest size,
All filesystems on the same pool have the same size, the size of the entire pool is available to all filesystems on it.
Code:
dice@maelcum:~ % zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
zroot               2.19G  47.7G    88K  /zroot
zroot/ROOT          2.05G  47.7G    88K  none
zroot/ROOT/default  2.05G  47.7G  2.05G  /
 
probably the other thing that's confusing is zfs vs zpool .. is easier to see on a little larger pool ..

zfs list
pool. used. free. mount
abyss 20.5T 40.9T 256K /abyss
vs
zpool list
pool. total. used. free
abyss 87.2T 28.3T 59.0T - - 0% 32% 1.00x ONLINE -

as you can see that the zfs list shows less space used.. and less space available then what the actual pool size shows... this is because zpool is essentially showing you the gross total amount of space (aka 12 x 8tb .. formats to 7.27TB x 12 = 87.24TB) .. and the zfs command is showing the net/after tax amount. Ie the space after checksums, copy-on-write and pointers/indexes and the redundancy level have been created .. Aka raidz3 loses 8.27x3 + overhead = 61ish TB useable

so even in this example

dice@maelcum:~ % zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 2.19G 47.7G 88K /zroot
zroot/ROOT 2.05G 47.7G 88K none
zroot/ROOT/default 2.05G 47.7G 2.05G /

zroot contains that extra .14G of space .. and the difference is the overhead of the pool itself.

traditional file systems generally only eve show the "net" space free and hide the rest.

the pool its self is always mounted under its own name as technically.. all datasets live under it and are only aliased via the zfs mount command ..
ie you could mount

zroot/var/log
or
/var/log
or
log

regardless they all belong to /zroot under the hood
 
Back
Top