Hello Guys,
I am running into weird issue.
I have rebooted my Centos 7.1.1503 server today morning.
After reboot, Centos unable to find swap partition.
In lvdisplay, it is showing LV Status as suspended.
[root@localhost ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID 6Gr4Om-xEBB-Ab56-jubd-YdLa-wYO5-scqiz0
LV Write Access read/write
LV Creation host, time localhost, 2015-11-19 10:05:39 +0530
LV Status suspended
# open 0
LV Size 103.87 GiB
Current LE 26591
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1
--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID CB3xsr-lJ2i-RggZ-56R1-yMGu-xUy5-EELUU4
LV Write Access read/write
LV Creation host, time localhost, 2015-11-19 10:05:39 +0530
LV Status available
# open 1
LV Size 483.58 GiB
Current LE 123796
Segments 4
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0
[root@localhost ~]#
Also I am trying to look for the swap file, it is showing file does not exist.
[root@localhost ~]# ll /dev/centos/swap
ls: cannot access /dev/centos/swap: No such file or directory
[root@localhost ~]#
Guys please help.
/dev/centos/swap missing
Re: /dev/centos/swap missing
What does /etc/fstab say about the swap partition?
You should update your CentOS installation as soon as possible. CentOS 7.1.1503 is old and many (security) fixes have been added since.
You should update your CentOS installation as soon as possible. CentOS 7.1.1503 is old and many (security) fixes have been added since.
Re: /dev/centos/swap missing
Resolved this issue with below steps:
fdisk -l
Make sure swap space is formatted with the 82 ID
In my case e.g. /dev/sdb1 is formatted with the 82
Turn off existing swap space
swapoff -v /dev/mapper/centos-swap
mkswap /dev/sdb1
Add entry for persitant
vim /etc/fstab
Turn On the newly created Swap Space
swapon -a
Verifiy with the below command
free -m
fdisk -l
Make sure swap space is formatted with the 82 ID
In my case e.g. /dev/sdb1 is formatted with the 82
Turn off existing swap space
swapoff -v /dev/mapper/centos-swap
mkswap /dev/sdb1
Add entry for persitant
vim /etc/fstab
Turn On the newly created Swap Space
swapon -a
Verifiy with the below command
free -m