1

I originally set up a RAID1 array on Windows with RST (not as a bootable disk). I recently started moving everything to xubuntu, so I tried mdadm on my xubuntu partition (dual boot). Installing and running mdadm --assemble --scan worked flawlessly and I was able to access it.

When trying to re-install xubuntu over both the Windows and the xubuntu partitions, I had UEFI problems. I messed with the boot folder a bit, but got it to work (by removing the xubuntu partition and then removing GRUB). I guess this might have messed something up, because after installing xubuntu (with boot/EFI + main/data + swap partitions), doing the same thing with mdadm no longer works.

It still seems to get recognized. It's in the RAID volumes list in BIOS setup, and mdadm does see it, but it's stuck in auto-read-only.

$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md126 : active (auto-read-only) raid1 sdc[1] sdd[0]
      976759808 blocks super external:/md127/0 [2/2] [UU]

md127 : inactive sdd[1](S) sdc[0](S)
      5288 blocks super external:imsm

unused devices: <none>

$ sudo mdadm --examine --scan
ARRAY metadata=imsm UUID=370cc1f2:168a5119:88a48e19:b707194b
ARRAY /dev/md/RAID1 Volume container=370cc1f2:168a5119:88a48e19:b707194b member=0 UUID=5ce770a1:9402cfa0:b05fc6fc:a0c281e1

Adding those lines to /etc/mdadm/mdadm.conf produces the same thing (even when running sudo update-initramfs -u after modifying mdadm.conf). I tried many things, including re-naming the volume to remove the spaces (I tried /dev/md/RAID1_Volume and /dev/md0) and only putting ARRAY /dev/md0 UUID=5ce770a1:9402cfa0:b05fc6fc:a0c281e1 in mdadm.conf.

Also, I'm not sure why it wants to create both imsm0 and RAID1_Volume_0. I'm assuming imsm0 is just a container for the actual volume, but I'm not sure why. I also tried to use the container's UUID, but it doesn't work.

I'm kind of lost!

Update: more info

$ sudo file -s /dev/md*
/dev/md:    directory
/dev/md126: DOS/MBR boot sector MS-MBR Windows 7 english at offset 0x163 "Invalid partition table" at offset 0x17b "Error loading operating system" at offset 0x19a "Missing operating system", disk signature 0x1bf737e; partition 1 : ID=0xee, start-CHS (0x0,0,1), end-CHS (0x3ff,254,63), startsector 1, 1953525167 sectors
/dev/md127: empty

$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0 119.2G  0 disk  
└─sda1    8:1    0 119.2G  0 part  
sdb       8:16   0 232.9G  0 disk  
├─sdb1    8:17   0   190M  0 part  /boot/efi
├─sdb2    8:18   0 225.3G  0 part  /
└─sdb3    8:19   0   7.5G  0 part  [SWAP]
sdc       8:32   0 931.5G  0 disk  
└─md126   9:126  0 931.5G  0 raid1 
sdd       8:48   0 931.5G  0 disk  
└─md126   9:126  0 931.5G  0 raid1 
sde       8:64   0 596.2G  0 disk  
└─sde1    8:65   0 596.1G  0 part  
loop0     7:0    0 143.9M  1 loop  /snap/slack/7
loop1     7:1    0  86.9M  1 loop  /snap/core/4917
loop2     7:2    0 193.1M  1 loop  /snap/acestreamplayer/7
loop3     7:3    0 162.9M  1 loop  /snap/spotify/16

Then I ran

$ sudo parted -l /dev/md*
Model: ATA SAMSUNG SSD CM87 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:                                                                                                                                                                                                                                                                                                                           

Number  Start   End    Size   Type     File system  Flags                                                                                                                                                                                                                                                                             
 1      1049kB  128GB  128GB  primary  ntfs                                                                                                                                                                                                                                                                                           


Model: ATA Samsung SSD 850 (scsi)                                                                                                                                                                                                                                                                                                     
Disk /dev/sdb: 250GB                                                                                                                                                                                                                                                                                                                  
Sector size (logical/physical): 512B/512B                                                                                                                                                                                                                                                                                             
Partition Table: gpt                                                                                                                                                                                                                                                                                                                  
Disk Flags:                                                                                                                                                                                                                                                                                                                           

Number  Start   End    Size    File system     Name  Flags                                                                                                                                                                                                                                                                            
 1      1049kB  200MB  199MB   fat32                 boot, esp                                                                                                                                                                                                                                                                        
 2      200MB   242GB  242GB   ext4                                                                                                                                                                                                                                                                                                   
 3      242GB   250GB  8000MB  linux-swap(v1)                                                                                                                                                                                                                                                                                         


Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? OK
Model: ATA WDC WD10EZEX-00W (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   1000GB  1000GB  ntfs         Basic data partition          msftdata


Warning: Not all of the space available to /dev/sdd appears to be used, you can fix the GPT to use all of the space (an extra 5552 blocks) or continue with the current setting? 
Fix/Ignore? Fix                                                           
Model: ATA WDC WD10EZEX-00W (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   1000GB  1000GB  ntfs         Basic data partition          msftdata


Model: ATA SAMSUNG HM641JI (scsi)
Disk /dev/sde: 640GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  1049kB  1016kB  primary
 2      1049kB  106MB   105MB   primary  fat16        diag
 3      106MB   640GB   640GB   primary  ntfs


Error: Invalid argument during seek for read on /dev/md126
Retry/Ignore/Cancel? Ignore                                               
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? Ok                                                             
Model: Linux Software RAID Array (md)
Disk /dev/md126: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:

Then the outputs to lsblk and cat /proc/mdstat changed:

$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0 119.2G  0 disk  
└─sda1    8:1    0 119.2G  0 part  /media/chris/Secondary SSD
sdb       8:16   0 232.9G  0 disk  
├─sdb1    8:17   0   190M  0 part  /boot/efi
├─sdb2    8:18   0 225.3G  0 part  /
└─sdb3    8:19   0   7.5G  0 part  [SWAP]
sdc       8:32   0 931.5G  0 disk  
├─sdc1    8:33   0   128M  0 part  
├─sdc2    8:34   0 931.4G  0 part  
└─md126   9:126  0 931.5G  0 raid1 
sdd       8:48   0 931.5G  0 disk  
├─sdd1    8:49   0   128M  0 part  
├─sdd2    8:50   0 931.4G  0 part  
└─md126   9:126  0 931.5G  0 raid1 
sde       8:64   0 596.2G  0 disk  
└─sde1    8:65   0 596.1G  0 part  
loop0     7:0    0 143.9M  1 loop  /snap/slack/7
loop1     7:1    0  86.9M  1 loop  /snap/core/4917
loop2     7:2    0 193.1M  1 loop  /snap/acestreamplayer/7
loop3     7:3    0 162.9M  1 loop  /snap/spotify/16

$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md126 : active raid1 sdc[1] sdd[0]
      976759808 blocks super external:/md127/0 [2/2] [UU]

md127 : inactive sdd[1](S) sdc[0](S)
      5288 blocks super external:imsm

unused devices: <none>

So the (auto-read-only) disappeared, and my two drives appeared separately on my "devices" list with the original name ("RAID1 Volume")! I had not been able to actually see them after the xubuntu re-install until now.

  • Your Intel FakeRAID seems to be running and auto-read-only usually only means, no one has written to since assembly. It's not an error. So the question is, what is on the RAID? file -s /dev/md126, lsblk – frostschutz Jul 16 '18 at 19:14
  • I updated my post to include the output to those. I also ran parted -l and it seemed to fix partition errors that were present (apparently) and now I can actually see the drives (see the update). Seemed like the "RAID1 Volume" containing a space also causes errors, but I couldn't re-assemble it and rename it because of the above, I guess. I'm going to reboot and see if that did the trick. – christophebedard Jul 16 '18 at 23:39
  • It went back to how it was before my update after I rebooted :/ – christophebedard Jul 16 '18 at 23:47
  • FakeRAID metadata lives at the end of the device, so when looking at GPT partition table on /dev/sdd, it appears too small. When you fix that, GPT backup at end of drive overwrites FakeRAID metadata, and partition table on RAID device appears too large (invalid seek beyond end of device). If you are using Linux exclusively then stick to native mdadm 1.2 metadata (4K from start of device) to avoid this problem. Also use partitions instead of full disk raid. – frostschutz Jul 17 '18 at 13:03
  • Interesting. So I should just scrap this setup and start from scratch? i.e. remove the current volume, format the drives, and then start over with "pure" mdadm? I have to admit I don't know much about this, but this is a great opportunity for me to learn :) – christophebedard Jul 17 '18 at 13:21

Your Answer

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

Browse other questions tagged or ask your own question.