-1

Quick background: I have a RAID 1 array, created using mdadm. Both drives are hard-drives. The RAID array is called md127. There are 3 partitions in this RAID array: 20G for /var, 20G for /opt and 891.4G for /home.

After attempting to check a directory within /home for files, it outputs:

ls: reading directory '.': Input/output error

After checking dmesg, this error appears a lot:

md: super_written gets error=10

The command mdadm -D /dev/md127 produces this output:

Number   Major   Minor   RaidDevice State
   0       8        1        0      active sync   /dev/sda1
   -       0        0        1      removed

   1       8       17        -      faulty   /dev/sdb1

I thought that a RAID array resides under one partition such as sda1, but this states that another one is under sdb1. After running lsblk, sdb1 is not shown (I presume because it is faulty). I don't recall removing any drive in the RAID array. Is it possible that one of the drives is actually broken?

Output of cat /proc/partitions:

 259        0  244198584 nvme0n1
 259        1     510976 nvme0n1p1
 259        2     101376 nvme0n1p2
 259        3      16384 nvme0n1p3
 259        4   40816640 nvme0n1p4
 259        5  202752167 nvme0n1p5
   8        0  976762584 sda
   8        1  976748544 sda1
   8       16  976762584 sdb
   8       17  976748544 sdb1
   8       32 1953514584 sdc
   8       33      16367 sdc1
   8       34 1953497088 sdc2
   8       48 1953481728 sdd
   8       49 1953481727 sdd1
   8       64    7815168 sde
   8       65    7814144 sde1
   9      127  976617472 md127
 259        6   20971520 md127p1
 259        7   20971520 md127p2
 259        8  934674431 md127p3

Output of cat /proc/mdstat:

md127 : active raid1 sdb1[1] sda1[0]
      976617472 blocks super 1.2 [2/2] [UU]
      bitmap: 3/8 pages [12KB], 65536KB chunk

unused devices: <none>

I've read that if there are underscores instead of 'U's then that indicates a drive has failed. Also, after restarting my computer, I decided to play around with the problem and found that the directory that I was having trouble with (input/output error) now lists all files without a problem. I also ran dmesg and all the (main) errors are gone. I think this might have an issue with start-up. When Linux starts, goes to a terminal-like interface for login then switches to a custom Adapta theme, sometimes when logging in, it freezes. What would be the most plausible explanation for this change?

  • lsblk? dmesg? You already lost data, it seems... – frostschutz Feb 23 at 11:30
  • Welp that sucks :(. Do you know if this is a result of a drive being damaged? It says that one of the drives is in active sync so I presume that one has the data and isn't broken. If this is true, then won't I just have to buy another drive and add it to the RAID array? Thanks for the response. – Richard Wessels Feb 23 at 11:37
  • This is exactly how RAID 1 protects you. sda1 is the first partition on your first physical disk, currently used as one copy of /dev/md127 data. sdb1 would be the first partition on the second disk, except the disk seems currently broken. If all your data is indeed on the RAID1 array, you may have lost just 1 copy out of 2, and so your data might be safe for now. But the error message on home is troubling... I think we don't know the full story yet. Please show the output of cat /proc/partitions and cat /proc/mdstat. – telcoM Feb 23 at 13:30
  • @telcoM I added the outputs in my question, thanks. – Richard Wessels Feb 23 at 15:55
  • The behavior after the restart suggests that one of your disks might have an intermittent fault, which is going to be annoying to troubleshoot. Expanding on Praveen Kumar BS's suggestion, please run sudo smartctl -H -A -f brief -l error /dev/sdb: that should provide the disk's self-diagnostic assessment, the list of SMART attributes and the SMART error log. These outputs might allow to evaluate the health of your sdb disk. If the disk seems fine, you might try replacing the SATA data cable and seeing if the intermittent problems stop. – telcoM Feb 23 at 19:46
0
First check the status of disk sdb by below command

sudo smartctl -H /dev/sdb if it shows PASSED OR OK Then its in good condition

Try re-adding disk /dev/sdb1 to raid by below command
Steps to remove
sudo mdadm --manage /dev/md127 --fail /dev/sdb
sudo mdadm --manage /dev/md127 --remove /dev/sdb


Add back to array

sudo mdadm --manage /dev/md127 --add /dev/sdb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.