View previous topic :: View next topic |
Author |
Message |
Krigare Tux's lil' helper
Joined: 12 Nov 2003 Posts: 92 Location: ::1
|
Posted: Sat Dec 20, 2003 11:24 pm Post subject: Not enough memory? |
|
|
What to do if you dont have enough memory and you dont want to repartition your harddrives:
(good for servers that needs high uptimes)
This is how you create and activate a 256mb swap block device
1: # dd if=/dev/zero bs=1MB of=/extraswap count=256
2: # mkswap /extraswap
3: # swapon /extraswap
Thats it! Remember, it wont work if you use seek instead of count
(result is: swapon: Skipping file - it appears to have holes.)
Thanks goes to CruelTott _________________ Together we are strong. |
|
Back to top |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Mon Dec 22, 2003 9:20 pm Post subject: |
|
|
Seek is used to skip the beginning of the output file. So, 'seek=256 count=256' will create a file twice the size, with only the second half read from 'if=/dev/zero'. I'm not sure what goes in the first half - 'stat' shows the same number of blocks as just using 'count', so I suspect it creates a 'sparse' file. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|