Page 1 of 5 123 ... LastLast
Results 1 to 10 of 41

Thread: Software raid corrupted?

  1. #1
    Join Date
    Apr 2018
    Beans
    24

    Software raid corrupted?

    After a power cut, I switched my server up again. It has an ssd as the boot drive and three spinning disk drives in a RAID5 configuration. Since the power cut, the server won't boot and goes straight to emergency mode.

    Running `fdisk -l` doesn't bring up the raid partition at all.

    I tried running `fsck` on my boot partition, and it's fine, so I don't know why the machine doesn't boot.

    When I run `fsck` on the raid partition, I get this message:
    fsck.ext4: Invalid argument while tring to open /dev/md0

    The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrut, and you might try running e2fsck with an alternate superblock


    So I tried `fsck -a /dev/md0 -b 8193`

    But that gives me the same message.



    Have I lost all my data? Is the easiest thing at this point to just wipe everything and start again from backups? I don't know if I have everything from the last few days backed up, so I'd rather avoid that, if possible.

  2. #2
    Join Date
    Mar 2007
    Beans
    1,325

    Re: Software raid corrupted?

    Calm Down and take a deep breath.

    I think we need a little more information on you set up.

    I'm guessing the SSD has the boot and OS on it. What partitions are one it?
    I'm guessing the RAID Array is a for date either application or /home.

    If you are dropped into emergency mode are there any error messages before that?
    What prompt do you get? Can you give the root password and get a command line?
    Is the ARRAY hardware or mdadm or something else?
    Last edited by rsteinmetz70112; December 10th, 2019 at 05:53 PM.

  3. #3
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Software raid corrupted?

    Thread moved to Server Platforms.

  4. #4
    Join Date
    Apr 2018
    Beans
    24

    Re: Software raid corrupted?

    Yes, the SSD has the boot and OS. The partitions are:
    /dev/sdb1 512M EFI System
    /dev/sdb2 23.9G Linux Filesystem
    /dev/sdb3 4.9G Linux Swap

    The RAID is mdadm, and was used only as data storage for media. Mostly photos, music and videos.

    I'm not sure how to show the full error messages I get on boot, so I've taken a picture. It shows the full error message I get, as well as the prompt. I can get past the password and to the command prompt

    IF5buIG.jpg

    Edit:
    smaller version of same image:
    Last edited by anytimesoon2; December 10th, 2019 at 06:54 PM. Reason: removed large image

  5. #5
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Software raid corrupted?

    Well the error messages say there's a physical problem with /dev/sda1. Is that part of the RAID set? If, after using emergency mode, you run
    Code:
    mdadm --detail /dev/md*
    what do you see? Is /dev/sda1 marked as faulty? If not, you might be able to get things running with
    Code:
    mdadm /dev/mdX --fail /dev/sda1
    mdadm /dev/mdX --remove /dev/sda1
    Replace mdX with the appropriate name for the RAID device on your system like md0 or md127. If the drive is already marked as faulty, you can skip the "--fail" step.

    Make sure you have a replacement drive handy, since you'll lose all the data if a second drive fails in a RAID5 setup.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Apr 2018
    Beans
    24

    Re: Software raid corrupted?

    So this is very odd...

    mdadm --detail /dev/md0

    gives this info:
    Version: 1.2
    Raid level: raid0
    Total devices: 2
    Persistence: Superblock is persistent

    State: inactive

    It then lists /dev/sdd1 and /dev/sdc1 as the two devices

    This was a three drive RAID5 yesterday. I swear!

  7. #7
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Software raid corrupted?

    Please do not post large images into your posts. Many of our users have slow internet connections and data limits. Large images can take a long time to load -- and may even cost a user extra money. Use the attachment functionality provided by the paperclip button above the text entry box.

  8. #8
    Join Date
    Mar 2007
    Beans
    1,325

    Re: Software raid corrupted?

    Try this

    Code:
    cat /proc/mdstat
    post the results

    Most likely there is an error somewhere causing the array not to be initiated correctly. The error may not be related to the disks or to mdadm.
    Last edited by rsteinmetz70112; December 10th, 2019 at 06:51 PM.

  9. #9
    Join Date
    Mar 2007
    Beans
    1,325

    Re: Software raid corrupted?

    You can also try :

    Code:
    sudo mdadm /dev/md0 -A --scan
    sudo mount -a

  10. #10
    Join Date
    Apr 2018
    Beans
    24

    Re: Software raid corrupted?

    This is the output for: cat /proc/mdstat


    Personalities: [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md0: inactive sdd1[3] (S) sdc1[1] (S)
    3906764959 blocks super 1.2

    unused devices: <none>
    Last edited by anytimesoon2; December 10th, 2019 at 06:55 PM.

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •