You are not logged in.

#1 2010-02-02 18:16:25

Isola
Member
Registered: 2010-02-02
Posts: 99

Odd raid 1 setup, possible?

Hi archers!

I'm looking for a solution to make my arch more portable. I'm currently using some simple bash scripts to mirror some different folders through FTP, but this isn't always fast or portable enough. I've been thinking of another solution, and came up with this:

I have 2x 74GB hard drives. The first one got windows installed, and the second one got archlinux.

I'm planning to remove windows from the first drive, and convert both drives into an raid 1 array. I know this is possible, and I've seen the guide in the wiki. All partitions except /boot are encrypted.

Once I have both drives running arch in raid 1, I want to be able to remove hard drive A, and still be able to boot in non-raid without messing something up. I believe this is possible, I just have to read some manuals.

However! Here comes the tricky part:

Disk A, which I removed, will be put into a external chassi, and then connected via USB to another computer. My laptop for example. I will then boot the laptop from a USB Hard drive.

I'm pretty sure I will be able to get that working with perhaps two different kernels to choose from during grub.

This way my laptop will have the same files/programs/everything as my workstation, which is great. The problem arise when I change a file, or basically change anything on the (now) external drive (Disk A). I believe that once I put it back into my workstation, it will get overwritten to match the content of disk B, since they are back in raid 1.

So... Is there any method for me to change the content on Disk A (outside raid 1) and then put it back with Disk B and assemble them both into raid 1, and make them both have the latest content - The latest changed files on Disk A and B, put together to match each other.

Also, I would be grateful if there is another way to make my arch more portable through other methods =]

Thanks.

Offline

#2 2010-02-02 23:43:51

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: Odd raid 1 setup, possible?

In theory, this could work. In practice, it might, but you will have to be vary careful You absolutely need to boot from the drive with the most recent data. What worries me there is that the rebuild might wreck havoc on you. Plus rebuilding will take quite some time, reduce available I/O by a lot unless you limit the speed (which will in turn increase the time it will take), and you will be stressing your components every time you do this. Every time you will sync you are taking unnecessary risks.
I think using this method is a bad idea, you naughty you wink . RAID1 was not meant for this, and you should not use it this way.

What you should do is simply copy data between the disks. The first time you do this, you copy the entire Arch Linux harddisk to the empty one. Best tool to do that would be 'dd'. Be careful with it! It can make a perfect bit copy of your drive, which is what you want for the first copy.

After you have two identical disks. You can keep them in sync with another wonder: rsync.
That command is a bit like Windows's "robocopy" if you happen to be familiar with it.
There are tons of guides and howto's on it, look for them. I believe there is even a "full system backup with rsync" article in the ArchWiki which might provide useful pointers to help you underway.

Last edited by Ultraman (2010-02-02 23:45:57)

Offline

#3 2010-02-05 12:17:28

Isola
Member
Registered: 2010-02-02
Posts: 99

Re: Odd raid 1 setup, possible?

Ultraman wrote:

In theory, this could work. In practice, it might, but you will have to be vary careful You absolutely need to boot from the drive with the most recent data. What worries me there is that the rebuild might wreck havoc on you. Plus rebuilding will take quite some time, reduce available I/O by a lot unless you limit the speed (which will in turn increase the time it will take), and you will be stressing your components every time you do this. Every time you will sync you are taking unnecessary risks.
I think using this method is a bad idea, you naughty you wink . RAID1 was not meant for this, and you should not use it this way.

What you should do is simply copy data between the disks. The first time you do this, you copy the entire Arch Linux harddisk to the empty one. Best tool to do that would be 'dd'. Be careful with it! It can make a perfect bit copy of your drive, which is what you want for the first copy.

After you have two identical disks. You can keep them in sync with another wonder: rsync.
That command is a bit like Windows's "robocopy" if you happen to be familiar with it.
There are tons of guides and howto's on it, look for them. I believe there is even a "full system backup with rsync" article in the ArchWiki which might provide useful pointers to help you underway.

Yeah, you're right, it is a bad idea! I forgot to mention why I wanted to use raid 1 instead of dd/cp/rsync, and that was because of the faster read-speed.

I also figured that if I put one of the disks in a external chassi, the speed would be limited to 480Mbit by the USB-cabel, while connected with SATA I reach about 640Mbit I think. It's one of those WD raptor 10,000rpm disks.

Anyway, I decided to get a third disk, a external one, and follow your advice of rsync to mirror that external with my raid-array. =]

Thank you

Offline

Board footer

Powered by FluxBB