0

I have removed two disk(sda1 & sdb1) from soft RAID1 array.

mdadm --stop /dev/md0
mdadm --remove /dev/md0

mdadm --zero-superblock /dev/sda1
mdadm --zero-superblock /dev/sdb1

Output of mdadm --examine /dev/sdb1

root@rescue:~# /mnt # mdadm --examine /dev/sdb1
mdadm: No md superblock detected on /dev/sdb1.

i was try to mount /dev/sdb1 to /mnt

mount /dev/sdb1 /mnt -t auto
mount: you must specify the filesystem type

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

(/dev/md0 was ext4)

Output of fdisk -l

root@rescue:~# fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders, total 7814037168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
        /dev/sdb1            2048   209717247   104857600   83  Linux


WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 4000.8 GB, 4000787030016 bytes
256 heads, 63 sectors/track, 484501 cylinders, total 7814037168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048   209717247   104857600   83  Linux
Partition 1 does not start on physical sector boundary.

Output of fsck /dev/sdb1

fsck /dev/sdb1
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb1

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

i want to mount with existing data(sdb1 or sda1). any solution? i have important data.

Ram
  • 179
  • 1
  • 2
  • 8
  • You actually destroyed the RAID information that is on-disk with the `--zero-superblock` command. There is no way to mount the drives `/dev/sda1` and `/dev/sdb1` directly without the `mdadm` layer. You could try `testdisk` to find the signatures again or manually recreate the software RAID following [this guide](https://raid.wiki.kernel.org/index.php/RAID_Recovery). – Thomas Dec 27 '16 at 18:02
  • Ohh, how to remove disks from raid1 array without losing data ? (raid1 to jbod) – Ram Dec 27 '16 at 18:05
  • Either just pull it, or mark one disk as failed, then remove it. Or use `mdadm /dev/md0 --fail /dev/sdb1`, then `mdadm /dev/mdadm --remove /dev/sdb1`. – Thomas Dec 27 '16 at 18:20
  • The main issue you're going to run into trying to just pull drives from a RAID1 is that current `mdadm` versions write their metadata to the *beginning* of the device so the actual data starts farther into the partition than normal. Knowing where exactly your data is on the drive now that you've zeroed the superblock is going to depend on [which version of the metadata was used](https://raid.wiki.kernel.org/index.php/RAID_superblock_formats#Sub-versions_of_the_version-1_superblock) – DerfK Dec 27 '16 at 18:23

0 Answers0