msgbartop
MAC OS X, Linux, Windows and other IT Tips and Tricks
msgbarbottom

22 Jul 19 Unassign a software RAID member volume to become again a normal volume.

Situation:
I had assigned the drive partition (/dev/sdb1) to a Linux Software RAID disk group. Now I want to take out this drive from the software RAID group and use it as a normal drive. Since the drive has been assigned to a group simply trying to use it as a normal drive by re-partitioning and formatting it won’t work. The disk has to first be taken out of the RAID pool and then it can be seen as a normal drive by Linux.

Steps:
Take a look at the content of the software RAID drive pool to see if the drive is par of it:
# mdadm –detail /dev/md0
Make sure the RAID drive is not mounted
# umount -l /dev/md0
Stop the RAID drive:
# mdadm –stop /dev/md0
Extract the desired drive from the RAID pool:
# mdadm –zero-superblock /dev/sdb1
Take a look at the remaining volumes in the RAID pool
# mdadm –detail /dev/md0

Now the volume /dev/sdb1 can be formatted and mounted as a normal volume.

Important note:
In the process ‘glueing’ physical partitions into one logical one, there is a loss of around 4% of the free space for LVM management of the volumes. On top of that when the logical drive gets formatted in ext4 format, it also loses an extra 5% of the space for filesystem management. So comparing the final usable free space for files and directories to the original raw space of the partitions, we get around 9% space loss.(actually used for management).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: