LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   RAID type 1 or type 0 from the shell (https://www.linuxquestions.org/questions/linux-server-73/raid-type-1-or-type-0-from-the-shell-744263/)

piukeman 07-31-2009 08:20 PM

RAID type 1 or type 0 from the shell
 
Hello two month ago I learned how to work with LVM. Whatsmore I learned how to create them and install Linux debian or Ubuntu into an LVM without the assistant partitioner I mean: I load the module, I fdisk my disk and, I worked with the lvm tools (pvcreate, vgcreate, lvcreate) and the i started the installation. So I would like to know:

HOW to create a RAID type 1 or 0 but from the command line and with a rescue disk or a live CD and then of course I will install my distro, but that is my problem. Again I want a setup of RAID 1 or 0 how to do it in a console mode so then I can install my favorite distro. I do not want to use the GUI of the distro (debian, fedora, ubuntu, etc). I want to do it on my own.

Is there any good tutorial. Can someone write how to do it ??? I search in google a lot with LVM it was easy but with raid i had no luck... and the one i found it, i did not understand them.


Thanks in advanced piukeman ;)

oli 07-31-2009 09:56 PM

There's nothing special required to use mdadm and LVM together. Instead of running LVM directly on your partitions (ie. sda1) you run it on the RAID devices (ie. md1).

Do you want to have something like this?

Code:

DRIVE1-PARTITION1-sda1-\
                        ---md1---pv---vg---lv
DRIVE2-PARTITION1-sdb1-/


piukeman 08-01-2009 12:44 PM

RAID in LINUX
 
Quote:

Originally Posted by oli (Post 3627270)
There's nothing special required to use mdadm and LVM together. Instead of running LVM directly on your partitions (ie. sda1) you run it on the RAID devices (ie. md1).

Do you want to have something like this?

Code:

DRIVE1-PARTITION1-sda1-\
                        ---md1---pv---vg---lv
DRIVE2-PARTITION1-sdb1-/


OK, but i do not know how to make a RAID type 1 or 0. I would like to know the COMMANDS and how to change GRUB, fstab... and all that.

Thanks anywhay

AlucardZero 08-01-2009 01:51 PM

mdadm

oli 08-01-2009 11:06 PM

mdadm indeed. Check out the examples at the bottom of this page:

http://linux.die.net/man/8/mdadm

toroideo 08-02-2009 12:18 PM

There is an excellent step to step tutorial in the LVM HOWTO
Look on LDP web site


All times are GMT -5. The time now is 03:01 AM.