Instructions for deleting the swap file after import in Ensim
Eg. partition - /dev/hda3 mounted on /, swap file - /var/swapfile.
Turn off swapping for file “/var/swapfile” with the following command:
swapon, swapoff - enable/disable devices and files for paging and swapping
Swapoff disables swapping on the specified devices and files. When the -a flag is given, swapping is disabled on all known swap devices and files (as found in /proc/swaps or /etc/fstab)
Delete the file “/var/swapfile” with the following command:
Instructions to setup swap file
Select the partition where you want to create the swap file. This partition must have free disk space to create the swap file.
Create a file for swap with the following command (# is shell prompt):
#dd if=/dev/zero of=/var/swapfile bs=1024 count=[count]
where [count]= number of 1024 blocks required. If count=1024000 size of /var/swapfile will be 1024* 1024000 = 1 GB .
You can decide the size of “/var/swapfile” depending on the size of the backup tar file.
Setup an extra swap with the following command:
Enable “/var/swapfile” for swapping with the following command:
Verification: The file “/proc/swaps” must contain the entry for the swap file “/var/swapfile”. If this entry is not present, then swapping has not been enabled for the swap area.