Fsck Mdraid Root Partition

Home » CentOS » Fsck Mdraid Root Partition
CentOS 1 Comment

There are some errors on my root filesystem, so I need to fsck it. In order to do this while the filesystem is unmounted, I’m booting from the install disk. However, since the filesystem is on an mdraid device, I’m not sure of the right way to get it assembled so I can check it.

If I do, mdadm –examine –scan, then I get this:

ARRAY /dev/md/2 metadata=…
(and others, but I’m only interested in md2 at this point)

It shows as /dev/md/2, while it is called /dev/md2 if I boot into the OS.

If I do this:

mdadm –assemble –scan /dev/md/2

I assume it will assemble it. Is it going to cause and problems assembling it under a different name in order to run the fsck?

Should I rather force it to have the same name like this:

mdadm –assemble /dev/md2 /dev/sda1 /dev/sda2

if that will even work?

Thanks,

One thought on - Fsck Mdraid Root Partition

  • Apologies for the late reply; I only just saw this message today.

    It’s possible that one is a symlink to the other. IIRC the /dev/md2
    naming style is somewhat deprecated. If you can boot off of the current
    /, you can check for sure.

    If it assembles, then it shouldn’t cause any problems once you reboot. Running fsck against the /dev/md/2 device should be fine.

    –keith