2

I've got a RAID problem.

I had a RAID6 array on 4 drives - /dev/sd[bcde]. Working fine. I then added a 5th member - /dev/sda. Working fine.

Please note: I didn't have partitions on the drives, just used "bare metal" to create the RAID. I then had an unexpected reboot and the RAID volume is not assembling at all.

I've tried the usual (mdadm assemble, etc) but the drives aren't coming up as RAID members at all.

Example from a friend with similar setup:

[WORKING]

cemil@nas ~ $ sudo blkid
/dev/sda1: UUID="F6D2-282A" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="98d0708a-596c-4466-960a-05f75201c5ea"
/dev/sda2: UUID="dcc0c278-a345-426a-b308-a939c2810c7f" TYPE="ext4" PARTUUID="5385706c-e22c-4730-8328-0e4f645a4d9a"
/dev/sda3: UUID="5aa684cc-7c41-4bbf-819b-389649c02b59" TYPE="swap" PARTUUID="75c3d9d3-7786-4aed-8017-3e5d582c5c98"
/dev/sdb: UUID="599ce008-859c-f8b6-ee29-e7e6c75e77c5" UUID_SUB="00177490-172b-32f9-773a-b87f4d87ee4c" LABEL="nas:1" TYPE="linux_raid_member"
/dev/sdc: UUID="599ce008-859c-f8b6-ee29-e7e6c75e77c5" UUID_SUB="deff4c59-2590-b5d3-118d-ce1c60599794" LABEL="nas:1" TYPE="linux_raid_member"
/dev/sdd: UUID="599ce008-859c-f8b6-ee29-e7e6c75e77c5" UUID_SUB="e540534b-cf80-37b0-c638-166a7fed7c28" LABEL="nas:1" TYPE="linux_raid_member"
/dev/sde: UUID="599ce008-859c-f8b6-ee29-e7e6c75e77c5" UUID_SUB="f62c46ef-6909-84a0-b4c6-60d3250e669f" LABEL="nas:1" TYPE="linux_raid_member"
/dev/md1: LABEL="data" UUID="dbc084a8-9e79-47a6-9b76-43652bb52727" TYPE="ext4"
/dev/sdf: UUID="599ce008-859c-f8b6-ee29-e7e6c75e77c5" UUID_SUB="b2ad6574-9ca5-624f-7a28-30ac28c6c1ec" LABEL="nas:1" TYPE="linux_raid_member"
/dev/sdg: UUID="599ce008-859c-f8b6-ee29-e7e6c75e77c5" UUID_SUB="36c33f7c-973c-4f58-2485-7fea7c894793" LABEL="nas:1" TYPE="linux_raid_member"

Clearly his partitions are coming up as TYPE="linux_raid_member"

gdisk -l on his gives no partitions.

cemil@nas ~ $ sudo gdisk -l /dev/sdg
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/sdg: 7814037168 sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 73292DAF-ACFD-4705-B9E9-FD2A3EEDDD21
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7814037134
Partitions will be aligned on 2048-sector boundaries
Total free space is 7814037101 sectors (3.6 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name

[NOT WORKING]

mamba proc # blkid
/dev/nvme0n1p1: UUID="BB15-8E88" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="a8bbf31a-bebf-4ceb-91ad-f3b75a64c7b7"
/dev/nvme0n1p2: UUID="8c0efdcc-817e-432f-871b-fa9420830e79" TYPE="ext4" PARTUUID="ed5c675a-5f82-4ce9-847e-f7dc31db2e6f"
/dev/nvme0n1p3: UUID="cfbc85ae-da1a-46ed-8cca-6f548387ed14" TYPE="swap" PARTUUID="4055b238-b1e1-44fe-8bfe-90d3c93a712a"
/dev/nvme0n1: PTUUID="0e306ff3-c7bd-4ac5-a47c-dead00f17738" PTTYPE="gpt"
/dev/sda: PTUUID="4af97682-efc8-4743-8880-5324adfac329" PTTYPE="gpt"
/dev/sdb: PTUUID="772aced1-d34d-43bf-aeab-388052e5e5b2" PTTYPE="gpt"
/dev/sdc: PTUUID="8d9a8dc6-29af-4f90-84b1-f4b5e885f3f1" PTTYPE="gpt"
/dev/sdd: PTUUID="c0fc34af-3bff-47b1-acbb-e9692e003aa4" PTTYPE="gpt"
/dev/sde: PTUUID="848e2d60-94e3-450f-aba4-d35c30ed9561" PTTYPE="gpt"

Note the difference - /dev/sd[abcde] all come up as PTTTYPE=gpt but not as linux_raid_member.

mamba proc # gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 7814037168 sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4AF97682-EFC8-4743-8880-5324ADFAC329
Partition table holds up to 128 entries
First usable sector is 2048, last usable sector is 7814037134
Partitions will be aligned on 2048-sector boundaries
Total free space is 7814035087 sectors (3.6 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name

Note the difference - I appear to have a GPT and MBR = "protective".

Any hints on how I might be able to get these drives recognised as RAID members? For the record:

mamba proc # mdadm --assemble --force /dev/md0 /dev/sda /dev/sdb /dev/sdc /dev/sde
mdadm: Cannot assemble mbr metadata on /dev/sda
mdadm: /dev/sda has no superblock - assembly aborted
mamba proc # mdadm -D /dev/sda
mdadm: /dev/sda does not appear to be an md device
mamba proc # mdadm -E /dev/sda
/dev/sda:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)

These don't seem good. :-)

1

After hours of of having the same issue i solved it.

What I would recommend is:

  1. Move everything off the raid if possible
  2. If the array is currently active run mdadm --stop /dev/md0
  3. Zero out those disks: dd if=/dev/zero of=/dev/sd[abce] bs=1M count=100
  4. Create partitions on sda, sdb, sdc, & sde that span 99% of the disk [0]
  5. never ever format these partitions with any sort of filesystem
  6. Create a new RAID with mdadm --create your parameters here
  7. Update /etc/mdadm.conf
  8. format your array with mkfs.ext4 /dev/md0
  9. check cat /proc/mdstat for progress

You can reboot while its in recovery, just to test if it stays. You dont have to wait till its done. It will restart where it left off.

Im not exactly sure what causes it, but you cant create RAID arrays directly on the disk, it needs to be on top of partitions.

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.