Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

swap problem

Status
Not open for further replies.

doti

Technical User
Feb 6, 2005
56
PL
hi,
I have problem with my swap, it's too small
the input of df -h for swap is:
swap 73M 300K 73M 1% /tmp

I need it to be 400MB at least

then if i type swap -s there is:
total: 93504k bytes allocated + 8660k reserved = 102164k used, 76268k available

but swap -l gives back:
no swap devices configured

does it mean that i do not have swap at all?????
how can i make it working and be at least 400MB????/


doti.
 
right, swap -s includes all swap both HDD and the computers memory as swap is formed from both.

swap -l just lists the disk areas allocated to swap.

Looks like for some reason there is no swap mounted at all.

Look at the output of mount and look for swap space there.

If there are no entries use the format command to look at the disk structured to find the swap slice (or partition)

You can then add it to /etc/vfstab and mount it.

Should help

Matthew

Family motto: Curvus, non infractus.
The Universe: God's novelty screensaver?
 
Doti. Don't forget the keyword search feature in these forums. A search for swap gives many threads, one of which, Thread60-686702 gives advice from SamBones on setting up swap as an empty file. Take a look!
 
i tried the Thread60-686702, but i cannot create the swap file. It says that there are no swap devices available.
in my partition table there is no swap partition.
I tried to modify the partition table but it was impossible since I had other partitions mounted.

is there anything i can do to create the swap partition without reinstalling the system???

Doti
 
Right, I have just successfully done the instructions in the linked thread, are you sure you did it right, and you did it as superuser?

So log in as root and follow the last instructions.

Make sure you copy them exactly! Except replace 'somedir' with where you want the file to go.

Matthew

Family motto: Curvus, non infractus.
The Universe: God's novelty screensaver?
 
There are 2 entries in the /etc/vfstab file for swap.

The first entry mounts the partition as swap:

/dev/dsk/c#t#d#s# - - swap - no -

The second entry mounts swap to tmpfs

swap - /tmp tmpfs - yes -
 
Create an empty 400 Megabyte file in a partition that has the space and you can use that as swap space.

mkfile 400m /some/directory/swap_file_do_not_delete
swap -a /some/directory/swap_file_do_not_delete
#
You can also add this to you vfstab file or in a startup script. Simple and effective and does not require a reboot or to rebuild the OS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top