zfs send, recv questions

Alan Somers asomers at freebsd.org
Mon Feb 8 22:21:52 UTC 2021


"zfs recv" creates a new dataset; that's how it works.  And your guess is
correct about why mv must copy files when it crosses a mount point; those
are different file systems.  If they were different directories on the same
file system, then mv would be near-instant.  I don't know your situation,
so I don't know why it's not acceptable for zfs recv to create a new
dataset.  But if you must use an existing dataset, then there really isn't
a better option than cp.
-Alan

On Mon, Feb 8, 2021 at 3:07 PM joe mcguckin <joe at via.net> wrote:

>
>
> I’m using zfs send to populate the test box with some sample throwaway
> files. zfs recv wants the name of a non-existant directory/mountpoint that
> it will
> create with all the new files. Is there a way to have zfs add the files to
> an existing directory? I tried simply ‘mv’ing the files to another
> directory on the same pool
> (trying to add the files to an existing directory) - Usually on UFS this
> is very quick, just a quick change to the directory, but on zfs it’s
> recopying all the files; yet another 30 minute wait…
> I guess since this is going across a mount point, FreeBSD wants to make a
> copy.
>
> Is there a better way to achieve this?
>
> I’m cheating by doing ali of this as root, how to do zfs recv as non-root?
> The Lucas book did a lot of hand-waving without a concrete example.
>
> Thanks,
>
> Joe
>
>
> Joe McGuckin
> ViaNet Communications
>
> joe at via.net
> 650-207-0372 cell
> 650-213-1302 office
> 650-969-2124 fax
>
>
>
> > On Feb 8, 2021, at 1:06 PM, Freddie Cash <fjwcash at gmail.com> wrote:
> >
> >
> >
> >
> >
> > On Mon., Feb. 8, 2021, 12:27 p.m. joe mcguckin, <joe at via.net <mailto:
> joe at via.net>> wrote:
> > df -h reports 66T available
> >
> > zpool list says 102T
> >
> > Why the discrepency?
> >
> > This is on a system with 7 16Tb drives configured as raidz2.
> >
> > Thanks,
> >
> > Joe
> >
> >
> > Joe McGuckin
> > ViaNet Communications
> >
> > joe at via.net <mailto:joe at via.net>
> > 650-207-0372 cell
> > 650-213-1302 office
> > 650-969-2124 fax
> >
> > "zpool list" shows the raw storage available on the pool, across all the
> disks in the pool, minus some internal reserved storage.
> >
> > "zfs list" shows the usable storage space after all the parity drives
> are removed from the calculation.
> >
> > "df" output can be misleading as it doesn't take into account
> compression and reservations and things like that. It can give you an
> approximation of available space, but it won't be as accurate as "zfs list".
> >
> > For example, if you have 6x 2 TB drives configured as a single raidz2
> vdev, then:
> >
> > zpool list: around 12 TB (6 drives x 2 TB)
> > zfs list: around 8 TB (4 data drives x 2 TB)
> > df: should be around 8 TB
> >
> > Cheers,
> > Freddie
> >
> > Typos due to smartphone keyboard.
>
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>


More information about the freebsd-fs mailing list