ZFS snapshots on Xserver G5

Hi all!

I have fresh-installed FreeBSD on Apple Xserver G5.

Code:
FreeBSD 9.2-RELEASE #0 r256722M: Sat Oct 19 14:34:58 MSK 2013
    root@:/usr/obj/usr/src/sys/GENERIC64 powerpc
gcc version 4.2.1 20070831 patched [FreeBSD]
cpu0: IBM PowerPC 970FX revision 3.0, 1800.30 MHz
cpu0: Features dc000000<PPC32,PPC64,ALTIVEC,FPU,MMU>
cpu0: HID0 511081<NAP,DPM,NHR,TBEN,ENATTN>
real memory  = 4270002176 (4072 MB)
avail memory = 4028391424 (3841 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0: dev=ff88ed18 (BSP)
cpu1: dev=ff890150
Some of the file systems are on ZFS.

When I try to make snapshot of any ZFS it lasts until interruption (I waited six hours - it hasn't finished).

Code:
# zfs snapshot zroot/tmp@snap1
^C
Code:
# zpool list
NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
zaux    149G   138K   149G     0%  1.00x  ONLINE  -
zroot   366G  5.29G   361G     1%  1.00x  ONLINE  -
Code:
# zfs list
NAME                        USED  AVAIL  REFER  MOUNTPOINT
zaux                        112K   147G    31K  /zaux
zroot                      5.29G   355G  29.6M  /
zroot/tmp                   216K   355G   216K  /tmp
zroot/usr                  5.25G   355G  3.32G  /usr
zroot/usr/home              144K   355G   144K  /usr/home
zroot/usr/ports             918M   355G   832M  /usr/ports
zroot/usr/ports/distfiles  85.8M   355G  85.8M  /usr/ports/distfiles
zroot/usr/ports/packages    144K   355G   144K  /usr/ports/packages
zroot/usr/src              1.04G   355G  1.04G  /usr/src
zroot/var                  7.96M   355G  1012K  /var
zroot/var/crash             148K   355G   148K  /var/crash
zroot/var/db               5.90M   355G  4.43M  /var/db
zroot/var/db/pkg           1.47M   355G  1.47M  /var/db/pkg
zroot/var/empty             144K   355G   144K  /var/empty
zroot/var/log               300K   355G   300K  /var/log
zroot/var/mail              144K   355G   144K  /var/mail
zroot/var/run               208K   355G   208K  /var/run
zroot/var/tmp               152K   355G   152K  /var/tmp
I've never seen such behaviour on an i386 or amd64 host so I suppose it is a powerpc64-specific bug.

I would appreciate any assistance.
 
Me too..

Just installed 9.2-RELEASE on a G5, and am seeing the same issue. When using truss, I see the last thing it does before hitting 100% is
Code:
open(/dev/zero...

/Eirik
 
@baspr: Snapshots on 1% used pools take 6 seconds - not hours.
# zfs snapshot zroot/tmp@snap1
Why on earth would you take snapshots of your /tmp folder? It gets truncated on reboot anyway. I would guess that the cause of your problem was constantly changing metadata; that is, since /tmp is constantly changing, zfs snapshot had to constantly re-adjust and thus the infinite loop you observed.

@ltning: Not clear whether you also tried to take a snapshot of /tmp (or a snapshot of all datasets).
 
Last edited by a moderator:
Hi! Thank you for reply. I chose /tmp just as example. There is the same behaviour with other file systems.
 
I believe this is a genuine bug in freebsd-zfs on powerpc/powerpc64 (not sure if it applies to 32bit platform).

Can anyone volunteer opening a PR on this? I don't have access to that box today ..
 
Actually, can someone try on a recent 10.x snapshot? Would be interesting to see if the move to clang changes things (or is that userland-only? I can't remember).. I noticed that on PPC64 it makes a huge difference which compiler you use for various tasks/ports; ffmpeg won't compile at all with stock gcc, but needs gcc47 from ports. In other places it's the other way round. gcc47 won't build with stock gcc so it needs to be completely bootstrapped, which takes the better part of a day. It's a bit of a mess, really.
 
I can confirm that at least 10-1-RC1 and 11.0-CURRENT-r271779 seem to work, I could create snapshots of my zroot from within the live CD and for 11.0-CURRENT the installed system as well.
 
Back
Top