LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-18-2012, 05:07 AM   #1
glennbtn
Member
 
Registered: Dec 2009
Posts: 152

Rep: Reputation: 18
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
 
Old 10-18-2012, 07:23 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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

Last edited by TobiSGD; 10-18-2012 at 07:24 AM. Reason: added warning
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 11 mirrored raid does not reboot after replacing failed disk leblebi79 Linux - General 11 09-06-2011 10:20 PM
ICP raid controller, no automatic rebuild of raid 5 after replacing bad disk auclark@wsu.edu Linux - Newbie 3 12-14-2009 10:54 AM
[SOLVED] Software RAID (mdadm) - RAID 0 returns incorrect status for disk failure/disk removed Marjonel Montejo Linux - General 4 10-04-2009 06:15 PM
Replacing both disks on a RAID ncsuapex Linux - Server 8 05-16-2008 09:39 PM
Replacing the raid disks. coolbud Linux - Hardware 1 08-12-2006 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration