problem to mount FS in RAID1

General support questions
Post Reply
Amidales
Posts: 1
Joined: 2018/10/25 07:51:39

problem to mount FS in RAID1

Post by Amidales » 2018/10/25 09:06:38

Hi,

I wanted to decrease the size of my raid / dev / md3 which is composed of 2 partitions of 2To.
For that I first decrease the device md3 then the FS like this:
=================
root [~] # mdadm --grow / dev / md3 --size = 1773G
mdadm: component size of / dev / md3 has been set to
================
root @ rescue: ~ # resize2fs / dev / md3
resize2fs 1.42.12 (29-Aug-2014)
resize2fs: Device or resource busy while trying to open / dev / md3
Could not find valid filesystem superblock.
=================
oot @ rescue: ~ # e2fsck -f / dev / md3
e2fsck 1.42.12 (29-Aug-2014)
The filesystem size (according to the superblock) is 483126512 blocks
The physical size of the device is 464781312
Either the superblock or the partition table is likely to be corrupt!
Abort <y>? No.
Pass 1: Checking inodes, blocks, and sizes
##################################
Following this when I try to trace my FS, there is the following messages:
====
mount: wrong fs type, bad option, bad superblock on / dev / md3,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
#########
The error message in the log is:
rescue kernel: EXT4-fs (md3): mounting the ext3 file system using the ext4 subsystem
rescue kernel: EXT4-fs (md3): bad geometry: the block count 483126512 exceeds size of device (464781312 blocks)
=============
##############################################
Does someone have an idea ?
Tanks.

User avatar
TrevorH
Forum Moderator
Posts: 27358
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: problem to mount FS in RAID1

Post by TrevorH » 2018/10/25 09:28:29

You did that in the wrong order. You cannot resize the mdadm device before you resize the filesystem that's on it. Your only hope of retrieving your data is to resize the mdadm array back to the exact size it was before. That might then let you find your filesystem and its superblock and in turn that might let you fsck it and then resize it.

If you aim to resize things like this then you have to do things in the right order. First you resize the filesystems on the devices so that they occupy less space. Then you resize any LVM LVs that might be in use then resize any LVM PVs too. Lastly you resize the actual device underneath.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 6 - General Support”