Difference between revisions of "RAID"
Line 15: | Line 15: | ||
== Format == | == Format == | ||
− | I created a 4GB partition on both drives for the operating system (boot and / on an ext3 partition). I left the | + | I created a 4GB partition on both drives for the operating system (boot and / on an ext3 partition). The first partition (4G) of each drive was formatted as ext3. I created a second partition on each drives. I left the this partition unformatted. In other words, I installed the full operating system first on the 4GB partition before I even started with RAID configuration. I didn't create a swap partition. I could have, but this machine has 1GB of RAM and will do no work besides SaMBa, so swap isn't going to help much. |
− | This is not "ideal", but it's easier to setup. I'm building a NAS, so I don't care as much for the integrity of the operating system. I just care about the files in the file server. If the boot sector goes bad I can reinstall Linux and recover my files offline. A more clever system would allow the boot and operating system partitions to be on the RAID array itself. | + | After all is said and done I had two drives partitioned and formatted identically: |
+ | |||
+ | <pre> | ||
+ | # fdisk -l | ||
+ | |||
+ | Disk /dev/hda: 180.0 GB, 180045766656 bytes | ||
+ | 255 heads, 63 sectors/track, 21889 cylinders | ||
+ | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
+ | |||
+ | Device Boot Start End Blocks Id System | ||
+ | /dev/hda1 * 1 486 3903763+ 83 Linux | ||
+ | /dev/hda2 487 21889 171919597+ 83 Linux | ||
+ | |||
+ | Disk /dev/hdd: 180.0 GB, 180045766656 bytes | ||
+ | 255 heads, 63 sectors/track, 21889 cylinders | ||
+ | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
+ | |||
+ | Device Boot Start End Blocks Id System | ||
+ | /dev/hdd1 1 486 3903763+ 83 Linux | ||
+ | /dev/hdd2 487 21889 171919597+ 83 Linux | ||
+ | </pre> | ||
+ | |||
+ | This setup is not "ideal", but it's easier to setup. I'm building a NAS, so I don't care as much for the integrity of the operating system. I just care about the files in the file server. If the boot sector goes bad I can reinstall Linux and recover my files offline. A more clever system would allow the boot and operating system partitions to be on the RAID array itself. |
Revision as of 16:40, 20 September 2007
My RAID setup for an Ubuntu NAS box.
Hardware
I used two identical PATA 180GB drives. Each drive was connected to a separate IDE bus (each has their own cable). Do not put two IDE RAID drives on the same IDE bus. Two drives on the same cable would slow everything down plus if one drive goes bad it brings down the entire IDE bus.
software
apt-get install mdadm apt-get install dmraid
Format
I created a 4GB partition on both drives for the operating system (boot and / on an ext3 partition). The first partition (4G) of each drive was formatted as ext3. I created a second partition on each drives. I left the this partition unformatted. In other words, I installed the full operating system first on the 4GB partition before I even started with RAID configuration. I didn't create a swap partition. I could have, but this machine has 1GB of RAM and will do no work besides SaMBa, so swap isn't going to help much.
After all is said and done I had two drives partitioned and formatted identically:
# fdisk -l Disk /dev/hda: 180.0 GB, 180045766656 bytes 255 heads, 63 sectors/track, 21889 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 486 3903763+ 83 Linux /dev/hda2 487 21889 171919597+ 83 Linux Disk /dev/hdd: 180.0 GB, 180045766656 bytes 255 heads, 63 sectors/track, 21889 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdd1 1 486 3903763+ 83 Linux /dev/hdd2 487 21889 171919597+ 83 Linux
This setup is not "ideal", but it's easier to setup. I'm building a NAS, so I don't care as much for the integrity of the operating system. I just care about the files in the file server. If the boot sector goes bad I can reinstall Linux and recover my files offline. A more clever system would allow the boot and operating system partitions to be on the RAID array itself.