Gentoo Archives: gentoo-user

From: Mike Diehl <mdiehl@××××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Recovering RAID1 after disk failure
Date: Fri, 17 Jun 2011 03:05:00
Message-Id: 201106162100.18030.mdiehl@diehlnet.com
1 Hi all,
2
3 I've got a sw RAID1 that just had a failed drive replaced with an identical
4 drive.
5
6 However, the good drive started on sector 63 and the new drive want's to start
7 on sector 2048. Fdisk won't let me create the partition table on the new
8 drive as it is on the old drive.
9
10 This is the good drive in the RAID:
11 ===============================================
12 Disk /dev/sdb: 320.1 GB, 320072933376 bytes
13 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
14 Units = sectors of 1 * 512 = 512 bytes
15 Sector size (logical/physical): 512 bytes / 512 bytes
16 I/O size (minimum/optimal): 512 bytes / 512 bytes
17 Disk identifier: 0xfc32270f
18
19 Device Boot Start End Blocks Id System
20 /dev/sdb1 63 224909 112423+ fd Linux raid autodetect
21 /dev/sdb2 224910 50572619 25173855 82 Linux swap / Solaris
22 /dev/sdb3 50572620 625137344 287282362+ fd Linux raid autodetect
23 ===============================================
24
25 However, after zero'ing out the new drive, this is what fdisk allows me to do:
26
27
28 ===============================================
29 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF
30 disklabel
31 Building a new DOS disklabel with disk identifier 0xfcd585e4.
32 Changes will remain in memory only, until you decide to write them.
33 After that, of course, the previous content won't be recoverable.
34
35 Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
36
37 Command (m for help): n
38 Command action
39 e extended
40 p primary partition (1-4)
41 p
42 Partition number (1-4, default 1): 1
43 First sector (2048-625142447, default 2048):
44 ===============================================
45
46 As you can see, I can't mirror the previous partitioning scheme and I will
47 probably not have enough space on the new drive to build the RAID!
48
49 What can I do?
50
51
52
53 --
54
55 Take care and have fun,
56 Mike Diehl.

Replies

Subject Author
Re: [gentoo-user] Recovering RAID1 after disk failure Paul Hartman <paul.hartman+gentoo@×××××.com>
Re: [gentoo-user] Recovering RAID1 after disk failure Andrea Conti <alyf@××××.net>