Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to setup Raid 1 Mirroring on my Linux version 9.0 server. I have two WD 200 GIG drives and all the software to do this. I have read several papers on how to do this. I guess I need to get past this one point.
I have one drive configured and loaded with my OS and the partitions are laid out the way that I want. I have the other drive setup with the same partitions but of a type of Linux Raid Autodetect. Here is my problem. When I change the drive that is loaded with the software from a type of linux native (83) to Linux Raid Autodetect (fd) the following happens. When I go to define the raid devices I only see the drive with no data on it and type of linux Raid Autodetect. How do I do it to get it to work correctly.
Hda type Hdd type
/dev/hda1 83 /dev/hdd1 fd
/dev/hda2 83 /dev/hdd2 fd
/dev/hda3 83 /dev/hdd3 fd
/dev/hdd4 swap /dev/hdd4 fd
When I go in to create the raid device it only shows me the hdd device and nothing on the hda side even when I use fdisk and change the type to fd. Can anyone help me?
Below you will find the fdisk configuration I am working with. Here is what I want to do. I want to make the hda one mirrored to hdd. They are both the same exact drive types. I have mdadm and have issued the command to create a raid level 1 with the two drives but got the following message.
error - mdadm - invalid number of raid devices =2
1. Since I have the hda device laid out the way I want it, do I need to change the ID type of each partition to fd?
2. What would I have to do to hdd to make it the mirror? Do I need to setup the whole drive as id FD?
3. Can I issue the mdadm command as follows to create the raid device and have it mirror the whole drive?
Dude, you're missing the point of RAID if that's what you're doing? RAID is designed to make multiple partitions/disks function as a single. If you want to make both disks bootable you aren't trying to make a RAID
I understand what mirrorring is and how it works. I am just having a problem with the setup. I only want to make them both bootable from the standpoint of if one disk dies the other will work and take over and if the system is rebooted for any reason with the one disk down it will come back up. Does that make sense?
You need to partition your hdd exactly the same way as your hda. Your RAID intended partitions must be set to fd. Each drive should have a /boot partition with the boot flag set. This means that If you want to have a 10GB /usr partition, you'll want to setup /dev/hda2 and /dev/hdd2 to be 5GB each with partition types of fd. Or whatever.
Your /etc/raidtab file needs to be configured along the lines of:
To be honest, You don't need dual swap space. You just need to figure out how many RAID partitions you need between the two disks and make sure the partitions on each drive reflect that. If you need 3 RAID devices, then you set it all up so you have three partitions on each drive that match in size, one for one.
You change the partition type with fdisk from the fdisk commandline. The t option will allow you to choosed the fd type. You do realize you are changing the types of the partitions, not the disk right?
Finally, once you start the RAID devices, they are seen by Linux as a single device/partition. It is this device/partition that you format. You don't format the partitions on each drive. You format them as a single RAID device! As long as you run it on the device (/dev/md0) or whatever, it is not damaging to anything.
This is my raidtab file. You can see how it relates to the fdisk -l settings. Let me know if you see anything wrong or that won't work. Thanks.
I can't be sure, but I don't think you want to RAID your /boot partition. If hda1 is your boot partition, then I think you should start the partitions that you want to RAID on hda2. Other than that, everything looks okay to me. Admittedly, I'm looking at this while I'm trying to do work so I can get paid, but a cursory glance looks about right.
As usual, there are more questions as you get closer to finishing.
I have the following.
1. I am trying to do mkraid /dev/md1 and /dev/md2. This will mirror everything from my first drive to the second except the swap file which I understand is not necessary to mirror. I get the following error message when I try it.
error - /var device is busy.
I tried to do a umount /var and it says that it is successful but it still shows busy.
I assume that you cannot mount a device while processes are still running. How can I successfully umount each of the other partitions that I want to create raid devices for?
2. Once that is done do I then do a mkefs on the md0, md1 and md2 so that they are formatted?
3. Last I have read about a utility called mdadm which allows you to create and manage raid devices. Is this useful or should I stick with mkraid and the other tools?