Ok. spent my Friday night doing accounting and as a diversion (read as 
often as possible) I jumped into this RAID recovery issue.

I built up a standard box with two ide hdd.  Installed e-smith in RAID1 
mode and began my adventure.  It is now just after midnight and I think I 
actually have this figured out.  My RAID array just finished rebuilding 
itself :)

Dan's HowTo is 100% correct.  Yes the replacement drive does have to be 
prepared.  Partitioning the drive is required.  My only comment is the 
typical e-smith admin who may never have seen fdisk before will most 
likely fail here.  With this in mind I've found an awesome shortcut.  No 
fdisk necessary ;->

Some time over the weekend I'll get this all documented into a combined 
RAID1 Monitoring and Recovery HowTo.

For those interested in learning fdisk, this is what was required to 
prepare my replacement drive.  When you see the shortcut to all this 
you'll jump for joy.

Regards,

-- 
Darrell May
DMC NETSOURCED.COM
http://netsourced.com


---START---
[root@myezserver /sbin]# fdisk /dev/hdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF 
disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 2491.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2491, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2491, default 2491): 33

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 2491 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1        33    265041   83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 2
First cylinder (34-2491, default 34):
Using default value 34
Last cylinder or +size or +sizeM or +sizeK (34-2491, default 2491):
Using default value 2491

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 2491 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1        33    265041   83  Linux
/dev/hdb2            34      2491  19743885    5  Extended

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (34-2491, default 34):
Using default value 34
Last cylinder or +size or +sizeM or +sizeK (34-2491, default 2491): 35

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 2491 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1        33    265041   83  Linux
/dev/hdb2            34      2491  19743885    5  Extended
/dev/hdb5            34        35     16033+  83  Linux

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (36-2491, default 36):
Using default value 36
Last cylinder or +size or +sizeM or +sizeK (36-2491, default 2491):
Using default value 2491

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 2491 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1        33    265041   83  Linux
/dev/hdb2            34      2491  19743885    5  Extended
/dev/hdb5            34        35     16033+  83  Linux
/dev/hdb6            36      2491  19727788+  83  Linux

Command (m for help): t
Partition number (1-6): 1
Hex code (type L to list codes): l

 0  Empty           17  Hidden HPFS/NTF 5c  Priam Edisk     a5  BSD/386
 1  FAT12           18  AST Windows swa 61  SpeedStor       a6  OpenBSD
 2  XENIX root      1b  Hidden Win95 FA 63  GNU HURD or Sys a7  NeXTSTEP
 3  XENIX usr       1c  Hidden Win95 FA 64  Novell Netware  b7  BSDI fs
 4  FAT16 <32M      1e  Hidden Win95 FA 65  Novell Netware  b8  BSDI swap
 5  Extended        24  NEC DOS         70  DiskSecure Mult c1  DRDOS/sec 
(FAT-
 6  FAT16           3c  PartitionMagic  75  PC/IX           c4  DRDOS/sec 
(FAT-
 7  HPFS/NTFS       40  Venix 80286     80  Old Minix       c6  DRDOS/sec 
(FAT-
 8  AIX             41  PPC PReP Boot   81  Minix / old Lin c7  Syrinx
 9  AIX bootable    42  SFS             82  Linux swap      db  CP/M / 
CTOS / .
 a  OS/2 Boot Manag 4d  QNX4.x          83  Linux           e1  DOS access
 b  Win95 FAT32     4e  QNX4.x 2nd part 84  OS/2 hidden C:  e3  DOS R/O
 c  Win95 FAT32 (LB 4f  QNX4.x 3rd part 85  Linux extended  e4  SpeedStor
 e  Win95 FAT16 (LB 50  OnTrack DM      86  NTFS volume set eb  BeOS fs
 f  Win95 Ext'd (LB 51  OnTrack DM6 Aux 87  NTFS volume set f1  SpeedStor
10  OPUS            52  CP/M            8e  Linux LVM       f4  SpeedStor
11  Hidden FAT12    53  OnTrack DM6 Aux 93  Amoeba          f2  DOS 
secondary
12  Compaq diagnost 54  OnTrackDM6      94  Amoeba BBT      fd  Linux 
raid auto
14  Hidden FAT16 <3 55  EZ-Drive        9f  BSD/OS          fe  LANstep
16  Hidden FAT16    56  Golden Bow      a0  IBM Thinkpad hi ff  BBT
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 2491 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1        33    265041   fd  Linux raid autodetect
/dev/hdb2            34      2491  19743885    5  Extended
/dev/hdb5            34        35     16033+  83  Linux
/dev/hdb6            36      2491  19727788+  83  Linux

Command (m for help): t
Partition number (1-6): 5
Hex code (type L to list codes): fd
Changed system type of partition 5 to fd (Linux raid autodetect)

Command (m for help): t
Partition number (1-6): 6
Hex code (type L to list codes): fd
Changed system type of partition 6 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 2491 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1        33    265041   fd  Linux raid autodetect
/dev/hdb2            34      2491  19743885    5  Extended
/dev/hdb5            34        35     16033+  fd  Linux raid autodetect
/dev/hdb6            36      2491  19727788+  fd  Linux raid autodetect

Command (m for help): a
Partition number (1-6): 1

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 2491 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1        33    265041   fd  Linux raid autodetect
/dev/hdb2            34      2491  19743885    5  Extended
/dev/hdb5            34        35     16033+  fd  Linux raid autodetect
/dev/hdb6            36      2491  19727788+  fd  Linux raid autodetect

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

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
---END---

--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to