SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-08-21 20:59:51

MartinRF
#! Junkie
From: Stockholm, Sweden
Registered: 2009-01-23
Posts: 451
Website

My RAID adventures

Here is a short description of efforts and results of my attempts at learning to set up RAID and installing #!. A background to this is found in this thread.

This is a learning exercise and this system is not to be used for anything else.

HW: Old 32-bit machine with IDE-buses for HDDs et cetera, one 160 GB HHD and one 80 GB HDD.

SW so far: Waldorf 32-bit live DVD.

Inspiration and guidance: http://www.dedoimedo.com/computers/linux-raid.html

Intended end result:

  • Dual-booting two Linuxes, both intsalled on RAID0 multi-device partitions. RAID0 for speed.

  • RAID0 multi-device partitions for swap and /TMP. RAID0 again for speed.

  • RAID1 multi-device partition for /home (different users for the two systems). RAID1 for redundancy.

This looked like a smart set of choices but I may be completely out to lunch on this. If I am please enlighten me.

For the first test run I intended to use ext4 for the / and /home partitions and tmpfs for /tmp but I found no way to specify tmpfs so /tmp got ext4 too.

As the dedoimedo tutorial points out, GRUB wont work with RAID0 installs and I can confirm this since I tried it... What I did and should have done right away is to create a 200 MB /boot partition. I guess the proper, nice way is to do it a RAID1 multi-device partition but I just created a 'traditional' partition at the beginning of primary HDD using ext3.

The procedure and all steps are fairly well described in the dedoimedo tutorial but there are some places were it could be a little clearer if you do this the first time in your life.

  • In the tutorial the partitioning of the disks is already done. What you do when like me you are starting from scratch is to do manual partitioning. Work your way through the primary disk and then retrace those steps on your secondary disk (assuming a two-disk RAID scheme). It doesn't really matter what type of file systems and mount points you specify at this stage as you will change it in the next stage.

  • Next you need to go back and re-specify file system type to software RAID. It is far too easy to hit the make the changes 'button' instead (guess how I know).

  • Having done that you go on specifying which partitions should be paired into multi-device (MD) partitions and specifying what RAID type to use.

  • Once you have your MDs you have to specify file system and mount points just as you would had they been 'traditional' partitions.

The rest of the installation is identical to a non-RAID installation -- at least it looked very similar to me.

Re-booting to the installed system worked just fine. My feeling (no proper measurements) is the RAID0 speeds up the system. Apart from this it just works as normal but then I have not really put it through its paces. Once I am done with some playing around I will go on trying to install a second Linux system and try out dual booting.

If dual-booting works as expected I will be badly tempted to re-do this exercise with Btrfs and its RAID capabilities. Only, I don't know how. I could not find a way to specify Btrfs. Could it be that Btrfs is 64-bit only? I have to investigate.

Since you ask: I only used 80 GB out of 160 GB of the 'big' HDD, here is asummary:

Primary disk:      Secondary disk:        RAID            use                file system
200 MB                                                  no              /boot              /ext3
    6 GB                    6 GB                        0               /                     /ext4
    6 GB                    6 GB                        0              not yet
    1 GB                    1 GB                        0              /swap              swap
    4 GB                    4 GB                        0              /tmp               /ext4 (intended to use tmpfs)
~60 GB               ~60 GB                        1              /home            /ext4 (Btrfs next time?)
~80 GB                                                                    left unused

/Martin

Last edited by MartinRF (2014-08-25 06:38:14)

Offline

Help fund CrunchBang, donate to the project!

#2 2014-08-25 05:17:15

rebornmechanics
#! CrunchBanger
Registered: 2012-11-05
Posts: 176

Re: My RAID adventures

Nice read.
I'm running a machine with a 4 disk software RAID5 as well. I just wanted to see how it's done, so it's nothing productive.

About tmpfs:
You don't want to format your _disk_ in tmpfs, it lives in your RAM and SWAP.
In your /etc/fstab just add something like this (example taken from the archwiki)

tmpfs   /tmp       tmpfs   nodev,nosuid,size=2G    0  0

Note the size option. By default tmpfs will be half your total RAM size.

Offline

#3 2014-08-25 06:31:05

MartinRF
#! Junkie
From: Stockholm, Sweden
Registered: 2009-01-23
Posts: 451
Website

Re: My RAID adventures

rebornmechanics wrote:

About tmpfs:
You don't want to format your _disk_ in tmpfs, it lives in your RAM and SWAP.
In your /etc/fstab just add something like this (example taken from the archwiki)

tmpfs   /tmp       tmpfs   nodev,nosuid,size=2G    0  0

Note the size option. By default tmpfs will be half your total RAM size.

Thanks.
Archwiki is a good source of information.

/Martin

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo