Archdevs,
I wanted to drop a note in the wiki about how to deal with reuse of drives
that have either prior VMFS_Volume filesystem (GPT table) or hardware RAID
information on the disk. I was converting the drives to mdraid and ran into a
number of failures converting to MBR. They were two separate but related issues
that caused mdadm to be unable to use the drives. e.g.
root at archiso ~ # blkid
/dev/sr0: UUID="2016-03-01-15-50-36-00" LABEL="ARCH_201603" TYPE="iso9660"
PTUUID="2237702c" PTTYPE="dos"
/dev/sda: UUID="LSI ^P" TYPE="ddf_raid_member"
/dev/loop0: TYPE="squashfs"
/dev/sdb: UUID="LSI ^P" TYPE="ddf_raid_member"
/dev/md126: PTUUID="b6fbd994" PTTYPE="dos"
(the VMFS_Volume info was shown in cfdisk)
The VMFS information and LSI Megaraid infor was removed by overwriting the
first 8M of the first partition with dd, e.g.:
root at archiso ~ # dd if=/dev/zero of=/dev/sda1 bs=8M count=1
1+0 records in
1+0 records out
8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.01363 s, 615 MB/s
Zapping the GPT partition (with gdisk) was required to remove all parts of the
GPT partition before the disks could be used by mdadm (I didn't know GPT wrote
partition information to both the beginning and end of the disk and couldn't
simply be removed with tools like fdisk or cfdisk, but required a tool that
could zap all GPT info.
root at archiso ~ # gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: present
Found valid MBR and GPT. Which do you want to use?
1 - MBR
2 - GPT
3 - Create blank GPT
This info didn't seem right as a not on the beginner's page, it didn't fit
nicely on the RAID wiki either (even though that seemed like the appropriate
spot) and didn't fit on the Partitioning wiki either (that page had nothing
related to disk reuse)
It seems like this is worth noting for anyone else attempting to reuse disks
from a prior VMWare or hardware raid config. What say the devs? Is there a
proper place for it? Or should we just leave everyone to search the web for this
info?
--
David C. Rankin, J.D.,P.E.