Tuesday, February 13, 2007

How to add a swap file in Solaris

  1. # mkfile 10m /tmp2/swapfile
  2. # swap -a /tmp2/swapfile
  3. # swap -l
    • swapfile             dev  swaplo blocks   free
      /dev/dsk/c0d0s1 102,1 8 303400 303400
      /dev/dsk/c0d1s6 102,70 8 21160 21160
      /tmp2/swapfile - 8 20472 20472
  4. (Optional, if need to make the change permanent)
    1. Edit /etc/vfstab
              /tmp2/swapfile  -       -       swap    -       no      -
    2. reboot

No comments: