Karl Rossing wrote:> $zfs list
> NAME USED AVAIL REFER MOUNTPOINT
> rpool 48.4G 10.6G 31K /rpool
> rpool/ROOT 36.4G 10.6G 18K /rpool/ROOT
> rpool/ROOT/snv_90_zfs 29.6G 10.6G 29.3G /.alt.tmp.b-Ugf.mnt/
> rpool/ROOT/snv_90_zfs at snv_93 319M - 29.6G -
> rpool/ROOT/snv_93 6.82G 10.6G 16.3G /
> rpool/dump 3.95G 10.6G 3.95G -
> rpool/swap 8.00G 17.6G 1.05G -
>
> I''m on build 93. I would like to shrink swap.
>
> Is it as simple as "zfs set volsize=4G rpool/swap" on a live
system? Is
> there anything else I need to do?
>
Yes. You need to remove it from use first.
# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 182,2 8 4194296 4194296
# zfs get volsize rpool/swap
NAME PROPERTY VALUE SOURCE
rpool/swap volsize 2G -
# swap -d /dev/zvol/dsk/rpool/swap
# swap -l
No swap devices configured
# zfs set volsize=1G rpool/swap
# /sbin/swapadd
# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 182,2 8 2097144 2097144
Note: in the first "swap -l" above, blocks == free, so the swap device
was not actually being used. If your swap device is in use, then you
might not be able to delete it, so you''ll have to make another, then
shuffle the data around.
-- richard> Thanks
> Karl
>
>
>
>
>
>
>
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE: This communication (including all attachments) is
> confidential and is intended for the use of the named addressee(s) only and
> may contain information that is private, confidential, privileged, and
> exempt from disclosure under law. All rights to privilege are expressly
> claimed and reserved and are not waived. Any use, dissemination,
> distribution, copying or disclosure of this message and any attachments, in
> whole or in part, by anyone other than the intended recipient(s) is
strictly
> prohibited. If you have received this communication in error, please
notify
> the sender immediately, delete this communication from all data storage
> devices and destroy all hard copies.
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
>