problem when adding swap file
Re: problem when adding swap file
You may be wanting to use "mkswap" then "swapon".
Re: problem when adding swap file
You should run "man mkswap" and then "man swapon" and then maybe ask questions :-P
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
problem when adding swap file
The OP's problem is that he is missing /dev/zero.
This device node is created in the /dev/ directory at boot.
If this node is still missing after a reboot, then there is a serious problem
This device node is created in the /dev/ directory at boot.
If this node is still missing after a reboot, then there is a serious problem
- AlanBartlett
- Forum Moderator
- Posts: 9327
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: problem when adding swap file
As a purely temporary solution --
[code]
[b]mknod /dev/zero c 1 5[/b]
[/code]
[code]
[b]mknod /dev/zero c 1 5[/b]
[/code]
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: problem when adding swap file
Welcome to the CentOS fora. Reading [url=https://www.centos.org/modules/newbb/viewforum.php?forum=47]FAQ & Readme First[/url] is recommended for new users.
[quote]
A7med_Baraka wrote:
...
when i checked /dev there is no file names zero ??!!
any help ASAP plz[/quote]
As Gerald said, if you have no /dev/zero then something is seriously wrong. Please give us a bit more background including the information suggested by [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url] and anything that may be peculiar about the history or behavior of the system.
Also, as explained in [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14274&forum=47]Readme First[/url], you are encouraged [i][b]not[/b][/i] to use texting abbreviations such as "plz"
[quote]
A7med_Baraka wrote:
...
when i checked /dev there is no file names zero ??!!
any help ASAP plz[/quote]
As Gerald said, if you have no /dev/zero then something is seriously wrong. Please give us a bit more background including the information suggested by [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url] and anything that may be peculiar about the history or behavior of the system.
Also, as explained in [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14274&forum=47]Readme First[/url], you are encouraged [i][b]not[/b][/i] to use texting abbreviations such as "plz"
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: problem when adding swap file
[quote]
A7med_Baraka wrote:
...
any suggest ??[/quote]
Please [re]read [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url] and provide the output file from [b]./getinfo.sh disk[/b] .
Edit:
[quote]
A7med_Baraka wrote:
for your notice i am trying to apply this on VPS, is this maybe make any problem ??
[/quote]
That is a good possibility.
A7med_Baraka wrote:
...
any suggest ??[/quote]
Please [re]read [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url] and provide the output file from [b]./getinfo.sh disk[/b] .
Edit:
[quote]
A7med_Baraka wrote:
for your notice i am trying to apply this on VPS, is this maybe make any problem ??
[/quote]
That is a good possibility.
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: problem when adding swap file
Did you not see a section similar to the following on the terminal output?[code]
########################
Results are in the file:
* /tmp/basedata.K13135 *
########################
[/code]
If not, then please run the following commands and provide the output:[code]
uname -rmi
rpm -qa \*-release\*
cat /etc/redhat-release
cat /etc/fstab
[/code]
Edit: One more question. Did you run swapon as root?
########################
Results are in the file:
* /tmp/basedata.K13135 *
########################
[/code]
If not, then please run the following commands and provide the output:[code]
uname -rmi
rpm -qa \*-release\*
cat /etc/redhat-release
cat /etc/fstab
[/code]
Edit: One more question. Did you run swapon as root?