|jflaster on ZFS on Linux emergency Boot…|
|HarusKG on ZFS on Linux emergency Boot…|
|jflaster on Customizing Your Solaris 11 Au…|
|Raymond on Customizing Your Solaris 11 Au…|
|jflaster on Minding your ZFS pool and file…|
A place for Unix Thoughts and Ideas
Unless you spend your time only managing database server or have dedicated an entire disk for swap, eventually you are most likely going to need to increase your swap to handle a overzellous Java applications.
I had to do this the other night and figured it would be good to post the process
If you are on a ZFS root, while you can technically resize the zfs volume, Solaris will not pick up the changes without a reboot.
You could always drop the swap volume and re-add it, but if you are having to increase swap, that is probably a really bad idea.
So Here is a quick a dirty procedure for adding ZFS swap to a system, this system had less than 2GB of swap left and was starting to get sluggish
root@testserver $ swap -s total: 47704096k bytes allocated + 10022424k reserved = 57726520k used, 1726824k available root@testserver # swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 256,1 16 16779248 16779248 root@testserver # zfs create -V 20G rpool/swap_1 root@testserver # swap -a /dev/zvol/dsk/rpool/swap_1 jflaster@testserver $ swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 256,1 16 16779248 16779248 /dev/zvol/dsk/rpool/swap_1 256,3 16 41943024 41943024 root@testserver # swap -s total: 47697768k bytes allocated + 10022152k reserved = 57719920k used, 22704208k available echo "/dev/zvol/dsk/rpool/swap_1 - - swap - no -" >> /etc/vfstab
Here is the procedure on UFS:
root@testserver:~# mkfile 20G /var/DO_NOT_DELETE_swapfile1 root@sanbapsunadm3 # swap -a /var/DO_NOT_DELETE_swapfile1 root@sanbapsunadm3 # swap -l swapfile dev swaplo blocks free /dev/md/dsk/d10 85,10 16 16780208 16780208 /var/DO_NOT_DELETE_swapfile1 - 16 41943024 41943024 root@testserver:~# echo "/var/DO_NOT_DELETE_swapfile1 - - swap - no -" >> /etc/vfstab