Pages

Tuesday, December 7, 2010

How to add secondary swap device with swap slice

You can add a secondary swap device if you have unused disk space. For example you have 1 GB unused disk space. Just check tips below


1.    Format the disk with format command. Create one partition on disk that have size 1 GB and set that partition as swap device. In this example is using disk c0d0 partition 4.

     partition> 4
     Part      Tag    Flag     Cylinders        Size            Blocks
     4 unassigned    wu       0               0         (0/0/0)           0
 
     Enter partition id tag[unassigned]: swap
     Enter partition permission flags[wu]: wu
     Enter new starting cyl[3]: 3
     Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: 1gb
2.    Modify /etc/vfstab and insert record with c0d0s4
     root@solaris-sunray # vi /etc/vfstab
     "/etc/vfstab" 12 lines, 388 characters
     #device   deviceto  mount FS        fsck    mount      mount        #to mount to fsck   point type    pass   at boot options
     #
     ...
     /dev/dsk/c0d0s4  -  -  swap    -  no  -
3.    Run the swapadd script to add swap to your system


      root@solaris-sunray # /sbin/swappadd
4.    Verify that swap has been added


     root@solaris-sunray # swap -l

No comments:

Post a Comment