How to add swap in Solaris 11

Source: Internet
Author: User

View the current swap size, which is 2G

root@vzwc1:~# ZFS list
NAME                        USED  avail  refer  mountpoint
rpool                      8.68G  40.0G  4.90M  /rpool
rpool/root                 4.03G  40.0G    31K  legacy
Rpool/root/solaris         4.03G  40.0G  3.72G  /
rpool/root/solaris/var      265M  40.0G   202M  /var
Rpool/varshare               43K  40.0G    43K  /var/share
rpool/dump                 2.58G  40.1G  2.50G  -
rpool/export                900K  40.0G    32K  /export
rpool/export/home           868K  40.0G    34K  /export/home
rpool/export/home/grid     36.5K  40.0G  36.5K  /export/ Home/grid
rpool/export/home/oracle     45K  40.0G    45K  /export/home/oracle
rpool/ EXPORT/HOME/ZHONGWC   752K  40.0G   752K  /export/home/zhongwc
rpool/swap                 2.06G  40.1G  2.00G  -
root@vzwc1:~# swap-l-H
swapfile             dev    swaplo   blocks     free
/dev/zvol/dsk/rpool/swap 285,2        4K     2.0G     2.0G

ZFS does not support mkfile to add swap

root@vzwc1:~# mkfile 5g/var/swapfile
root@vzwc1:~# swap-a/var/swapfile/var/swapfile:invalid for 
This filesystem type

You can add swap by using ZFS set

root@vzwc1:~# ZFS Set volsize=5g rpool/swap

View Swap again

 root@vzwc1:~# ZFS list NAME USED avail refer mountpoint rpool 11.8G   36.9G 4.90m/rpool rpool/root 4.03G 36.9G 31K legacy rpool/root/solaris 4.03G 36.9G 3.72G /Rpool/root/solaris/var 265M 36.9G 202m/var rpool/varshare 43K 36.9G 43k/var/share rpool/           Dump 2.58G 37.0G 2.50g-rpool/export 900K 36.9G 32k/export rpool/export/home 868K 36.9G 34k/export/home rpool/export/home/grid 36.5K 36.9G 36.5k/export/home/grid rpool/export/home /oracle 45K 36.9G 45k/export/home/oracle rpool/export/home/zhongwc 752K 36.9G 752K/EXPORT/HOME/ZHONGWC RP Ool/swap 5.16G 37.1G 5.00g-root@vzwc1:~# swap-l-h swapfile Dev Swaplo blocks F Ree/dev/zvol/dsk/rpool/swap 285,2 4K 2.0G 2.0g/dev/zvol/dsk/rpool/swap 285,2 2.0G 3.0G 3.0g< /pre>

Turning off and starting the graphical interface has also changed

Close the graphical interface

Svcadm Disable Svc:/application/graphical-login/gdm:default

Start the graphical interface

Svcadm Enable Svc:/application/graphical-login/gdm:default

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.