Sunday 16 February 2014

Add swap space in UFS Solaris

Sometimes you have to add additional swap space when the current swap space is not sufficient.
With help to following steps you can add the swap space in UFS of Solaris 10

Following techniques are recommended to add additional swap space in UFS file system.
Creating a swap file by using the mkfile command.
Activating the swap file by using the swap command.
Adding an entry for the swap file in the /etc/vfstab file so that the swap file is activated automatically when the system is booted.

Check out the swap space using the below command.
# /usr/sbin/swap -l
swapfile             dev  swaplo blocks   free
/dev/md/dsk/d20     85,20     16 20972720 20972720
 
Create the directory for the swap file, here we are having /files for the swap space
# mkdir /files 

Using mkfile command create swap file.
# mkfile 100m /files/swapfile 

Activate the swap file using swap -a
# swap -a /files/swapfile

Make entry in /etc/vfstab file so that the swap space will stay permanent on the system even after reboot.
# vi /etc/vfstab
(An entry is added for the swap file):
/files/swapfile   -      -       swap     -     no     -

Check the swap space is added properly using swap -l command.
# swap -l
swapfile             dev  swaplo blocks   free
/dev/md/dsk/d20     85,20     16 20972720 20972720
/files/swapfile        -       16 204784  204784
 
Note - If a swap file does not get activated, make sure that the following service is running:
# svcs nfs/client 
STATE          STIME    FMRI
enabled        14:14:34 svc:/network/nfs/client:default 
 

Physical P2V migration in Solaris (Solaris 9 to Solaris 10)

Physical P2V migration in Solaris  P2V migration is the excellent feature of Solaris where you can migrate the physical server...