# Mounting non-boot raid drive

## legit

Hi all,

I recently finished setting up gentoo to boot off of my raid (mirror) volume, but I've decided to switch it so that I boot off of a standalone hard drive and all my other files are on the raid volume.

Is there any special I need to do to get the raid volumes to mount? other than mapping them correctly in fstab and making sure I have dmraid?

Also, which partitions would you suggest to put on the standalone drive and which on the raid volume?  (I was thinking /boot /var /tmp and swap on the standalone and everything else on the raid volume)

----------

## NeddySeagoon

legit,

dmraid ?  

You are using fakeraid, not kernel raid ?

Regardless, you set up fstab and the raid filesystems should mount.

It doesn't matter where /boot goes, its rarely accessed. swap an a separate drive is good as it allows the head to remain over swap space, which speeds access when its needed. /usr/portage is another candidate for a separate drive, even with /usr/portage/distfiles split out as you can set portage tree space to use 1kb blocks to minimise wasted space with many small files and distfiles can use 4k blocks to suit the large files stored there.

/boot, /tmp <swap> and /usr/portage are all expendable, in that they can be easily recreated without a backup.

----------

## legit

I am using bios raid, so yes fakeraid not kernel raid.

So I think you answered my question but just to make sure,  When installing /boot on the raid volume I had to both create my custom kernel and then an initramdisk (using genkernel) so that grub and my kernel would be able to see the raid volumes.  What I am hoping to elimate is the need to create an initramdisk.

I followed this: http://en.gentoo-wiki.com/wiki/RAID/NVRAID_with_dmraid#Compromise_Solution_.28using_genkernel_only_for_dmraid_and_initrd.29

By putting /boot on a standalone (meaning non-raid) drive I will not need to create the initramdisk correct?

(sorry if my terminology is wrong, initramdisk may be something else entirely, basically I want to elimate the genkernel thing and just have a custom kernel)

----------

## NeddySeagoon

legit,

The problem is with root not boot.

The files in /boot are read by grub using BIOS calls. That hides the fakeraid from grub, so the kernel and initrd files are loaded.

However, the kernel cannot read from a dmraid device without dmraid from the initrd assembling the raid set(s).

To do away with with the initrd, you need to move root off the dmraid set so dmraid can be started in the boot runlevel when your initscript runs.

That means that root is already mounted.

----------

## legit

Hmmm ok.

So Is there an easy way to put my root on the standalone disk and have mostly everything else on the other device?

I guess the only real way to do that would be to put everything in its own partition right?

----------

## NeddySeagoon

legit,

You can copy you / to the unraided drive but only make mount points for the raid subdirs.

Than you mount the root on the somewhere but don't use it directly.

Now you can bind mount the subdirs of the root on raid to your new root.

Read about the bind option in 

```
man mount
```

----------

## legit

Ok, so let me switch it around a little what if i did this:

unraided single drive:

/

/boot

/swap

Mirrored raided drive

/usr

/home

Would this allow me to get rid of the initrd generated from genkernel?

really i'd like to have /etc on my raided volume but since that contains my fstab I can't do that correct?

----------

## NeddySeagoon

legit,

Your proposed partition scheme works.  /etc must be on root for several reasons, fstab being one.

All your startup scripts are in /etc/init.d/ too

----------

## legit

Neddy, thank you for all the help!

----------

