Swap Fails on Boot Up
Maybe what I am trying to do doesn't work but let me explain. I have two identical drives on my PC.
/dev/sda = 1 TB /dev/sdb = 1 TB I wanted to mirror the drives so I created two separate partitions on each drive: sda1 = 1024 MB (Swap) sda2 = 999 GB (Software RAID) sdb1 = 1024 (Swap) sdb2 = 999 GB (Software RAID) I then only created /dev/md0 which consist of /dev/sda2 & /dev/sdb2 in RAID 1 mirror. When I boot the system, I show that Swap fails during boot in bright 'red' letters. I don't know if it failed activating both or just any swap partitions in general. When I look at 'df -h' while my system is booted, I show: Code:
[root@buster ~]# df -h Please help! |
df doesn't show information about swap. The /dev/shm is a special mount for shared memory.
To see swap information type "swapon -s". For swap partitions to work: 1) When you create the partition it must be identified as swap (not Linux RAID Autodetect like your other partition). 2) mkswap has to be run on the device to make it a swap device. 3) The device has to be added as swap with the swapon command (if done after the system is up) and/or added to /etc/fstab to make it be enabled as swap at boot for example /dev/sda1 swap swap defaults 0 0 /dev/sdb1 swap swap defaults 0 0 |
I checked as you noted and I don't see any active 'swap' partitions active...
Code:
[root@buster ~]# swapon -s |
As noted in my post:
You have to make sure the partition type is linux swap (type fdisk -l to see all your partitions). If they're not you can use fdisk to change them (type "man fdisk" for details). You have to use the mkswap to format them as swap devices (type "man mkswap" for details"). You can use the swapon command to enable them if the system is up already after you've created them as noted above. (See "man swapon" for details). Add them to /etc/fstab as noted above to insure they get re-enabled on reboot. |
All times are GMT -5. The time now is 08:01 PM. |