ZFS: pool vs FS

Chris Stankevitz chrisstankevitz at gmail.com
Wed Jan 22 22:01:41 UTC 2014


On Wed, Jan 22, 2014 at 12:48 PM, Dan Nelson <dnelson at allantgroup.com> wrote:
> "zpool create" does create a filesystem

Dan,

Thank you.  I suspected this was the case (the FreeBSD handbook
certainly implies this).  Now that we have that out of the way I can
ask my real question:

Can you identify the concept I am missing as evidenced by this failure:

===

# truncate -s 100m disk1
# truncate -s 100m disk2
# zpool create pool1 /root/disk1
# zpool create pool2 /root/disk2

So far so good... however, the next lines concern me.  Some people
seem to say "Wait, /pool1 is not a good filesystem to start using you
need to uze 'zfs create' first".  However your comment leads me to
believe that /pool1 is okay to start using right away.

# echo asdf > /pool1/file.txt
# zfs snapshot pool1 at 123

Let's try to replicate:

# zfs send pool1 at 123 | zfs recv pool2
cannot receive new filesystem stream: destination 'pool2' exists
must specify -F to overwrite it

Okay we have a problem.  This is the heart of my misunderstanding.
But I'll try to power through:

# zfs send pool1 at 123 | zfs recv -F pool2
# zfs list -t snapshot
NAME        USED  AVAIL  REFER  MOUNTPOINT
pool1 at 123  18.5K      -  31.5K  -
pool1 at 124      0      -  31.5K  -
pool2 at 123      0      -  31.5K  -

So far so good.  And let's try another replication:

# echo qwer > /pool1/file.txt
# zfs snapshot pool1 at 124
# zfs send pool1 at 124 | zfs recv pool2
cannot receive new filesystem stream: destination 'pool2' exists
must specify -F to overwrite it
# zfs send pool1 at 124 | zfs recv -F pool2
cannot receive new filesystem stream: destination has snapshots (eg. pool2 at 123)
must destroy them to overwrite it

# echo Okay I do not understand what is happening.

Thank you,

Chris


More information about the freebsd-questions mailing list