[OpenIndiana-discuss] OI hipster frequence freeze during update
Michael Kruger
makruger2000 at gmail.com
Sat Dec 31 01:09:54 UTC 2016
On 12/30/2016 06:56 PM, Full Name wrote:
> I've 2GB RAM on the system. The system has 32-bit intel processor.
>
> how do i check swap/raw partition?
Pulled this from my personal notes for future docs to write.
It shows how to check and enlarge the swap.
Hopefully you can make sense of it.
Michael
Check swap space and adding more
# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 283,2 8 2060280 1295128
If blocks and free are the same, then the swap space isn't being used
and it can be resized.
In this case, half of the space is being used (definitely an indication
the system could use more memory)
So, we have to add another swap filesystem.
# zfs create -V 2G rpool/swap2
Now we have to activate it.
# swap -a /dev/zvol/dsk/rpool/swap2
And check the available space again
# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 283,2 8 2060280 1299488
/dev/zvol/dsk/rpool/swap2 283,3 8 4194296 4194296
Here is an update listing of all the filesystems. Swap and Swap2 are
listed last.
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 9.38G 440G 30.5K /rpool
rpool/ROOT 5.24G 440G 19K legacy
rpool/ROOT/openindiana 20.7M 440G 3.81G /a
rpool/ROOT/openindiana-1 5.22G 440G 3.82G /
rpool/ROOT/openindiana-1/var 1.39G 440G 943M /var
rpool/ROOT/openindiana/var 4.46M 440G 975M /a/var
rpool/dump 1006M 440G 1006M -
rpool/export 44.1M 440G 19K /export
rpool/export/home 44.1M 440G 19K /export/home
rpool/export/home/mike 44.0M 440G 44.0M /export/home/mike
rpool/swap 1.04G 441G 650M -
rpool/swap2 2.06G 442G 8K -
***NOTE*** adding swap space creates a persistant swap filesystem, but
the activation does not persist after a reboot.
Probably need to add the 2nd swap space to /etc/vfstab
Also, after a reboot (and before logging into the GUI desktop), the swap
may not any longer be in use.
This would be a good time to ssh into the system and increase the size
of the original swap volume.
You could either leave the 2nd swap volume, or remove it.
To increase the space, first verify it's really still free.
swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 283,2 8 2060280 2060280
/dev/zvol/dsk/rpool/swap2 283,3 8 4194296 4194296
Now lets look at the how big the volume really is.
# zfs get volsize rpool/swap
NAME PROPERTY VALUE SOURCE
rpool/swap volsize 1006M local
At 1GB, it's pretty small. Lets enlarge it to 4 GB instead.
# zfs set volsize=4g rpool/swap
Now lets have another look at it.
# zfs get volsize rpool/swap
NAME PROPERTY VALUE SOURCE
rpool/swap volsize 4G local
That's much better. We're much less likely to run out of /tmp space now.
NOTE: swap -l will still show the old swap file size until the system
reboots.
Not sure exactly what this means, but perhaps the new size does not take
effect until after the reboot.
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 14.2G 435G 30.5K /rpool
rpool/ROOT 6.88G 435G 19K legacy
rpool/ROOT/openindiana 20.7M 435G 3.81G /a
rpool/ROOT/openindiana-1 14.2M 435G 3.82G /
rpool/ROOT/openindiana-1/var 8.37M 435G 993M /var
rpool/ROOT/openindiana-2 6.85G 435G 4.07G /
rpool/ROOT/openindiana-2/var 1.64G 435G 901M /var
rpool/ROOT/openindiana/var 4.46M 435G 975M /a/var
rpool/dump 1006M 435G 1006M -
rpool/export 44.1M 435G 19K /export
rpool/export/home 44.0M 435G 19K /export/home
rpool/export/home/mike 44.0M 435G 44.0M /export/home/mike
rpool/swap 4.25G 439G 699M -
rpool/swap2 2.06G 437G 51.2M -
More information about the openindiana-discuss
mailing list