raid 0 setup

Sam Vilain sam at vilain.net
Sun Nov 30 23:04:34 CET 2003


On Wed, 26 Nov 2003 23:25, Daniel Pittman wrote;

  > > is there anywhere an example for a simple raid 0 setup, with two
  > > ide-drives, where drive two just mirrors drive one.
  > When I implemented this, and RAID-5, using the Linux software RAID
  > layer, I had to do the following:
  > 1. add 'mdadm' to the FAI pre-install area on the server.
  > 2. write a partition.CLASS hook that did:
  >    3. use fdisk to partition the disk as desired
  >    4. use mdadm to create the MD device
  >    5. use mke2fs to create the filesystem

I refactored the setup_harddisks script that came with FAI to do this
sort of thing, however it needs testing and success/failure reports to
become part of FAI.

The script, currently up on my web shite at:
  http://vilain.net/linux/fai/

Would allow you to set up a raid configuration using this disk_config
file (you need to install raidtools2 and probably lvm10 into the FAI
nfsroot for the script to work):

# disk configuration for a 2 disk IDE configuration with RAID 1
# (mirroring)

# <type> <mountpoint> <size in mb> [mount options]     [;extra options]

disk_config hda

primary  /              256         rw,errors=remount-ro ; raid(1,md0)
primary  swap           1024        rw                   ; raid(1,md1)
logical  /usr           2048        rw,notail            ; raid(1,md2) 
reiser
logical  /var           600         rw,notail            ; raid(1,md3) 
reiser
logical  /home          0-          rw                   ; raid(1,md4) 
reiser

disk_config hdc
primary  -              256                              ; raid(1,md0)
primary  -              1024                             ; raid(1,md1)
logical  -              2048                             ; raid(1,md2)
logical  -              600                              ; raid(1,md3)
logical  -              0-                               ; raid(1,md4)

-- 
Sam Vilain, sam at vilain.net

"Assuming that either the left wing or the right wing gained control
 of the country, it would probably fly around in circles"
 - Pat Paulsen -




More information about the linux-fai mailing list