9

My laptop has two disks, a SSD and a traditional magnetic disk. I plan to make a partition on the mag disk equal in size the SSD and set up BTRFS RAID1. This I know how to do.

The only reason I'm doing the RAID1 is for the self-healing. I realize writing large amounts of data will be slower that the SSD alone, but is it possible to set it up to only read from the magnetic drive if there's an error reading from the SSD?

2 Answers 2

11

I asked on the btrfs mailing list, and got the answer I needed.

To summarize, the btrfs raid 1 disk access algorithms work by reading from one disk for even-numbered PIDs, and the other for odd-numbered PIDs. It's on the roadmap to upgrade this to a more advanced algorithm, but obviously that sort of lottery probably won't work out very well for one fast disk and one slow disk. And on top of that, it's possible that if the slower disk falls too far behind the faster disk while writing, it may cause errors.

I've opted to simply make backups to the slower disk and restore from those in the event of an error. That way I can still enjoy the bitrot protection of btrfs' checksumming while avoiding possible issues with different disk speeds.

1
  • Thank you for adding interesting information straight from the btrfs mailing list. Commented Feb 9, 2015 at 14:08
-3

My laptop has two disks, a SSD and a traditional magnetic disk. I plan to make a partition on the mag disk equal in size the SSD and set up BTRFS RAID1. This I know how to do.

Although I am not routinely familiar with BTRFS, I do know today's file systems repair themselves, and when a mirror RAID1 used, the file system can operate only from one mirror if necessary. And with the right file system fsck.btrfs .. the repairs and read are performed from the first disk to access the information and then passed to the process which needs it.

The only reason I'm doing the RAID1 is for the self-healing. I realize writing large amounts of data will be slower that the SSD alone, but is it possible to set it up to only read from the magnetic drive if there's an error reading from the SSD?

In summary, to set it up to only read from the magnetic drive if there's an error will be done summarily as an auto process because of the RAID1 setup.

:)

1
  • 1
    This is incorrect, as pointed out by the link in Spacedog's answer. Commented Feb 9, 2015 at 14:09

You must log in to answer this question.