Software projects/OS/Slackware/Advanced usage/RAID: Difference between revisions

From Pandora Wiki
Jump to navigationJump to search
Linux-SWAT (talk | contribs)
No edit summary
Linux-SWAT (talk | contribs)
No edit summary
Line 8: Line 8:
* I will cover here only a RAID 1 (mirror) on two SD cards, as it should be the more interesting for a server usage because under read load, you can reach about 27MB/s against 16MB/s on one card.
* I will cover here only a RAID 1 (mirror) on two SD cards, as it should be the more interesting for a server usage because under read load, you can reach about 27MB/s against 16MB/s on one card.
* A SD + USB drive can also work although untested. As a two SD + USB drive.
* A SD + USB drive can also work although untested. As a two SD + USB drive.
* This array will be mounted as /srv , the standard server folder.


= Partitioning =
= Partitioning =
Line 19: Line 20:
  6G ext2 for the system
  6G ext2 for the system
  256M for the swap
  256M for the swap
  1.5G unformated RAID
That's all for now, the third partition will be created under Slackware, and will be:
* We left 256M free. NEVER fill an entire drive with a RAID array. Drives, ie. all 8G, doesn't necessary offer the same exact capacity, so you can get in trouble if you add a drive 32MB short.
  1.5G RAID
* We will left 256M free. NEVER fill an entire drive with a RAID array. Drives, ie. all 8G, doesn't necessary offer the same exact capacity, so you can get in trouble if you add a drive 32MB short.


= Card 2 =
= Card 2 =
  256M for the swap
  256M for the swap
That's all for now, the other partitions will be created under Slackware, and will be:
  1.5G unformated RAID
  1.5G unformated RAID
  2G unused. Do what you want with it.
  2G unused. Do what you want with it.
= Install SL4P =
* Uncompress the rootfs on the first SD card, first partition, put the card in your OP, and boot it.
* Log in.
= Backup /srv =
* As root:
mkdir /srv-save
mv /srv/* /srv-save/
= Finalizing card 1 setup =
* As root:
cfdisk
= Finalizing card 2 setup =
* As root:
cfdisk


= Create the RAID 1 array =
= Create the RAID 1 array =

Revision as of 22:08, 17 April 2012

WIP WIP WIP HURRAID

  • Need to properly rebuild one array while completing.

RAID

  • http://en.wikipedia.org/wiki/RAID
  • We will use the robust native Linux software RAID.
  • It's a feature that can be used on the Pandora, although not as useful than on a PC or a server, so let's have fun with it
  • I will cover here only a RAID 1 (mirror) on two SD cards, as it should be the more interesting for a server usage because under read load, you can reach about 27MB/s against 16MB/s on one card.
  • A SD + USB drive can also work although untested. As a two SD + USB drive.
  • This array will be mounted as /srv , the standard server folder.

Partitioning

  • So you have to partition your system SD card differently than the default SL4P setup.
  • In this example, we will use the recommended minimal 8G card for the slot 1.
  • You can use a different sized card for the right slot. The minimum size is 4G for this second card, and we will use 4G in this example.
  • The RAID 1 partitions must have the same exact size.

Card 1

  • Partition that way:
6G ext2 for the system
256M for the swap

That's all for now, the third partition will be created under Slackware, and will be:

1.5G RAID
  • We will left 256M free. NEVER fill an entire drive with a RAID array. Drives, ie. all 8G, doesn't necessary offer the same exact capacity, so you can get in trouble if you add a drive 32MB short.

Card 2

256M for the swap

That's all for now, the other partitions will be created under Slackware, and will be:

1.5G unformated RAID
2G unused. Do what you want with it.

Install SL4P

  • Uncompress the rootfs on the first SD card, first partition, put the card in your OP, and boot it.
  • Log in.

Backup /srv

  • As root:
mkdir /srv-save
mv /srv/* /srv-save/

Finalizing card 1 setup

  • As root:
cfdisk

Finalizing card 2 setup

  • As root:
cfdisk

Create the RAID 1 array

Make the RAID permanent

Remove a drive from the array

  • It's likely to be the one in the right SD slot.

Repair the array

  • Depending the size of your RAID partition and he data on it, it can take a while.