mdadm superblock hiding/shadowing partition

Posted by Kjell Andreassen on Server Fault See other posts from Server Fault or by Kjell Andreassen
Published on 2012-09-23T02:02:01Z Indexed on 2012/09/23 3:39 UTC
Read the original article Hit count: 605

Filed under:
|
|

Short version: Is it safe to do

mdadm --zero-superblock /dev/sdd

on a disk with a partition (dev/sdd1), filesystem and data? Will the partition be mountable and the data still there?

Longer version: I used to have a raid6 array but decided to dismantle it. The disks from the array are now used as non-raid disks. The superblocks were cleared:

sudo mdadm --zero-superblock /dev/sdd

The disks were repartitioned with fdisk and filesystems created with mfks.ext4. All disks where mounted and everything worked fine.

Today, a couple of weeks later, one of the disks is failing to be recognized when trying to mount it, or rather the single partition on it.

sudo mount /dev/sdd1 /mnt/tmp
mount: special device /dev/sdd1 does not exist

fdisk claims there to be a partition on it:

sudo fdisk -l /dev/sdd

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      243201  1953512001   83  Linux

Of course mount is right, the device /dev/sdd1 is not there, I'm guessing udev did not create it because of the mdadm data still on it:

sudo mdadm --examine /dev/sdd
/dev/sdd:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : b164e513:c0584be1:3cc53326:48691084
           Name : pringle:0  (local to host pringle)
  Creation Time : Sat Jun 16 21:37:14 2012
     Raid Level : raid6
   Raid Devices : 6

 Avail Dev Size : 3907027120 (1863.02 GiB 2000.40 GB)
     Array Size : 15628107776 (7452.06 GiB 8001.59 GB)
  Used Dev Size : 3907026944 (1863.02 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 3ccaeb5b:843531e4:87bf1224:382c16e2

    Update Time : Sun Aug 12 22:20:39 2012
       Checksum : 4c329db0 - correct
         Events : 1238535

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : AA.AAA ('A' == active, '.' == missing)

My mdadm --zero-superblock apparently didn't work. Can I safely try it again without losing data? If not, are there any suggestion on what do to? Not starting mdadm at all on boot might be a (somewhat unsatisfactory) solution.

© Server Fault or respective owner

Related posts about raid

Related posts about mount

  • 12.10 update breaks NFS mount

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I've just upgraded to the latest 12.10 beta. Rebooted twice. The problem is with the NFS folders not mounting, here's a verbose log. # mount -v myserver:/nfs_shared/tools /tools/ mount: no type was given - I'll assume nfs because of the colon mount.nfs: timeout set for Mon Oct 1 11:42:28 2012 mount… >>> More

  • Mount SMB / AFP 13.10

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I cannot seem to get Ubuntu to mount a mac share via SMB or AFP. I've tried the following... AFP: apt-get install afpfs-ng-utils mount_afp afp://user:password@localip/share /mnt/share Error given: "Could not connect, never got a reponse to getstatus, Connection timed out". Which is odd as I can… >>> More

  • Mount Return Code for CIFS mount

    as seen on Server Fault - Search for 'Server Fault'
    When I run the following command (as root or via sudo) from a bash script I get an exit status (or return code in mount man page parlance) of 1: mount -v -t cifs //nasbox/volume /tmpdir/ --verbose -o credentials=/root/cifsid & /tmp/mylog It outputs the following into the myflog file: parsing… >>> More

  • Disable raid member check upon mount to mount damaged nvidia raid1 member

    as seen on Server Fault - Search for 'Server Fault'
    Hi, A friend of mine destroyed his Nvidia RAID1 array somehow and in trying to fix it, he ended up with a non-working array. Because of the RAID metadata, the actual disk data was stored at an offset from the beginning. I was able to identify this offset with dd and a hexeditor and then I used losetup… >>> More

  • Network shares do not mount.

    as seen on Super User - Search for 'Super User'
    My network shares were mounting fine yesterday.. suddenly they are not. They were mounting fine for the last two weeks or however long since I added them. When I run sudo mount -a I get the following error: topsy@monolyth:~$ sudo mount -a mount error(12): Cannot allocate memory Refer to the mount… >>> More