Thursday, December 29, 2016

linux - Fedora, fsck fails at boot



I'm facing a problem in my server during the startup. This is my actual configuration:



320GB each. Raid1 -> /dev/md127. Working.
/dev/sda
/dev/sdc

1000GB each. Raid1 -> Use to be /dev/md126, now it is /dev/md1. AFAIK, it works properly
/dev/sdb

/dev/sdd

2000GB -> Started to show some bad-functioning symptons. Now is disconnected
/dev/sde


This are the actual errors i got:



fsck.ext4: No such file or directory while trying to open /dev/md126
/dev/md126:

The superblock could not be read or does nor describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193


fsck.ext4: No such file or directory while trying to open /dev/sde1
/dev/sde1:
The superblock could not be read or does nor describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193



Then, i can press CTRL+D and system got rebooted, or enter root password and be dropped to a shell with this prompt -> "(Repair filesystem) 1:"



With the /dev/md126 AKA /dev/md1 there is no problem, because from this shell, i can mount /dev/md1 and have access to the data.



With the /dev/sde1, i dont know why the error occurs since the disk is disconnected.



Both devices (md126 and sde1) are included in /etc/fstab, but from the shell, seems like all the filesystem are read-only, so i cant modify fstab file.



Any ideas of what can i do? Im kind of lost now.
Thank you in advance.




EDIT:
From the "Repair filesystem" shell, i can replicate the error messages doing "fsck -A -y", so it walk through all the etc/fstab file cheking each entry, but as i said, the filesystem is "read-only", so i cant change the file.



About the old /etc/md126 AKA /etc/md1 array that i can mount perfectly from the shell, if i make a fdisk on the 2 disk that compoes the array i get this:



Disk /dev/sdb: 1000.2 GB, xxxxxxx bytes
255 heads, 63 sectors....
Units= sectors of 1 * 512 = 512 bytes
Sector size (min/optimal) = 4096/4096

**Disk identifier: 0x00000000**

Disk /dev/sdb doesnt contain a valid partition table

[And exactly the same for /dev/sdd]

Answer



You need to fix your /etc/fstab. While it contains entries telling the OS that it should find and mount /dev/md126 and /dev/sde1 on boot, the OS won't be happy.



Either boot from rescue media and modify the entry, or boot, fix the root filesystem, do mount -o remount,rw / and modify the entry.




Once that fstab entry says /dev/md1 in place of /dev/md126, and says nothing about /dev/sde1, your boot sequence should be much less painful.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...