LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Replacing a Raid disk (https://www.linuxquestions.org/questions/linux-server-73/replacing-a-raid-disk-4175432860/)

glennbtn 10-18-2012 05:07 AM

Replacing a Raid disk
 
Hi All

Been playing with software raid 1 using this document
https://help.ubuntu.com/11.04/server...tallation.html

I have built it and all works fine. I have removed a disk and installed another 1 but what I need to know is how do I partition the new disk using the command line ready to add back in to the array

Thanks

Glenn

TobiSGD 10-18-2012 07:23 AM

Just clone the partitioning of the first drive to the second drive, you can use sfdisk for that:
Code:

sfdisk -d /dev/sda | sfdisk /dev/sdb
Assuming here that sda is the old disk and sdb is the new one, change according to your situation.
Warning: Double check the drive names, or you may destroy the partition table of the old disk


All times are GMT -5. The time now is 08:19 PM.