Fedora Linux Support Community & Resources Center
  #31  
Old 28th November 2011, 07:07 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

I have not.

I should do this, right?
Quote:
Preparing the drives
Before we jump into creating the actual RAID array, we first need to prepare partitions for the array to use. This can be done using a GUI tool such as GParted (available in the Ubuntu repositories), but I prefer using the terminal.

To get a list of available drives/partitions:

sudo fdisk -l
This will output, for each drive you have, something along the lines of:

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000f1f05
There may well be slightly more information available too if you already have some partitions made. From here note the name of the drives you wish to use (for example, /dev/sda). For each drive, create a partition and mark it as a RAID partition.

sudo fdisk /dev/sda
This will open up fdisk, the partition manager. If you already have any partitions on the drive you should first delete them (obviously this will erase any data on them!). To create one partition that is the size of the whole drive:

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-182401, default 1): [blank]
Last cylinder or +size or +sizeM or +sizeK (1-182401, default 182401): [blank]
When choosing the first and last cylinder simply hitting return will use the default values (which are probably the values you actually want).

Next we will mark the partition as being part of a RAID array, allowing mdadm to automatically detect it:

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid auto)
So far our changes haven’t actually been written to disk, so finally, issue the command to write the changes to disk.

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
Remember to repeat this step for each drive you wish to use in the array.


---------- Post added at 01:48 PM ---------- Previous post was at 01:46 PM ----------

Well, I have to put the new drive in, and I don't think this is a hotswap....It is ok to reboot?

---------- Post added at 01:55 PM ---------- Previous post was at 01:48 PM ----------

Oh, Palimpsest can do it.....how do I do it there? That's what I originally tried to do before it lost the other drive...

---------- Post added at 02:07 PM ---------- Previous post was at 01:55 PM ----------

I'm just quite nervous to go ahead and do it since I thought I was doing it right last time and it led to this whole thing.
Reply With Quote
  #32  
Old 28th November 2011, 07:18 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
I have not.

I should do this, right?


---------- Post added at 01:48 PM ---------- Previous post was at 01:46 PM ----------

Well, I have to put the new drive in, and I don't think this is a hotswap....It is ok to reboot?

---------- Post added at 01:55 PM ---------- Previous post was at 01:48 PM ----------

Oh, Palimpsest can do it.....how do I do it there? That's what I originally tried to do before it lost the other drive...

---------- Post added at 02:07 PM ---------- Previous post was at 01:55 PM ----------

I'm just quite nervous to go ahead and do it since I thought I was doing it right last time and it led to this whole thing.
You can reboot but I'm not sure it's necessary.
Reply With Quote
  #33  
Old 28th November 2011, 07:21 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

So just try plugging in the SATA cable and power with it off?

I'm so used to ATA/IDE that that would have been horrible to do back then....
Reply With Quote
  #34  
Old 28th November 2011, 07:49 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
So just try plugging in the SATA cable and power with it off?

I'm so used to ATA/IDE that that would have been horrible to do back then....

Reboot to be safe.
Reply With Quote
  #35  
Old 28th November 2011, 08:24 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Ok, turned off, put in new drive, started up.

new drive is /dev/sdd

No partition on the drive.

Palimpsest is this:


RAID shows as started and DEGRADED.
Reply With Quote
  #36  
Old 28th November 2011, 08:47 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Ok format the drive, select empty for partition type.
After that edit the partition and change the type to linux raid autodetect.




Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	187
Size:	94.9 KB
ID:	22216   Click image for larger version

Name:	Untitled1.jpg
Views:	183
Size:	101.2 KB
ID:	22217  
Reply With Quote
  #37  
Old 29th November 2011, 04:24 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Alrighty, did that...
Reply With Quote
  #38  
Old 29th November 2011, 04:38 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
Alrighty, did that...

Ok before you add the new drive.

Does Palimpsest show a filesystem on the array?
Reply With Quote
  #39  
Old 29th November 2011, 04:50 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

I think so:

Reply With Quote
  #40  
Old 29th November 2011, 05:05 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
I think so:


The filesystem is there

Ok add the new drive

Code:
su
mdadm --add /dev/md0 /dev/sdd1
If the command succeeds you can monitor the rebuild with


Code:
watch -n1 cat /proc/mdstat
Reply With Quote
  #41  
Old 29th November 2011, 05:12 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Success! (I think):



---------- Post added at 12:12 PM ---------- Previous post was at 12:10 PM ----------

Dude, if I could buy you an internet beer, I would!

Reply With Quote
  #42  
Old 29th November 2011, 06:44 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
Success! (I think):



---------- Post added at 12:12 PM ---------- Previous post was at 12:10 PM ----------

Dude, if I could buy you an internet beer, I would!


That looks good, I reckon it will take a few hours to complete.
Reply With Quote
  #43  
Old 2nd December 2011, 03:00 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Uh oh..... what does this mean?

Code:
[root@spectrum meg]# mount /dev/md127 /home/meg/RAID/
mount: wrong fs type, bad option, bad superblock on /dev/md127,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


---------- Post added at 10:00 AM ---------- Previous post was at 09:52 AM ----------

Also, when I click on "Check Filesystem" on Palimpsest, it says:

File system is NOT clean

Reply With Quote
  #44  
Old 2nd December 2011, 03:30 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

To mount try

Code:
mount -t ext4 /dev/md127 /home/meg/RAID/

And to clean try
Code:
fsck.ext4 -v -f -y /dev/md127
Reply With Quote
  #45  
Old 2nd December 2011, 04:32 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 42
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

already tried the -t ext4 mount....same error.

Running the fsck now.... lots of things getting fixed....

---------- Post added at 11:31 AM ---------- Previous post was at 10:35 AM ----------

Ok, there were thousands and thousands of lines going by ending with this:


Code:
fsck.ext4: e2fsck_read_bitmaps: illegal bitmap block(s) for RAID
e2fsck: aborted


---------- Post added at 11:32 AM ---------- Previous post was at 11:31 AM ----------

and the mount command produces the same error as before.
Reply With Quote
Reply

Tags
array, drive, fedora, raid5, replace, software, unable

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Software raid how replace drive Dangermouse Using Fedora 5 4th July 2009 07:54 AM
Need help creating a software raid array. Thaidog Using Fedora 8 10th March 2009 05:09 AM
Software RAID 1 Array Fedora10 andy2008 Using Fedora 4 21st February 2009 06:00 PM
Trouble Getting Software RAID Array Assembled After Installing Fedora 7 ImNtReal Installation, Upgrades and Live Media 0 7th June 2007 03:45 PM
Need help recovering software RAID array verbatim Servers & Networking 1 14th November 2006 06:24 PM


Current GMT-time: 11:42 (Thursday, 18-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat