8

I am looking to learn the setup for RAID on my OS (Pop OS Linux) and also backup my laptop.

I want a proper backup scheme in place on one external drive (drive A) and I want a RAID 1 setup between another external drive (drive B). Neither drive A nor B will mirror my hard drive, but I would like them to mirror one another for redundancy in backups. I tried setting up RAID 1 for them, but they sought to mirror my boot drive, which isn't what I seek.

Is RAID an appropriate tool for mirroring external drives in such a manner? Or is there a better tool? Do the drives have to be present at boot?

I hit a bump with needing the drives at all times when rebooting the computer without the drives present.

2 Answers 2

16

From a high level persepective, using a RAID of external disks as a backup device ...

... has the following benefits:

  • Logically, you only have to backup data once (the RAID layer handles the redundancy when you copy data)
  • Some configurations can detect bit-rot and auto-correct it (btrfs-raid, md-raid + dm-integrity)

... and the following disadvantages:

  • If one of the disks is not present (e.g. if you forgot to plug in one of the data or power cables), you're unable to cleanly assemble the RAID device
  • If one of the disks fails, or is disconnected during operation for whichever reason, you have to rebuild the RAID device
  • If the filesystem is faulty, all disks contain faulty data, because the faulty data is replicated by the RAID layer (true for md-raid, lvm-raid; false for btrfs-raid, zfs-raid) - If, for example, you would use a md(adm)-RAID-1 with a btrfs-filesystem ontop of it, and the next kernel update (which includes the btrfs code) comes with a bug in the btrfs code, and this bug corrupts btrfs-filesystems, both disks would contain a valid md-RAID-1 device with a corrupted btrfs-filesystem ontop.
  • If the RAID-layer code contains a bug, both disks are corrupted, too - The same argumentation as for filesystem-bugs applies

My advice is to not use a RAID of multiple external disks as a backup device and to instead use the disks independently with independent filesystems and execute your backup solution serially for each one of them.

IMHO, RAID should be used to provide high-availability. Backup needs redundancy, and this includes redundancy on a filesystem level (multiple separate filesystem instances).

My advice is to create independent filesystems on each one of your external disks and backup your data with a (e.g. rsync) script to each one of them. You can run multiple instances of the script in parallel (one per disk) to speed up the backup process...

I am looking to learn the setup for RAID

A good way to do this is using a (e.g. qemu kvm) virtual machine. This allows for creating as many virtual disks as you want to experiment with.

1
  • 2
    Also, a good backup system will have at least one backup offsite (or at the very least offline) at all times, in case the building burns down, or some ransomware/runaway software/user error encrypts/deletes/overwrites stuff on all mounted volumes. RAID makes this more expensive, complicated, and failure-prone. Jul 6 at 3:45
4

I would not recommend to use two external drives with RAID. Better use a tool, like rsync, to duplicate the data between the disks. Then you can always attach one disk to retrieve the data.

If you're using RAID on the two external drives for backup, then when you need to restore, you have the challenge to get RAID working before getting the data back. If you would trust on your backup, make it please as easy as you like. But don't use RAID for it.

3
  • What do you mean by "you have the challenge to get RAID working"? If the drive is used for backups already, surely RAID is working?
    – Kusalananda
    Jul 7 at 9:36
  • In case of a crash of your system, then you would restore to a new systen. Then you need to figure out to get RAID working again with the external drives. It's just adding complexity. Jul 8 at 10:07
  • By the same metric, one should never ever do any set-up or configuration beyond the default settings for anything, as it is a hassle to do again and adds complexity if the system crashes.
    – Kusalananda
    Jul 8 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.