Red Hat Enterprise Linux Server release 5.5 (Tikanga) - swap
We have installed "Red hat Enterprise Linux 5.5" and while installation we have choosen "create custom layout" partition and created the blow partition:
Filesystem Size Used Avail Use% Mounted on /dev/sda7 768M 558M 171M 77% / /dev/sda8 105G 56G 44G 57% /u01 /dev/sda6 3.8G 161M 3.5G 5% /var /dev/sda5 4.8G 3.3G 1.3G 72% /usr /dev/sda3 5.7G 696M 4.7G 13% /tmp /dev/sda2 12G 158M 11G 2% /swap /dev/sda1 965M 24M 892M 3% /boot Installation has been successfully completed. But while checking the swap space in the system after installtion it showing nothing # cat /proc/swaps But we have created the 12GB /swap file Please help me to active this swap space in the system. |
Interesting. Let's see the output from these (parted may need root on RHEL)
Code:
cat /etc/fstab |
[root@nfs-prod-db ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1 LABEL=/u01 /u01 ext3 defaults 1 2 LABEL=/var /var ext3 defaults 1 2 LABEL=/usr /usr ext3 defaults 1 2 LABEL=/tmp /tmp ext3 defaults 1 2 LABEL=/swap /swap ext3 defaults 1 2 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 192.168.1.144:/NFSPRODDB1 /u02 nfs defaults 0 0 [root@nfs-prod-db ~]# parted -l Model: IBM ServeRAID-MR10k (scsi) Disk /dev/sda: 146GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1045MB 1045MB primary ext3 boot 2 1045MB 13.6GB 12.6GB primary ext3 3 13.6GB 19.9GB 6284MB primary ext3 4 19.9GB 146GB 126GB extended 5 19.9GB 25.1GB 5239MB logical ext3 6 25.1GB 29.3GB 4187MB logical ext3 7 29.3GB 30.2GB 831MB logical ext3 8 30.2GB 146GB 116GB logical ext3 Error: Unable to open /dev/md0 - unrecognised disk label. [root@nfs-prod-db ~]# |
Note
Code:
LABEL=/swap /swap ext3 defaults 1 2 For example, from my /etc/fstab Code:
/dev/sdc2 swap swap defaults 0 0 |
Great and thanks you...
this is new machine installations and could you pleas help the steps how to reformat it as swap? Please help me. Thanks |
As, judging from your post, you seem a bit unfamiliar with partitioning, I would recommend you install gparted. Using that, you can then select partition /sda2 and choose to reformat it as swap. After that, I think it should work. To be honest, I haven't done this in awhile, so there may be additional steps that I'm overlooking. (Also, I'm not really familiar with the GUI tools--I just recommend them because they should be easier for you.)
After doing that, you might want to run mkswap /dev/sda2 swapon /dev/sda2 Just be very sure that you haven't accidentally put anything in /dev/sda2 because this will wipe out anything in it. |
Thank you so much for your quick help and appreicate you... Thanks
|
You're quite welcome. Also, you might want to first unmount /dev/sda2, to avoid any problems.
umount /dev/sda2 before running gparted. |
All times are GMT -5. The time now is 10:38 AM. |