Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Let's test this zfs send recv
[dan@slocum:~] $ sudo touch /tank_fast/zrootd
[dan@slocum:~] $ sudo dd if=/dev/zero of=/tank_fast/zrootd bs=1k count=1 seek=70M
1+0 records in
1+0 records out
1024 bytes transferred in 0.000138 secs (7420666 bytes/sec)
# wow, no time at all
[dan@slocum:~] $ ls -l /tank_fast/
total 2
drwxr-xr-x 2 root wheel 2 Sep 18 21:00 dev-ingress01
drwxr-xr-x 4 root wheel 4 Nov 20 2017 top-level
-rw-r--r-- 1 root wheel 75161928704 Dec 30 16:10 zrootd
[dan@slocum:~] $ ls -lh /tank_fast/
total 2
drwxr-xr-x 2 root wheel 2B Sep 18 21:00 dev-ingress01
drwxr-xr-x 4 root wheel 4B Nov 20 2017 top-level
-rw-r--r-- 1 root wheel 70G Dec 30 16:10 zrootd
# let's create
[dan@slocum:~] $ sudo zpool create zrootd /tank_fast/zrootdast/zrootd
[dan@slocum:~] $ zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dev-ingress01 9.94G 1.90G 8.04G - - 56% 19% 1.00x ONLINE -
jester 9.94G 1.01G 8.93G - - 32% 10% 1.00x ONLINE -
system 27.2T 6.05T 21.2T - - 35% 22% 1.00x ONLINE -
tank_fast 398G 23.0G 375G - - 46% 5% 1.00x ONLINE -
zrootd 69.5G 94.5K 69.5G - - 0% 0% 1.00x ONLINE -
# Umm, it's there, right there
[dan@slocum:~] $ sudo zfs snapshot -r system/bootenv@Before.zrootd
[root@slocum:~] # zfs send -R system/bootenv@Before.zrootd | zfs recv -u zrootd/bootenv
[dan@slocum:~] $ zfs get -t filesystem -r mounted zrootd/bootenv
NAME PROPERTY VALUE SOURCE
zrootd/bootenv mounted no -
zrootd/bootenv/11.1-RELEASE mounted no -
zrootd/bootenv/11.1-RELEASE/tmp mounted no -
zrootd/bootenv/11.1-RELEASE/usr mounted no -
zrootd/bootenv/11.1-RELEASE/usr/local mounted no -
zrootd/bootenv/11.1-RELEASE/usr/obj mounted no -
zrootd/bootenv/11.1-RELEASE/usr/src mounted no -
zrootd/bootenv/11.1-RELEASE/var mounted no -
zrootd/bootenv/11.1-RELEASE/var/audit mounted no -
zrootd/bootenv/11.1-RELEASE/var/empty mounted no -
zrootd/bootenv/11.1-RELEASE/var/log mounted no -
zrootd/bootenv/11.1-RELEASE/var/tmp mounted no -
zrootd/bootenv/11.2-RELEASE mounted no -
zrootd/bootenv/11.2-RELEASE/tmp mounted no -
zrootd/bootenv/11.2-RELEASE/usr mounted no -
zrootd/bootenv/11.2-RELEASE/usr/local mounted no -
zrootd/bootenv/11.2-RELEASE/usr/obj mounted no -
zrootd/bootenv/11.2-RELEASE/usr/src mounted no -
zrootd/bootenv/11.2-RELEASE/var mounted no -
zrootd/bootenv/11.2-RELEASE/var/audit mounted no -
zrootd/bootenv/11.2-RELEASE/var/empty mounted no -
zrootd/bootenv/11.2-RELEASE/var/log mounted no -
zrootd/bootenv/11.2-RELEASE/var/tmp mounted no -
zrootd/bootenv/default mounted no -
zrootd/bootenv/default/tmp mounted no -
zrootd/bootenv/default/usr mounted no -
zrootd/bootenv/default/usr/local mounted no -
zrootd/bootenv/default/usr/obj mounted no -
zrootd/bootenv/default/usr/src mounted no -
zrootd/bootenv/default/var mounted no -
zrootd/bootenv/default/var/audit mounted no -
zrootd/bootenv/default/var/empty mounted no -
zrootd/bootenv/default/var/log mounted no -
zrootd/bootenv/default/var/tmp mounted no -
[dan@slocum:~] $ zfs get -t filesystem -r mounted zrootd/bootenv
NAME PROPERTY VALUE SOURCE
zrootd/bootenv mounted no -
zrootd/bootenv/11.1-RELEASE mounted no -
zrootd/bootenv/11.1-RELEASE/tmp mounted no -
zrootd/bootenv/11.1-RELEASE/usr mounted no -
zrootd/bootenv/11.1-RELEASE/usr/local mounted no -
zrootd/bootenv/11.1-RELEASE/usr/obj mounted no -
zrootd/bootenv/11.1-RELEASE/usr/src mounted no -
zrootd/bootenv/11.1-RELEASE/var mounted no -
zrootd/bootenv/11.1-RELEASE/var/audit mounted no -
zrootd/bootenv/11.1-RELEASE/var/empty mounted no -
zrootd/bootenv/11.1-RELEASE/var/log mounted no -
zrootd/bootenv/11.1-RELEASE/var/tmp mounted no -
zrootd/bootenv/11.2-RELEASE mounted no -
zrootd/bootenv/11.2-RELEASE/tmp mounted no -
zrootd/bootenv/11.2-RELEASE/usr mounted no -
zrootd/bootenv/11.2-RELEASE/usr/local mounted no -
zrootd/bootenv/11.2-RELEASE/usr/obj mounted no -
zrootd/bootenv/11.2-RELEASE/usr/src mounted no -
zrootd/bootenv/11.2-RELEASE/var mounted no -
zrootd/bootenv/11.2-RELEASE/var/audit mounted no -
zrootd/bootenv/11.2-RELEASE/var/empty mounted no -
zrootd/bootenv/11.2-RELEASE/var/log mounted no -
zrootd/bootenv/11.2-RELEASE/var/tmp mounted no -
zrootd/bootenv/default mounted no -
zrootd/bootenv/default/tmp mounted no -
zrootd/bootenv/default/usr mounted no -
zrootd/bootenv/default/usr/local mounted no -
zrootd/bootenv/default/usr/obj mounted no -
zrootd/bootenv/default/usr/src mounted no -
zrootd/bootenv/default/var mounted no -
zrootd/bootenv/default/var/audit mounted no -
zrootd/bootenv/default/var/empty mounted no -
zrootd/bootenv/default/var/log mounted no -
zrootd/bootenv/default/var/tmp mounted no -
[dan@slocum:~] $ zfs get -t filesystem -r mountpoint zrootd/bootenv
NAME PROPERTY VALUE SOURCE
zrootd/bootenv mountpoint legacy received
zrootd/bootenv/11.1-RELEASE mountpoint / received
zrootd/bootenv/11.1-RELEASE/tmp mountpoint /tmp inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr mountpoint /usr inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr/local mountpoint /usr/local inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr/obj mountpoint /usr/obj inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr/src mountpoint /usr/src inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var mountpoint /var inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/audit mountpoint /var/audit inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/empty mountpoint /var/empty inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/log mountpoint /var/log inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/tmp mountpoint /var/tmp inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.2-RELEASE mountpoint / received
zrootd/bootenv/11.2-RELEASE/tmp mountpoint /tmp inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr mountpoint /usr inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr/local mountpoint /usr/local inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr/obj mountpoint /usr/obj inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr/src mountpoint /usr/src inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var mountpoint /var inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/audit mountpoint /var/audit inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/empty mountpoint /var/empty inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/log mountpoint /var/log inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/tmp mountpoint /var/tmp inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/default mountpoint / received
zrootd/bootenv/default/tmp mountpoint /tmp inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr mountpoint /usr inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr/local mountpoint /usr/local inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr/obj mountpoint /usr/obj inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr/src mountpoint /usr/src inherited from zrootd/bootenv/default
zrootd/bootenv/default/var mountpoint /var inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/audit mountpoint /var/audit inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/empty mountpoint /var/empty inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/log mountpoint /var/log inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/tmp mountpoint /var/tmp inherited from zrootd/bootenv/default
This disables the mounting on that one zpool, in this case the experimental zpool.
If I was doing this for real, I would have done this on system/bootenv/default
[dan@slocum:~] $ sudo zfs set mountpoint=none zrootd/bootenv/default
[dan@slocum:~] $ zfs get -t filesystem -r mountpoint zrootd/bootenv
NAME PROPERTY VALUE SOURCE
zrootd/bootenv mountpoint legacy received
zrootd/bootenv/11.1-RELEASE mountpoint / received
zrootd/bootenv/11.1-RELEASE/tmp mountpoint /tmp inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr mountpoint /usr inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr/local mountpoint /usr/local inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr/obj mountpoint /usr/obj inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/usr/src mountpoint /usr/src inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var mountpoint /var inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/audit mountpoint /var/audit inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/empty mountpoint /var/empty inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/log mountpoint /var/log inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.1-RELEASE/var/tmp mountpoint /var/tmp inherited from zrootd/bootenv/11.1-RELEASE
zrootd/bootenv/11.2-RELEASE mountpoint / received
zrootd/bootenv/11.2-RELEASE/tmp mountpoint /tmp inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr mountpoint /usr inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr/local mountpoint /usr/local inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr/obj mountpoint /usr/obj inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/usr/src mountpoint /usr/src inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var mountpoint /var inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/audit mountpoint /var/audit inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/empty mountpoint /var/empty inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/log mountpoint /var/log inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/11.2-RELEASE/var/tmp mountpoint /var/tmp inherited from zrootd/bootenv/11.2-RELEASE
zrootd/bootenv/default mountpoint none local
zrootd/bootenv/default/tmp mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr/local mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr/obj mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/usr/src mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/var mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/audit mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/empty mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/log mountpoint none inherited from zrootd/bootenv/default
zrootd/bootenv/default/var/tmp mountpoint none inherited from zrootd/bootenv/default
[dan@slocum:~] $
For added safety, let's set canmount = off
[dan@slocum:~] $ sudo zfs set canmount=off zrootd/bootenv/default
[dan@slocum:~] $ zfs get -t filesystem -r canmount zrootd/bootenv
NAME PROPERTY VALUE SOURCE
zrootd/bootenv canmount on default
zrootd/bootenv/11.1-RELEASE canmount off received
zrootd/bootenv/11.1-RELEASE/tmp canmount off received
zrootd/bootenv/11.1-RELEASE/usr canmount off received
zrootd/bootenv/11.1-RELEASE/usr/local canmount off received
zrootd/bootenv/11.1-RELEASE/usr/obj canmount off received
zrootd/bootenv/11.1-RELEASE/usr/src canmount off received
zrootd/bootenv/11.1-RELEASE/var canmount off received
zrootd/bootenv/11.1-RELEASE/var/audit canmount off received
zrootd/bootenv/11.1-RELEASE/var/empty canmount off received
zrootd/bootenv/11.1-RELEASE/var/log canmount off received
zrootd/bootenv/11.1-RELEASE/var/tmp canmount off received
zrootd/bootenv/11.2-RELEASE canmount off received
zrootd/bootenv/11.2-RELEASE/tmp canmount off received
zrootd/bootenv/11.2-RELEASE/usr canmount off received
zrootd/bootenv/11.2-RELEASE/usr/local canmount off received
zrootd/bootenv/11.2-RELEASE/usr/obj canmount off received
zrootd/bootenv/11.2-RELEASE/usr/src canmount off received
zrootd/bootenv/11.2-RELEASE/var canmount off received
zrootd/bootenv/11.2-RELEASE/var/audit canmount off received
zrootd/bootenv/11.2-RELEASE/var/empty canmount off received
zrootd/bootenv/11.2-RELEASE/var/log canmount off received
zrootd/bootenv/11.2-RELEASE/var/tmp canmount off received
zrootd/bootenv/default canmount off local
zrootd/bootenv/default/tmp canmount on received
zrootd/bootenv/default/usr canmount on received
zrootd/bootenv/default/usr/local canmount on received
zrootd/bootenv/default/usr/obj canmount on received
zrootd/bootenv/default/usr/src canmount off received
zrootd/bootenv/default/var canmount on received
zrootd/bootenv/default/var/audit canmount on received
zrootd/bootenv/default/var/empty canmount on received
zrootd/bootenv/default/var/log canmount on received
zrootd/bootenv/default/var/tmp canmount on received
[dan@slocum:~] $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.