1

I had 1 4TB drive on its own that is quite full, now I got 2 additional 4TB drives, and I want to use the three in a raid5 configuration with some kind of software raid, like lvm or zfs.

But I don't have anywhere to keep the data from the original drive while I make the array. Is it possible to make the new volume keeping the existing data? Or, is it possible to make a raid5 with 2 disks originally, copy the data, and add the original drive afterwards?

3
  • According to Wikipdeia's "RAID" article, "RAID 5 requires at least three disks". This is an XY problem. What is the actual goal? If you don't already have a backup of your 4TB, you have a bigger problem than this.
    – waltinator
    May 6, 2021 at 17:17
  • @waltinator The 4TB drive itself is the backup of several other devices, with no other one drive being big enough to store all the info together. The goal is to be able to still have all the data without having to recreate the filesystem structure or back up from the source all over again, which is possible but quite cumbersome. So that's why I was thinking of extending a raid volume, or converting a logical volume to raid after the data is copied, or something similar. Leaving the NAS to work on it for a while is less an inconvenience that booting up all the other drives
    – metichi
    May 6, 2021 at 18:06
  • 1
    "But I don't have anywhere to keep the data from the original drive " Then the 1st priority is to make that possible. You do NOT do this without a backup and a method to restore that backup. Cheap option: set up a google cloud instance and copy the data over to that instance. 1st 30 days the instance is free of charge so cancel it before that.
    – Rinzwind
    May 6, 2021 at 18:21

2 Answers 2

0

You could use the two new disks to create a degraded RAID5, then copy your files over to that, then add the old disk to the RAID5 so it's not degraded anymore.

I am sure there is also an Ubuntu guide how to do that, but I can't find one; but these instructions that were meant for SUSE should work just as well (at least so you get the idea):

https://documentation.suse.com/sles/15-SP1/html/SLES-all/cha-raid-degraded.html

1
  • Did have to learn how md goes but it does answer my question nicely, thank you!
    – metichi
    May 7, 2021 at 15:49
0

Creating a ZFS pool with your existing disk would erase the data, so make sure you don't create a raid5 or mirror with it.

I would create a zfs mirror pool with the two new disks, set compression on, create some zfs filesystems and copy the data from the existing disk onto the mirror. The zfs compression normally works quite well, I get 1.66x compression with a mix of binary and text files (4TB). This way your data will be on a mirror which is safer than it is at this moment and you should have some free space. Raid 5 would give you more space but you cannot build that with your available hardware.

I find mirrors offer more flexibility in the future than raid5, you can, for example, add larger disks to the mirror wait for a resilver to complete and then detach the smaller ones to move to a larger capacity mirror.

2
  • But that would leave me with one of the 4tb drives unused and I did buy 2 extra to also get some additional storage besides the 1 drive fail protection
    – metichi
    May 6, 2021 at 18:15
  • The compression will give you more space in the short term and the mirror will increase read performance. If your machine can take another 4tb drive you could extend the mirror to consist of 4 drives, you will get increased read and write speed because the writes will be spread across the sliced mirrors. I avoided suggesting backup and restore via the cloud because 4Tb would take months to copy at most peoples network speed!! Hope you get it sorted. May 7, 2021 at 9:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .