Let’s say that you needed to store a large amount of data in a central location (I.E. directory) but the largest drive that you can afford and find for a reasonable price is a 400GB Seagate SATA drive.
Unlike other OSes that I have used, Slackware has an awesome ‘autoraid’ capability that is idiot proof. Believe me! I’m not only the president, I’m also a client!
In four easy steps you too can have a RAID 0, 1, or 5 setup.
Step 1: Use fdisk to prepare the disk
# fdisk /dev/sda # sd just happens to be the SCSI/SATA controller on my system
Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): nCommand action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-48641, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-48641, default 48641):
Using default value 48641Command (m for help): t
Selected partition 1
Hex code (type L to list codes): fd #fd is “Linux raid auto�?
Changed system type of partition 1 to fd (Linux raid autodetect)Repeat the same step for each drive.
Step 2: Creating the configuration file
Edit or create the file /etc/raidtab with the following content
raiddev /dev/md0
raid-level 0
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 128
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1# repeat for each ‘raid’ disk:
# device /dev/xdaz
# raid-disk n
Step 3: Making the RAID
# mkraid /dev/md0
Step 4: Formatting the new RAID device
# mkfs.reiserfs /dev/md0
Be sure to add the /dev/md0 device to your fstab so it will mount the next time the system reboots.
And even easier than that is to replace steps 2 and 3 with mdadm:
2. # mdadm –create /dev/md0 –level=raid5 –raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
(or something to that nature)
Then step 5 would be to create the mdadm.conf file to allow automatic e-mail alerts if a RAID device fails. “Freakin’ Sweet!”
MythTV with almost 700 recordings and still > 200GB free!