Solaris add swap file
Well the process is as simple as using ls to list files. But even there, I can screw up.
1. mkfile 1024m <filename>
Units for the size can be kilobytes (k), blocks (b), or megabytes (m).
2. swap -a <complete file path>
3. swap -l (to list the swaps)
Now the problem is I created the file using my local user and was trying to add it as swap. I kept on getting the following error:
It must be a block device or a regular file with the “save user text on execution” bit set.
Finally, after half an hour of googling and leading nowhere, I decided to do everything as root. Voila!
So the steps are:
1. mkfile 1024m <filename> (as root)
Units for the size can be kilobytes (k), blocks (b), or megabytes (m).
2. swap -a <complete file path> (as root)
3. swap -l (to list the swaps) (as root)