Justin Vassallo wrote:>
> Hi,
>
> My swap is on raidz1. Df ?k and swap ?l are showing almost no usage of
> swap, while zfs list and zpool list are showing me 96% capacity. Which
> should i believe?
>
Believe all of them. They are only telling you what they know.
The problem might just be how to interpret what they say :-)
The man page for zfs says,
For volumes, specifies the logical size of the volume.
By default, creating a volume establishes a reservation
of equal size. For storage pools with a version number
of 9 or higher, a refreservation is set instead. Any
changes to volsize are reflected in an equivalent change
to the reservation (or refreservation). The volsize can
only be set to a multiple of volblocksize, and cannot be
zero.
The reservation is kept equal to the volume''s logical
size to prevent unexpected behavior for consumers.
Without the reservation, the volume could run out of
space, resulting in undefined behavior or data corrup-
tion, depending on how the volume is used. These effects
can also occur when the volume size is changed while it
is in use (particularly when shrinking the size).
Extreme care should be used when adjusting the volume
size.
So you can expect that the zfs or zpool commands will take into
account this space as being used/reserved. OTOH, the swap -l
command will show the actual use of the device at the present
time.
-- richard
> Justin
>
> # df -hk
>
> Filesystem size used avail capacity Mounted on
>
> /dev/dsk/c3t0d0s1 14G 4.0G 10G 28% /
>
> /devices 0K 0K 0K 0% /devices
>
> ctfs 0K 0K 0K 0% /system/contract
>
> proc 0K 0K 0K 0% /proc
>
> mnttab 0K 0K 0K 0% /etc/mnttab
>
> swap 6.4G 684K 6.4G 1% /etc/svc/volatile
>
> objfs 0K 0K 0K 0% /system/object
>
> /usr/lib/libc/libc_hwcap2.so.1
>
> 14G 4.0G 10G 28% /lib/libc.so.1
>
> fd 0K 0K 0K 0% /dev/fd
>
> swap 6.4G 28K 6.4G 1% /tmp
>
> swap 6.4G 24K 6.4G 1% /var/run
>
> swap 9.8G 24K 236M 1% /swap
>
> # swap -l
>
> swapfile dev swaplo blocks free
>
> /dev/zvol/dsk/swap/vol 181,1 8 19922936 19687704
>
> # zfs list
>
> NAME USED AVAIL REFER MOUNTPOINT
>
> swap 9.61G 236M 24.5K /swap
>
> swap/vol 9.61G 236M 9.61G -
>
> # zpool list
>
> NAME SIZE USED AVAIL CAP HEALTH ALTROOT
>
> swap 20G 19.2G 791M 96% ONLINE -
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
>