Date: Thu, 23 Jan 2014 12:58:45 +1030 From: Shane Ambler <FreeBSD@ShaneWare.Biz> To: Chris Stankevitz <chrisstankevitz@gmail.com>, Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-questions@freebsd.org Subject: Re: ZFS: pool vs FS Message-ID: <52E07E5D.4080900@ShaneWare.Biz> In-Reply-To: <CAPi0pstg7X1Y43K_21usCPzn3nDvtaLiMcnV=AS2yNGUT5neMA@mail.gmail.com> References: <CAPi0psvd%2B%2BLdTf_STaAytnNSrwMWsj3dhM8Mho=Wb-XbAWojZw@mail.gmail.com> <20140122204828.GA6033@dan.emsphone.com> <CAPi0pstg7X1Y43K_21usCPzn3nDvtaLiMcnV=AS2yNGUT5neMA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 23/01/2014 08:31, Chris Stankevitz wrote: > On Wed, Jan 22, 2014 at 12:48 PM, Dan Nelson <dnelson@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@123 > > Let's try to replicate: > > # zfs send pool1@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@123 | zfs recv -F pool2 > # zfs list -t snapshot > NAME USED AVAIL REFER MOUNTPOINT > pool1@123 18.5K - 31.5K - > pool1@124 0 - 31.5K - > pool2@123 0 - 31.5K - > > So far so good. And let's try another replication: > > # echo qwer > /pool1/file.txt > # zfs snapshot pool1@124 > # zfs send pool1@124 | zfs recv pool2 > cannot receive new filesystem stream: destination 'pool2' exists > must specify -F to overwrite it > # zfs send pool1@124 | zfs recv -F pool2 > cannot receive new filesystem stream: destination has snapshots (eg. pool2@123) > must destroy them to overwrite it The filesystem specified as the destination for recv must not exist therefore the need to -F the destination. The next snapshots should then be incremental or sent to a different filesystem. So we end up with the following steps - # zfs snapshot pool1@123 # zfs send pool1@123 | zfs recv pool2/pool1snaps # zfs snapshot pool1@124 # zfs send -i 123 pool1@124 | zfs recv pool2/pool1snaps this sends snapshot 124 as an incremental change from 123 # zfs snapshot pool1@125 # zfs send -i 124 pool1@125 | zfs recv pool2/pool1snaps this sends snapshot 125 as an incremental change from 124
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52E07E5D.4080900>