LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   swap (https://www.linuxquestions.org/questions/linux-newbie-8/swap-933584/)

chetan_linux 03-09-2012 06:11 AM

swap
 
Hi,

I have added a new disk to production server. How to make it visible to os and how to configure it. I also want to add some space from that disk to swap space. Please help me out.

MensaWater 03-09-2012 08:25 AM

What is your Linux distribution (e.g. RHEL, Suse, Ubuntu etc...) and version?

What is your current disk configuration? (e.g. partitions, logical volumes, metadisks) Providing a "df -h" output would be helpful.

How much swap do you currently have? (Run "swapon -s").
How much memory do you have? (Run "free" to get an approximate amount.)
How much swap do you want to add?
Why do you want to add swap?

TB0ne 03-09-2012 10:26 AM

Quote:

Originally Posted by chetan_linux (Post 4622619)
Hi,

I have added a new disk to production server. How to make it visible to os and how to configure it. I also want to add some space from that disk to swap space. Please help me out.

Again, as with many of your other threads, have you even tried to look anything up? Just putting in "how to add swap space in Linux" into Google pulls this up:
http://www.thegeekstuff.com/2010/08/...dd-swap-space/

As MensaWater pointed out, you don't provide any details about your setup, so we can't be specific. Also, if you took your RHCE three years ago, shouldn't you know such things?

smilemukul 03-09-2012 11:38 AM

The new disk can be visible to OS (Redhat,Fedora & CentOS) by running, echo - - - > /sys/class/scsi_host/host0/scan & new partition will be visible in fdisk -l or cat /proc/partition.Also first you have to create a partion from your new disk & then space partion/file will be created through mkswap & swapon

MensaWater 03-09-2012 08:00 PM

Quote:

Originally Posted by smilemukul (Post 4622867)
The new disk can be visible to OS (Redhat,Fedora & CentOS) by running, echo - - - > /sys/class/scsi_host/host0/scan & new partition will be visible in fdisk -l or cat /proc/partition.Also first you have to create a partion from your new disk & then space partion/file will be created through mkswap & swapon

Unless he's using metadisks or LVM which is why I asked OP to answer questions about existing setup before blindly giving such advice.

smilemukul 03-10-2012 03:26 AM

The same can also be checked or scanned for new disk if they are not visible to the OS & this is not necessary that for this LVM is required as the mentioned command is used for scanning the added disk if they are not visible without reboot.

MensaWater 03-13-2012 07:49 AM

Quote:

Originally Posted by smilemukul (Post 4623261)
The same can also be checked or scanned for new disk if they are not visible to the OS & this is not necessary that for this LVM is required as the mentioned command is used for scanning the added disk if they are not visible without reboot.

Perhaps but you also wrote:
Quote:

first you have to create a partion from your new disk & then space partion/file will be created through mkswap & swapon
I was suggesting that the OP didn't give us enough information to help and that your response might not be correct depending on his setup if he isn't just using partitions already.


All times are GMT -5. The time now is 08:48 PM.