Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to copy a GPT partition table. To make a long story short, I had a RAID5 on 4 drives (Intel Matrix Storage Manager, not Linux software RAID). What I have now is: 1 empty drive 2 drives with data but invalid partition tables & most likely superblocks 1 drive with data and valid partition table, without a superblock

So the first thing I'm trying to do is to copy the partition table from my last drive to the other two, so I can bring the array back to the Degraded state (somehow).

I found this question://askubuntu.com/questions/57908/how-can-i-quickly-copy-a-gpt-partition-scheme-from-one-hard-drive-to-another

The problem is, that sgdisk -R=/dev/sdb /dev/sdd gives me "Warning! Disk size is smaller than the main header indicates...blah blah blah...Invalid partition data!" When I go and try to use the expert options in gdisk and display the partition info of the last partition, it tells me it ends on 2.7TB (which is the size of my array before it failed).

Any ideas? :D

EDIT: Thanks for looking at this, results of "mdadm -E" below as requested sda = spare drive (no data) sdb/sdc = drives with bad partitioning sdd = drive with correct partitioning (last in the array, not first; the first one died and is replaced with spare sda)

I don't think that what you're saying is correct. If the partition table was written to the first disk only, the array would not function in Degraded state whenever the first disk failed and therefore would provide no protection from a single (first) drive failure.

root@Microknoppix:/home/knoppix# mdadm -E /dev/sda
/dev/sda:
          Magic : Intel Raid ISM Cfg Sig.
        Version : 1.3.00
    Orig Family : bcce031b
         Family : 1196c5cd
     Generation : 0000003f
     Attributes : All supported
           UUID : 1376fef0:bf011589:ccad5658:c3e18e2c
       Checksum : d221805f correct
    MPB Sectors : 2
          Disks : 3
   RAID Devices : 1

  Disk00 Serial : 9VP2JCJM
          State : active
             Id : 00010000
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)

[R5V1]:
           UUID : f3de1ed4:f7f28c69:488d1945:2e3d546f
     RAID Level : 5
        Members : 4
          Slots : [UUUU]
    Failed disk : none
      This Slot : 0
     Array Size : 5860560896 (2794.53 GiB 3000.61 GB)
   Per Dev Size : 1953520648 (931.51 GiB 1000.20 GB)
  Sector Offset : 0
    Num Stripes : 7630939
     Chunk Size : 128 KiB
       Reserved : 0
  Migrate State : idle
      Map State : normal
    Dirty State : clean

  Disk01 Serial : 6VP3MPCL
          State : active
             Id : 00000003
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)

  Disk02 Serial : 9VP248HS
          State : active
             Id : 00000004
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)
root@Microknoppix:/home/knoppix# mdadm -E /dev/sdb
/dev/sdb:
          Magic : Intel Raid ISM Cfg Sig.
        Version : 1.3.00
    Orig Family : bcce031b
         Family : 1196c5cd
     Generation : 0000003f
     Attributes : All supported
           UUID : 1376fef0:bf011589:ccad5658:c3e18e2c
       Checksum : d221805f correct
    MPB Sectors : 2
          Disks : 3
   RAID Devices : 1

  Disk01 Serial : 6VP3MPCL
          State : active
             Id : 00000003
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)

[R5V1]:
           UUID : f3de1ed4:f7f28c69:488d1945:2e3d546f
     RAID Level : 5
        Members : 4
          Slots : [UUUU]
    Failed disk : none
      This Slot : 1
     Array Size : 5860560896 (2794.53 GiB 3000.61 GB)
   Per Dev Size : 1953520648 (931.51 GiB 1000.20 GB)
  Sector Offset : 0
    Num Stripes : 7630939
     Chunk Size : 128 KiB
       Reserved : 0
  Migrate State : idle
      Map State : normal
    Dirty State : clean

  Disk00 Serial : 9VP2JCJM
          State : active
             Id : 00010000
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)

  Disk02 Serial : 9VP248HS
          State : active
             Id : 00000004
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)
root@Microknoppix:/home/knoppix# mdadm -E /dev/sdc
/dev/sdc:
          Magic : Intel Raid ISM Cfg Sig.
        Version : 1.3.00
    Orig Family : bcce031b
         Family : 1196c5cd
     Generation : 0000003f
     Attributes : All supported
           UUID : 1376fef0:bf011589:ccad5658:c3e18e2c
       Checksum : d221805f correct
    MPB Sectors : 2
          Disks : 3
   RAID Devices : 1

  Disk02 Serial : 9VP248HS
          State : active
             Id : 00000004
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)

[R5V1]:
           UUID : f3de1ed4:f7f28c69:488d1945:2e3d546f
     RAID Level : 5
        Members : 4
          Slots : [UUUU]
    Failed disk : none
      This Slot : 2
     Array Size : 5860560896 (2794.53 GiB 3000.61 GB)
   Per Dev Size : 1953520648 (931.51 GiB 1000.20 GB)
  Sector Offset : 0
    Num Stripes : 7630939
     Chunk Size : 128 KiB
       Reserved : 0
  Migrate State : idle
      Map State : normal
    Dirty State : clean

  Disk00 Serial : 9VP2JCJM
          State : active
             Id : 00010000
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)

  Disk01 Serial : 6VP3MPCL
          State : active
             Id : 00000003
    Usable Size : 1953520648 (931.51 GiB 1000.20 GB)
root@Microknoppix:/home/knoppix# mdadm -E /dev/sdd
/dev/sdd:
          Magic : Intel Raid ISM Cfg Sig.
        Version : 1.3.00
    Orig Family : bcce031b
         Family : 1196c5cd
     Generation : 0000003f
     Attributes : All supported
           UUID : 1376fef0:bf011589:ccad5658:c3e18e2c
       Checksum : d221805f correct
    MPB Sectors : 2
          Disks : 3
   RAID Devices : 1

[R5V1]:
           UUID : f3de1ed4:f7f28c69:488d1945:2e3d546f
     RAID Level : 5
        Members : 4
          Slots : [UUUU]
    Failed disk : none
      This Slot : ?
     Array Size : 5860560896 (2794.53 GiB 3000.61 GB)
   Per Dev Size : 1953520648 (931.51 GiB 1000.20 GB)
  Sector Offset : 0
    Num Stripes : 7630939
     Chunk Size : 128 KiB
       Reserved : 0
  Migrate State : idle
      Map State : normal
    Dirty State : clean

  Disk00 Serial : 9VP2JCJM
          State : active
             Id : 00010000
    Usable Size : 1953518862 (931.51 GiB 1000.20 GB)

  Disk01 Serial : 6VP3MPCL
          State : active
             Id : 00000003
    Usable Size : 1953518862 (931.51 GiB 1000.20 GB)

  Disk02 Serial : 9VP248HS
          State : active
             Id : 00000004
    Usable Size : 1953518862 (931.51 GiB 1000.20 GB)
share|improve this question

1 Answer 1

Most likely you are about to do the wrong thing and make the situation worse. It sounds like you originally built the array out of the whole disks, so none of them had a partition table, then you partitioned the whole raid array. In doing so, you ended up with the partition table at the start of the first drive, which is why you now think you see a partition table on that drive, but it claims the disk is larger than it is ( because it is referring to the size of the whole raid array, not the individual disk ).

Update your question to include the results of running mdadm -E on each drive and the contents of /proc/mdstat.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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