Clear RAID Signatures on Linux: Difference between revisions

From Leo's Notes
This page was last edited on 15 December 2016, at 19:31.
Created page with "You may need to clear RAID signatures left on hard drives when trying to install Linux on a disk from a RAID array. == Listing Devices == {{highlight|lang=terminal|code= # dm..."
 
Line 24: Line 24:
}}
}}


Remove by overwriting the raid configs using {{code||dd}}. The location the configs are located at the last 1024 sectors of the disk.
Remove by overwriting the raid configs using {{code|dd}}. The location the configs are located at the last 1024 sectors of the disk.
{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
dd if=/dev/zero of=/dev/sda bs=512 seek=$(( $(blockdev --getsz /dev/sda) - 1024 )) count=1024
dd if=/dev/zero of=/dev/sda bs=512 seek=$(( $(blockdev --getsz /dev/sda) - 1024 )) count=1024

Revision as of 19:31, 15 December 2016

You may need to clear RAID signatures left on hard drives when trying to install Linux on a disk from a RAID array.

Listing Devices

# dmraid -r
/dev/sda: ddf1, ".ddf1_backups", GROUP, ok, 3904294912 sectors, data@ 0

Removing Devices

Remove using dmsetup:

dmsetup remove /dev/mapper/ddfs1_backups

Remove using dmraid:

# dmraid -r -E /dev/sda
Do you really want to erase "ddf1" ondisk metadata on /dev/sda ? [y/n] :y

ERROR: ddf1: seeking device "/dev/sda" to 1024204253954048
ERROR: writing metadata to /dev/sda, offset 2000398933504 sectors, size 0 bytes returned 0
ERROR: erasing ondisk metadata on /dev/sda

Remove by overwriting the raid configs using dd. The location the configs are located at the last 1024 sectors of the disk.

dd if=/dev/zero of=/dev/sda bs=512 seek=$(( $(blockdev --getsz /dev/sda) - 1024 )) count=1024