The core of my problem is that I can't create snapshots of my FreeBSD 10.0 /usr dataset.
I only have one zpool which is called "zroot" that is generated by FreeBSD on my rooted ZFS FreeBSD 10.0 installation on a single disk.
My disk layout is as follows
Thus it is not possible to create another pool. Which means I have to work with datasets like zroot/usr which are created at the installation by FreeBSD.
Now I want to be able to create a snapshot of zroot/usr because when I get, for example, problems with (an upgrade of) any of my installed user software, I just could do a rollback to return to the situation before the problem originated. This is one of the most important reasons why I started using ZFS.
But as I will show underneath, it seems to be impossible to create a snapshot of zroot/usr.
This is what happens:
First I will display all datasets in my system after a clean install:
Then:
zroot/usr seems not to be mounted:
which means:
So now I do:
see what is in /usr:
but when zroot/usr is not mounted I can not make a snapshot!
When I do:
But now, when I do:
I really don't know what is the reason that I can't make a new dataset at zroot/usr
Also I don't understand, though zroot/usr is not mounted, everything is working normally in /usr. Could I be in a jail enviroment? Is there anywhere a manual how FreeBDS 10.0 installs the ZFS root enviroment?
Anybody who can tell me what I am doing wrong? As for me it does not make sense to work with rooted ZFS if it is not possible to make snapshots of my system files?
If that should be the case it is maybe better not to work with a ZFS rooted system, but install ZFS on UFS
I only have one zpool which is called "zroot" that is generated by FreeBSD on my rooted ZFS FreeBSD 10.0 installation on a single disk.
My disk layout is as follows
gpart show
Code:
[NOPARSE]=> 34 2047999933 vtbd0 GPT (977G)
34 1024 1 freebsd-boot (512K)
1058 67108864 2 freebsd-swap (32G)
67109922 1980890045 3 freebsd-zfs (945G)[/NOPARSE]
Thus it is not possible to create another pool. Which means I have to work with datasets like zroot/usr which are created at the installation by FreeBSD.
Now I want to be able to create a snapshot of zroot/usr because when I get, for example, problems with (an upgrade of) any of my installed user software, I just could do a rollback to return to the situation before the problem originated. This is one of the most important reasons why I started using ZFS.
But as I will show underneath, it seems to be impossible to create a snapshot of zroot/usr.
This is what happens:
First I will display all datasets in my system after a clean install:
zfs list
Code:
[NOPARSE]NAME USED AVAIL REFER MOUNTPOINT
zroot 2.65G 927G 148K none
zroot/ROOT 1.49G 927G 144K none
zroot/ROOT/default 1.49G 927G 1.49G /
zroot/tmp 264K 927G 264K /tmp
zroot/usr 813M 927G 144K /usr
zroot/usr/home 196K 927G 196K /usr/home
zroot/usr/ports 813M 927G 813M /usr/ports
zroot/usr/src 144K 927G 144K /usr/src
zroot/var 375M 927G 374M /var
zroot/var/crash 148K 927G 148K /var/crash
zroot/var/log 748K 927G 748K /var/log
zroot/var/mail 216K 927G 216K /var/mail
zroot/var/tmp 200K 927G 200K /var/tmp[/NOPARSE]
Then:
zfs mount
Code:
[NOPARSE]zroot/ROOT/default /
zroot/tmp /tmp
zroot/usr/home /usr/home
zroot/usr/ports /usr/ports
zroot/usr/src /usr/src
zroot/var /var
zroot/var/crash /var/crash
zroot/var/log /var/log
zroot/var/mail /var/mail
zroot/var/tmp /var/tmp[/NOPARSE]
zroot/usr seems not to be mounted:
zfs get mounted zroot/usr
Code:
[NOPARSE]NAME PROPERTY VALUE SOURCE
zroot/usr mounted no -[/NOPARSE]
which means:
canmount=off
So now I do:
zfs set canmount=on zroot/usr
see what is in /usr:
ls /usr
Code:
bin games home include lib lib32 libdata libexec local obj ports sbin share src tests
but when zroot/usr is not mounted I can not make a snapshot!
zfs snapshot -r zroot/usr/snap1
Code:
[NOPARSE]usage:
snapshot [-r] [-o property=value] ... <filesystem@snapname|volume@snapname> ...
For the property list, run: zfs set|get
For the delegated permission list, run: zfs allow|unallow[/NOPARSE]
When I do:
zfs mount -a
zroot/usr will be mounted zfs get mounted zroot/usr
Code:
[NOPARSE]NAME PROPERTY VALUE SOURCE
zroot/usr mounted yes -[/NOPARSE]
But now, when I do:
ls /usr
zroot/usr is completely empty and also lost the connections with all files in /usrI really don't know what is the reason that I can't make a new dataset at zroot/usr
Also I don't understand, though zroot/usr is not mounted, everything is working normally in /usr. Could I be in a jail enviroment? Is there anywhere a manual how FreeBDS 10.0 installs the ZFS root enviroment?
Anybody who can tell me what I am doing wrong? As for me it does not make sense to work with rooted ZFS if it is not possible to make snapshots of my system files?
If that should be the case it is maybe better not to work with a ZFS rooted system, but install ZFS on UFS