* [gentoo-user] Recovering RAID1 after disk failure
@ 2011-06-17 3:00 Mike Diehl
2011-06-17 5:14 ` Paul Hartman
2011-06-17 6:27 ` Andrea Conti
0 siblings, 2 replies; 5+ messages in thread
From: Mike Diehl @ 2011-06-17 3:00 UTC (permalink / raw
To: gentoo-user
Hi all,
I've got a sw RAID1 that just had a failed drive replaced with an identical
drive.
However, the good drive started on sector 63 and the new drive want's to start
on sector 2048. Fdisk won't let me create the partition table on the new
drive as it is on the old drive.
This is the good drive in the RAID:
===============================================
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfc32270f
Device Boot Start End Blocks Id System
/dev/sdb1 63 224909 112423+ fd Linux raid autodetect
/dev/sdb2 224910 50572619 25173855 82 Linux swap / Solaris
/dev/sdb3 50572620 625137344 287282362+ fd Linux raid autodetect
===============================================
However, after zero'ing out the new drive, this is what fdisk allows me to do:
===============================================
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF
disklabel
Building a new DOS disklabel with disk identifier 0xfcd585e4.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-625142447, default 2048):
===============================================
As you can see, I can't mirror the previous partitioning scheme and I will
probably not have enough space on the new drive to build the RAID!
What can I do?
--
Take care and have fun,
Mike Diehl.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Recovering RAID1 after disk failure
2011-06-17 3:00 [gentoo-user] Recovering RAID1 after disk failure Mike Diehl
@ 2011-06-17 5:14 ` Paul Hartman
2011-06-17 6:17 ` Mike Diehl
2011-06-17 6:27 ` Andrea Conti
1 sibling, 1 reply; 5+ messages in thread
From: Paul Hartman @ 2011-06-17 5:14 UTC (permalink / raw
To: gentoo-user
On Thu, Jun 16, 2011 at 10:00 PM, Mike Diehl <mdiehl@diehlnet.com> wrote:
> I've got a sw RAID1 that just had a failed drive replaced with an identical
> drive.
>
> However, the good drive started on sector 63 and the new drive want's to start
> on sector 2048. Fdisk won't let me create the partition table on the new
> drive as it is on the old drive.
Hi Mike,
I believe this is due to the alignment code in newer versions of fdisk
(2048 sector = 1 megabyte)
I think you can use the expert menu in fdisk ("x" from the main menu)
to achieve what you're trying to do. I can't tell you the exact steps
but I am 99.9% sure it can be done.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Recovering RAID1 after disk failure
2011-06-17 5:14 ` Paul Hartman
@ 2011-06-17 6:17 ` Mike Diehl
0 siblings, 0 replies; 5+ messages in thread
From: Mike Diehl @ 2011-06-17 6:17 UTC (permalink / raw
To: gentoo-user
Looks like I can take it from here! Thank you. I didn't know fdisk had an
"expert" menu.... <wink>
On Thursday 16 June 2011 11:14:30 pm Paul Hartman wrote:
> On Thu, Jun 16, 2011 at 10:00 PM, Mike Diehl <mdiehl@diehlnet.com> wrote:
> > I've got a sw RAID1 that just had a failed drive replaced with an
> > identical drive.
> >
> > However, the good drive started on sector 63 and the new drive want's to
> > start on sector 2048. Fdisk won't let me create the partition table on
> > the new drive as it is on the old drive.
>
> Hi Mike,
>
> I believe this is due to the alignment code in newer versions of fdisk
> (2048 sector = 1 megabyte)
>
> I think you can use the expert menu in fdisk ("x" from the main menu)
> to achieve what you're trying to do. I can't tell you the exact steps
> but I am 99.9% sure it can be done.
--
Take care and have fun,
Mike Diehl.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Recovering RAID1 after disk failure
2011-06-17 3:00 [gentoo-user] Recovering RAID1 after disk failure Mike Diehl
2011-06-17 5:14 ` Paul Hartman
@ 2011-06-17 6:27 ` Andrea Conti
2011-06-17 6:34 ` Mike Diehl
1 sibling, 1 reply; 5+ messages in thread
From: Andrea Conti @ 2011-06-17 6:27 UTC (permalink / raw
To: gentoo-user
Hello,
> However, the good drive started on sector 63 and the new drive want's to start
> on sector 2048. Fdisk won't let me create the partition table on the new
> drive as it is on the old drive.
Recent versions of fdisk require partitions to begin on a 1MB boundary;
this among other things guarantees that there are no alignment issues
with 4k-sector drives.
If you really need to use fdisk for this task you can start it in
compatibility mode (i.e. "fdisk -c=dos").
The recommended way of preparing the new drive, though, is to simply use
sfdisk to copy the partition table from the existing one:
sfdisk -d <old drive> | sfdisk -L <new drive>
andrea
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Recovering RAID1 after disk failure
2011-06-17 6:27 ` Andrea Conti
@ 2011-06-17 6:34 ` Mike Diehl
0 siblings, 0 replies; 5+ messages in thread
From: Mike Diehl @ 2011-06-17 6:34 UTC (permalink / raw
To: gentoo-user; +Cc: Andrea Conti
I've got my drive partitioned, but I WILL read up on sfdisk. Thanks for the
pointer.
On Friday 17 June 2011 12:27:15 am Andrea Conti wrote:
> Hello,
>
> > However, the good drive started on sector 63 and the new drive want's to
> > start on sector 2048. Fdisk won't let me create the partition table on
> > the new drive as it is on the old drive.
>
> Recent versions of fdisk require partitions to begin on a 1MB boundary;
> this among other things guarantees that there are no alignment issues
> with 4k-sector drives.
>
> If you really need to use fdisk for this task you can start it in
> compatibility mode (i.e. "fdisk -c=dos").
>
> The recommended way of preparing the new drive, though, is to simply use
> sfdisk to copy the partition table from the existing one:
>
> sfdisk -d <old drive> | sfdisk -L <new drive>
>
> andrea
--
Take care and have fun,
Mike Diehl.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-17 7:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17 3:00 [gentoo-user] Recovering RAID1 after disk failure Mike Diehl
2011-06-17 5:14 ` Paul Hartman
2011-06-17 6:17 ` Mike Diehl
2011-06-17 6:27 ` Andrea Conti
2011-06-17 6:34 ` Mike Diehl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox