Free space on ZFS is not reported correctly(?)

Adam Nowacki nowakpl at platinum.linux.pl
Wed Feb 17 01:09:35 UTC 2016


On 2016-02-16 08:07, namaedayo wrote:
> I’m Japanese.
> My English ability is not native level, So if I say something wrong,
> please don’t be offended.
> The clumsy is sorry because it is generated by Google translation.
> 
> Free space on ZFS is not reported correctly.
> There is a "zpool list -v" in sufficient disk space, but dataset other
> than zvol can not use it.

By default zvols have refreservation property set to zvol size. You can
set it to 'none' to make unused zvol disk space available to other datasets.

> Chassis : HP Prolient ML110 G7
> CPU : Xeon E3-1220
> Memory : 32GB ECC
> HDD : TOSHIBA DT01ACA300 x4
> SSD : Intel SSD DC S3500 80GB
> 
> ZIL 8GB, L2ARC 16GB (L2ARC has been temporarily manually disabled by D2764)
> 
> $ uname -a
> FreeBSD namaedayo-hp.local 10.2-RELEASE-p8 FreeBSD 10.2-RELEASE-p8 #14
> r292713: Fri Dec 25 11:49:13 JST 2015
> root at namaedayo-hp.local:/usr/obj/usr/src/sys/NAMAEDAYO  amd64
> 
> $ zpool list -v
> NAME         SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
> zpool0      5.44T  4.58T   881G         -    23%    84%  2.08x  ONLINE  -
>   mirror    2.72T  2.29T   441G         -    24%    84%
>     ada0p2      -      -      -         -      -      -
>     ada2p2      -      -      -         -      -      -
>   mirror    2.72T  2.29T   441G         -    23%    84%
>     ada1p2      -      -      -         -      -      -
>     ada3p2      -      -      -         -      -      -
>   ada4p2    7.94G  1.51M  7.94G         -    33%     0%
> 
> $ zfs list
> NAME                                                USED  AVAIL  REFER
>  MOUNTPOINT
> zpool0                                             5.25T  45.3G   216K  /zpool0
> zpool0/FreeBSD-Buckup                               169G  45.3G   169G
>  /zpool0/FreeBSD-Buckup
> zpool0/FreeBSD-Root                                 862G  45.3G   810G  /
> zpool0/Ubuntu-14-04_server                          206G   230G  21.9G  -
> zpool0/Ubuntu_Desktop                              82.5G   121G  7.18G  -
> zpool0/Ubuntu_Desktop-i386                          135G   115G  48.9G  -
> zpool0/freebsd-swap                                66.0G  95.2G  16.1G  -
> zpool0/namae-iSCSI                                 82.5G  68.5G  59.3G  -
> zpool0/namaedayo_work                               351G  45.3G   346G
>  /zpool0/namaedayo_work
> zpool0/test-dedup                                  53.8G  45.3G  53.8G
>  /zpool0/test-dedup
> zpool0/test-lz4                                    47.8G  45.3G  47.8G
>  /zpool0/test-lz4
> (Omitted because too much)
> 
> $ df -h
> Filesystem                                           Size    Used
> Avail Capacity  Mounted on
> zpool0/FreeBSD-Root                                  855G    810G
> 45G    95%    /
> devfs                                                1.0K    1.0K
> 0B   100%    /dev
> linprocfs                                            4.0K    4.0K
> 0B   100%    /compat/linux/proc
> linsysfs                                             4.0K    4.0K
> 0B   100%    /compat/linux/sys
> fdescfs                                              1.0K    1.0K
> 0B   100%    /dev/fd
> procfs                                               4.0K    4.0K
> 0B   100%    /proc
> zpool0/FreeBSD-Buckup                                214G    169G
> 45G    79%    /zpool0/FreeBSD-Buckup
> zpool0/namaedayo_work                                391G    346G
> 45G    88%    /zpool0/namaedayo_work
> zpool0/test-dedup                                     99G     54G
> 45G    54%    /zpool0/test-dedup
> zpool0/test-lz4                                       93G     48G
> 45G    51%    /zpool0/test-lz4
> (Omitted because too much)
> 
> $ gpart show
> =>        34  5860533101  ada0  GPT  (2.7T)
>           34           6        - free -  (3.0K)
>           40         128     1  freebsd-boot  (64K)
>          168  5860532960     2  freebsd-zfs  (2.7T)
>   5860533128           7        - free -  (3.5K)
> 
> =>        34  5860533101  ada1  GPT  (2.7T)
>           34           6        - free -  (3.0K)
>           40         128     1  freebsd-boot  (64K)
>          168  5860532960     2  freebsd-zfs  (2.7T)
>   5860533128           7        - free -  (3.5K)
> 
> =>        34  5860533101  ada2  GPT  (2.7T)
>           34           6        - free -  (3.0K)
>           40         128     1  freebsd-boot  (64K)
>          168  5860532960     2  freebsd-zfs  (2.7T)
>   5860533128           7        - free -  (3.5K)
> 
> =>        34  5860533101  ada3  GPT  (2.7T)
>           34           6        - free -  (3.0K)
>           40         128     1  freebsd-boot  (64K)
>          168  5860532960     2  freebsd-zfs  (2.7T)
>   5860533128           7        - free -  (3.5K)
> 
> =>       34  156301421  ada4  GPT  (75G)
>          34          6        - free -  (3.0K)
>          40       1024     1  freebsd-boot  (512K)
>        1064   16777216     2  freebsd-zfs  (8.0G)
>    16778280   33554432     3  freebsd-zfs  (16G)
>    50332712  105968743        - free -  (51G)
> 
> # zdb -C zpool0 | grep 'ashift'
> ashift: 12
> 
> $ zfs get compressratio zpool0
> NAME    PROPERTY       VALUE  SOURCE
> zpool0  compressratio  1.13x  -
> 
> $ zpool status
>   pool: zpool0
>  state: ONLINE
>   scan: resilvered 1.78T in 3h27m with 0 errors on Tue Jul 15 10:11:44 2014
> config:
> 
>         NAME        STATE     READ WRITE CKSUM
>         zpool0      ONLINE       0     0     0
>           mirror-0  ONLINE       0     0     0
>             ada0p2  ONLINE       0     0     0
>             ada2p2  ONLINE       0     0     0
>           mirror-1  ONLINE       0     0     0
>             ada1p2  ONLINE       0     0     0
>             ada3p2  ONLINE       0     0     0
>         logs
>           ada4p2    ONLINE       0     0     0
> 
> errors: No known data errors
> _______________________________________________
> 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