LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Raid 5 suddenly doesn't contain a valid partition table (https://www.linuxquestions.org/questions/linux-general-1/raid-5-suddenly-doesnt-contain-a-valid-partition-table-4175451166/)

laughing_man77 02-21-2013 02:12 PM

Raid 5 suddenly doesn't contain a valid partition table
 
I am having a problem getting my mdadm raid 5 to mount. Something peculiar happened last night, and MythTV hung when playing a movie stored on the raid. I decided to reboot the server, and on restarting, thew raid system failed to mount.

It has x5 2TB disks, and is about 80% full. Looking in gparted, it says that the disk is unallocated. Looking in disk utility, it sees 8TB unknown volume and partition type.

The individual disk's SMART status is fine. So I attempted a check and repair array through disk utility last night, without issues, but no change in trying to remount the drive.

I'm bamboozled why it would suddenly fail with potential terminal data loss.

# fdisk -l
Code:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000536f8

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1      218056704  234440703    8192000    5  Extended
/dev/sda2  *        2048  218056703  109027328  83  Linux
/dev/sda5      218058752  234440703    8190976  82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x935e2041

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1            2048  3907029167  1953513560  fd  Linux RAID autodetect

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1              1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1              1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sde: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sde1              1  3907029167  1953514583+  ee  GPT

Disk /dev/sdf: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000ce637

  Device Boot      Start        End      Blocks  Id  System
/dev/sdf1            2048  3907029167  1953513560  fd  Linux RAID autodetect

Disk /dev/md127: 8001.6 GB, 8001589084160 bytes
2 heads, 4 sectors/track, 1953512960 cylinders, total 15628103680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 2097152 bytes
Disk identifier: 0x00000000

Disk /dev/md127 doesn't contain a valid partition table

$cat /proc/mdstat
Code:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid5 sde1[0] sdf1[5] sdb1[6] sdc1[2] sdd1[1]
      7814051840 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
      bitmap: 0/15 pages [0KB], 65536KB chunk

unused devices: <none>

$ mdadm --detail /dev/md127
Code:

mdadm: excess address on MAIL line: ARRAY - ignored
mdadm: excess address on MAIL line: /dev/md127 - ignored
mdadm: excess address on MAIL line: UUID=f9099a38:9bd89ac8:a955705d:3a3244ad - ignored
/dev/md127:
        Version : 1.2
  Creation Time : Sat Aug 27 15:57:01 2011
    Raid Level : raid5
    Array Size : 7814051840 (7452.06 GiB 8001.59 GB)
  Used Dev Size : 1953512960 (1863.02 GiB 2000.40 GB)
  Raid Devices : 5
  Total Devices : 5
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Feb 21 16:33:48 2013
          State : active
 Active Devices : 5
Working Devices : 5
 Failed Devices : 0
  Spare Devices : 0

        Layout : left-symmetric
    Chunk Size : 512K

          Name : :raid array
          UUID : f9099a38:9bd89ac8:a955705d:3a3244ad
        Events : 109350

    Number  Major  Minor  RaidDevice State
      0      8      65        0      active sync  /dev/sde1
      1      8      49        1      active sync  /dev/sdd1
      2      8      33        2      active sync  /dev/sdc1
      6      8      17        3      active sync  /dev/sdb1
      5      8      81        4      active sync  /dev/sdf1

$ mount -t ext4 /dev/md127 /media/raid
Code:

mount: wrong fs type, bad option, bad superblock on /dev/md127,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

$ dmesg | tail
Code:

[11227.738489]  disk 3, o:1, dev:sdb1
[11227.738491]  disk 4, o:1, dev:sdf1
[11227.738671] created bitmap (15 pages) for device md127
[11227.739507] md127: bitmap initialized from disk: read 1/1 pages, set 0 of 29809 bits
[11227.762702] md127: detected capacity change from 0 to 8001589084160
[11227.773253]  md127: unknown partition table
[11249.124497] EXT4-fs (md127): VFS: Can't find ext4 filesystem
[11253.574709] EXT4-fs (md127): VFS: Can't find ext4 filesystemfilesystem on dev md127.

I did notice that ls /dev/md* gave md0 as well as md127, so just to make sure, I edited mdadm.conf - the commented out line is the old line

$cat /etc/mdadm/mdadm.conf
Code:

# ARRAY /dev/md/:raid metadata=1.2 name=:raid UUID=f9099a38:9bd89ac8:a955705d:3a3244ad
 ARRAY /dev/md127 UUID=f9099a38:9bd89ac8:a955705d:3a3244ad

$cat /etc/fstab
Code:

/dev/md127      /media/raid    ext4    defaults        0      2
Does anyone have an idea what is going on here, and if possible can I resurrect the raid and save the data?

laughing_man77 02-21-2013 10:24 PM

could this perhaps be because 3 of the disks in the array are GRP, nd not GNU parted?
Code:

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.
I also reverted the changes that I made to mddadm.conf after the failed mounting:
Code:

$ vim /etc/mdadm/mdadm.conf
ARRAY /dev/md/:raid metadata=1.2 name=:raid UUID=f9099a38:9bd89ac8:a955705d:3a3244ad

Code:

$ mdadm --stop /dev/md127
mdadm: stopped /dev/md127

Code:

$ mdadm --assemble --force /dev/md127 /dev/sd[bcdef]1
mdadm: /dev/md127 has been started with 5 drives.

Code:

$ mdadm --detail /dev/md127
/dev/md127:
        Version : 1.2
  Creation Time : Sat Aug 27 15:57:01 2011
    Raid Level : raid5
    Array Size : 7814051840 (7452.06 GiB 8001.59 GB)
  Used Dev Size : 1953512960 (1863.02 GiB 2000.40 GB)
  Raid Devices : 5
  Total Devices : 5
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Feb 21 17:03:43 2013
          State : active
 Active Devices : 5
Working Devices : 5
 Failed Devices : 0
  Spare Devices : 0

        Layout : left-symmetric
    Chunk Size : 512K

          Name : :raid array
          UUID : f9099a38:9bd89ac8:a955705d:3a3244ad
        Events : 109350

    Number  Major  Minor  RaidDevice State
      0      8      65        0      active sync  /dev/sde1
      1      8      49        1      active sync  /dev/sdd1
      2      8      33        2      active sync  /dev/sdc1
      6      8      17        3      active sync  /dev/sdb1
      5      8      81        4      active sync  /dev/sdf1

So I got excited here. It recognises the raid level, the disks are active, raid is active, Superblock is persistent...
Code:

$ mount /media/raid
mount: wrong fs type, bad option, bad superblock on /dev/md127,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

...and I'm back to square one.

I'm guessing that this is probably something to do with the EXT4 partition in the raid.
$ cat /proc/partitions
Code:

major minor  #blocks  name

  8        0  117220824 sda
  8        1          1 sda1
  8        2  109027328 sda2
  8        5    8190976 sda5
  8      16 1953514584 sdb
  8      17 1953513560 sdb1
  8      32 1953514584 sdc
  8      33 1953514550 sdc1
  8      48 1953514584 sdd
  8      49 1953514550 sdd1
  11        0    1048575 sr0
  8      64 1953514584 sde
  8      65 1953514550 sde1
  8      80 1953514584 sdf
  8      81 1953513560 sdf1
  9      127 7814051840 md127

and as a recap:

$ fdisk -l /dev/md127
Code:

Disk /dev/md127: 8001.6 GB, 8001589084160 bytes
2 heads, 4 sectors/track, 1953512960 cylinders, total 15628103680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 2097152 bytes
Disk identifier: 0x00000000

Disk /dev/md127 doesn't contain a valid partition table

The only thing that seems to missing is the partition :banghead:. I had wondered if I had caused the loss of the partition by attempting to rebuild. But the partition was already reported as missing at the first reboot, although I may have compounded the problem with the attempted rebuild...


All times are GMT -5. The time now is 02:07 AM.