I just came across PAR2 and don’t really understand it - I’m looking for a discussion of options. I’m a big believer in RAID, but it’s just so darned hard to do, especially on an existing system. My understanding is that PAR2 was created for usenet, but is now used (as a daemon) to generate something like checksums for disk data that can be used to recover partially-crashed disks, etc.?

My current solution is to occasionally shut down my computer and reboot in g4L and do a bit-for-bit clone of my system drive to an identical drive (which never gets mounted in 11.1). It would sure be nice if there was a Linux tool to do that, say, from a command-line.


Doesn’t rsync(1) called like “rsync -cSax source/ target” do a good enough job for you?

I often actually run copy first without check summing, and then just redo with checksums enabled to pick up any surprises. I would prefer going through the file system, as it makes intelligently selective compression more convenient later, encrypting and minimising the cost of bad blocks, and off site backup more reasible, whilst minimising down time.

RAID really addresses disk failures, but not problems of non-ECC RAM & system busses flipping the odd bit, when the LHC gets turned on …

Wiki explains it Parchive - Wikipedia, the free encyclopedia, extra data is maintained, not only to check for errors but to actually repair them, like ECC RAM.

What does a “bit for bit” clone do for you, if some blocks get corrupted during some power failure, or a programming error subtly corrupts a file?

So to make that clearer, RAID really helps with availability, PAR2 is about data integrity and recovery from errors.

Actually, RAID is used to improve throughput as well as redundant storage or both, depending on just what type of RAID you use.

As I am soon going to get a pair of 1TB drives with the idea in mind to use RAID I am wondering if there are any problems in openSuSE using hardware RAID from the MB?

And from your description of Par2 I would think you would not use that in place of RAID unless you for some reason couldn’t use RAID.

@PattiMichelle: man dd. Might need some reading but it works great.

I could imagine PAR2 being used for FS recovery operations, but wouldn’t know why.

I don’t really know… will dd or rsync make bit-for-bit copies, boot sector, partition table(s), and all as “cloning” does? What I have in mind is after a crash, shutting down, unplugging the crashed drive, plugging in the clone, and then I don’t have to reinstall anything (and buy a new “clone” drive). But maybe that’s not necessary? I don’t really know what rsync or dd do on the hardware level but I do know ghosting usually works the way I just mentioned (ymmv). I have OpenSuSE 10.2, 10.3, 11.1 and WinXP all installed on the hard drive.

Ideally, I would like a RAID1 set up on a pair of 1TB drives - so if I get a crash, I just physically replace the crashed drive and keep going while the RAID rebuilds. The problem is that I have a lot of things installed and I don’t think I can move it all to a RAID easily, so for now I’m just cloning my main drive.


EDIT: I see “dd” clones bit-for-bit. I hope I can find a noobs-guide - I would like to not have to reboot to use g4L to ghost my main drive…


Clone one hard drive onto another
$ dd if=/dev/sda of=/dev/sdb

Clone a hard drive to an image file
$ dd if=/dev/hda of=/image.img

Clone a hard drive to a zipped image file in 100Mb blocks
$ dd if=/dev/hda bs=100M | gzip -c > /image.img

Create a boot floppy:
$ dd if=boot.img of=/dev/fd0 bs=1440

Since these are devices, I guess you can’t do a system drive because it would have to be unmounted?

Out of curiosity - is there a way to “defrag” while doing such things to drives? (ext3)

Well, SuSE detects the raid, which you set up using the bios driver during boot, and calls it “md” instead of “sd” - you can also take a pair of drives and declare a new raid during install. My problem is that I’ve already installed :frowning:

I wonder if I can PING the partitions I already have to an external drive, reconfigure my two 500GB drives into a raid, then PING the partitions back to the raid? The only trouble would be device names and a lot of things probably wouldn’t work any more. Also, it uses 2x the power of a single drive.