Clear RAID Signatures on Linux: Difference between revisions

From Leo's Notes
This page was last edited on 1 September 2019, at 06:21.
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux"
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
You may need to clear RAID signatures left on hard drives when trying to install Linux on a disk from a RAID array.
You may need to clear RAID configs left on hard drives when trying to install Linux on a disk from a RAID array.
 
Installers such as Anaconda will not list drives with these RAID signatures. If you're unable to find a disk in Anaconda, clear the configs using the steps below.


== Listing Devices ==
== Listing Devices ==
Line 8: Line 10:


== Removing Devices ==
== Removing Devices ==
Use any one of these methods to clear the RAID configs from the disk. The bulletproof method is to use {{code|dd}}.


Remove using {{code|dmsetup}}:
Remove using {{code|dmsetup}}:
{{highlight|lang=terminal|code=
{{highlight|lang=terminal|code=
dmsetup remove /dev/mapper/ddfs1_backups
# dmsetup remove /dev/mapper/ddfs1_backups
}}
}}


Line 26: Line 29:
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
}}
}}


[[Category:Linux]]
After removing the configs, verify using {{code|dmraid -r}}.
 
== See Also ==
* http://serverfault.com/questions/488346/removing-raid-metadata-from-drives
 
 
{{Navbox Linux}}[[Category:Linux]]

Latest revision as of 06:21, 1 September 2019

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

Installers such as Anaconda will not list drives with these RAID signatures. If you're unable to find a disk in Anaconda, clear the configs using the steps below.

Listing Devices

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

Removing Devices

Use any one of these methods to clear the RAID configs from the disk. The bulletproof method is to use dd.

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

After removing the configs, verify using dmraid -r.

See Also