 |
 |
 |
 |
| Hardware & Laptops Help with your hardware, including laptop issues |

28th November 2011, 07:07 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
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.
|

28th November 2011, 07:18 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
Re: Unable to replace drive in software RAID-5 array (Fedora 14)
Quote:
Originally Posted by Tamater
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.
|

28th November 2011, 07:21 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
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....
|

28th November 2011, 07:49 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
Re: Unable to replace drive in software RAID-5 array (Fedora 14)
Quote:
Originally Posted by Tamater
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.
|

28th November 2011, 08:24 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
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.
|

28th November 2011, 08:47 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
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.
|

29th November 2011, 04:24 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
Re: Unable to replace drive in software RAID-5 array (Fedora 14)
Alrighty, did that...
|

29th November 2011, 04:38 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
Re: Unable to replace drive in software RAID-5 array (Fedora 14)
Quote:
Originally Posted by Tamater
Alrighty, did that...
|
Ok before you add the new drive.
Does Palimpsest show a filesystem on the array?
|

29th November 2011, 04:50 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
Re: Unable to replace drive in software RAID-5 array (Fedora 14)
I think so:
|

29th November 2011, 05:05 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
Re: Unable to replace drive in software RAID-5 array (Fedora 14)
Quote:
Originally Posted by Tamater
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
|

29th November 2011, 05:12 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
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!
|

29th November 2011, 06:44 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
Re: Unable to replace drive in software RAID-5 array (Fedora 14)
Quote:
Originally Posted by Tamater
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.
|

2nd December 2011, 03:00 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
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
|

2nd December 2011, 03:30 PM
|
 |
Retired Administrator
|
|
Join Date: Oct 2006
Posts: 21,509

|
|
|
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
|

2nd December 2011, 04:32 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 42

|
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 13:12 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|