Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Apr 2009 14:20:11 -0700
From:      George Hartzell <hartzell@alerce.com>
To:        freebsd-current@freebsd.org
Subject:   "zfs send -R data@now | zfs receive -vdF backups" odd behaviour
Message-ID:  <m0iqle4zck.fsf@alerce.com>

next in thread | raw e-mail | index | archive | help

[
 I thought I sent this back in early March, but I never heard anything
 and don't see in the archives, so I'm hoping that I dropped the ball.
]

I have a -CURRENT system csup'ed last night, with the small patch from
PR bin/130105 so that 'zfs send -R' works.

My system has two disks in a mirrored pool named data.  The disks are
both partitioned using GPT (freebsd-boot, freebsd-swap, freebsd-zfs)
and use gptzfsboot.

I also have a third disk that is partitioned as above.

If I create a new zpool on that third disk named backups, take a
recursive snapshot of data and then send the filesystems stored on
data to backups, I end up with *one* filesystem mounted twice.  In
other words, after doing the send and receive, /home has been mounted
from data/home and then also mounted from backups/home.

I'm confused about two points:

  - all of the filesystems on data seem to have all of the same
    attributes set, yet only data@home ends up mounted.

  - why does anything from backups end up mounted?

Is the behavious I'm seeing to be expected?

I've attached a script below



Script started on Sat Mar  7 13:38:31 2009
> zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
data   276G  5.74G   271G     2%  ONLINE  -
> sudo zpool create backups ad13p3
Password:
> zpool list
NAME      SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
backups  90.5G  73.5K  90.5G     0%  ONLINE  -
data      276G  5.74G   271G     2%  ONLINE  -
> sudo zfs destroy -r data@now
> sudo zfs snapshot -r data@now
> df
Filesystem 1K-blocks    Used     Avail Capacity  Mounted on
data       279913472  530944 279382528     0%    /
devfs              1       1         0   100%    /dev
data/home  279382528       0 279382528     0%    /home
data/tmp   279382528       0 279382528     0%    /tmp
data/usr   284771072 5388544 279382528     2%    /usr
data/var   279478912   96384 279382528     0%    /var
backups     93413248       0  93413248     0%    /backups
> sudo zfs send -R data@now | sudo zfs receive -vdF backups
receiving full stream of data@now into backups@now
received 521MB stream in 29 seconds (18.0MB/sec)
receiving full stream of data/home@now into backups/home@now
received 40.0KB stream in 1 seconds (40.0KB/sec)
receiving full stream of data/usr@now into backups/usr@now
received 5.34GB stream in 338 seconds (16.2MB/sec)
receiving full stream of data/var@now into backups/var@now
received 112MB stream in 14 seconds (8.02MB/sec)
receiving full stream of data/tmp@now into backups/tmp@now
received 99.7KB stream in 1 seconds (99.7KB/sec)
> df
Filesystem   1K-blocks    Used     Avail Capacity  Mounted on
data         279912960  530944 279382016     0%    /
devfs                1       1         0   100%    /dev
data/home    279382016       0 279382016     0%    /home
data/tmp     279382016       0 279382016     0%    /tmp
data/usr     284770560 5388544 279382016     2%    /usr
data/var     279478400   96384 279382016     0%    /var
backups/home  87396864       0  87396864     0%    /home
> sudo umount /home
Password:
> df
Filesystem 1K-blocks    Used     Avail Capacity  Mounted on
data       279912960  530944 279382016     0%    /
devfs              1       1         0   100%    /dev
data/home  279382016       0 279382016     0%    /home
data/tmp   279382016       0 279382016     0%    /tmp
data/usr   284770560 5388544 279382016     2%    /usr
data/var   279478400   96384 279382016     0%    /var
> ^Dexit

Script done on Sat Mar  7 13:48:15 2009



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0iqle4zck.fsf>