Raid 1 to Raid 5 Migration Optimization

Got a question about our NAS utilities? The answer lies within.
Post Reply
todortk
Posts: 4
youtube meble na wymiar Warszawa
Joined: Fri Jan 29, 2021 5:01 pm

Raid 1 to Raid 5 Migration Optimization

Post by todortk »

Before buying the AS5304T I had two identical 16TB Seagate exos drives, which were formatted using NTFS and had quite a lot of data on them.
My Idea was to achieve a RAID 5 configuration with 4x16TB drives (by buying two additional 16TB drives)
What I did so far was:
1. I moved away all the data from the first 16TB drive
2. I set up the first drive in the NAS as a single drive.
3. I moved the data from the second 16TB drive to the drive in the NAS (which filled nearly 98% of the space)
4. I added the second 16TB drive (which was already empty) and two new 16TB drives and choose migrate from single disk to Raid 5 using all four disks.

What I see is that the migration path is this:
Single disk -> Raid 1 (2 disks) -> Raid 5 (3 disks) -> Raid 5 (4 disks)

My question is:
Does the migration process optimize the Raid 5 performance, so the files are read as fast as possible from the new Raid 5 volume?
What I mean :
If I have a file of 6 sectors on single disk it would look like :
Disk 1
S1
S2
S3
S4
S5
S6

In non-optimized Raid 5, the number of rows would stay the same :
Disk 1 >>>> Disk 2 >>>> Disk 3 >>>> Disk 4
S1 >>>> Empty >>>> Empty >>>> Parity 1
S2 >>>> Empty >>>> Parity 2 >>>> Empty
S3 >>>> Parity 3 >>>> Empty >>>> Empty
Parity 4>>>> S4 >>>> Empty >>>> Empty
S5 >>>> Empty >>>> Empty >>>> Parity 5
S6 >>>> Empty >>>> Parity 6 >>>> Empty

In this setup the number of reads, needed to retrieve the whole file remains 6. And even more, any further additions to the NAS will not benefit from the increased read performance of RAID 5. as only 2 columns in each row are available for future use.

In optimized Raid 5 we would have :
Disk 1 >>>> Disk 2 >>>> Disk 3 >>>> Disk 4
S1 >>>> S2 >>>> S3 >>>> Parity 1
S4 >>>> S5 >>>> Parity 2 >>>> S6
Empty >>>> Parity 3 >>>> Empty >>>> Empty
...........

In this way, we will need only 2 reads in order to read the full file. And more, further files will have 3 free columns in each row, so they will be read and written in the fastest possible way.

Does the migration procedure achieve an optimized Raid 5 as a result, or is there an additional utility that can be run after the migration, in order to achieve the desired result?
User avatar
orion
Posts: 3485
Joined: Wed May 29, 2013 11:09 am

Re: Raid 1 to Raid 5 Migration Optimization

Post by orion »

Yes, you can do that. One thing you'll need to check is 98% of 16TB data. NAS should occupy some space to store OS and configurations. Not sure if it's all right for 2% space left. And your way will take plenty of time.

I'll suggest you the following:
  • Backup all the data from the first 16TB drive.
  • Put this old disk and another 2 new disks into NAS. Create a RAID-5 volume. Wait for synchronization.
  • After created, copy data from the second old 16TB disk to NAS.
  • Insert the second old disk to NAS and expand RAID-5 volume to 4 disks.
  • After done, copy the first 16TB data back to NAS.
And you don't need to worry about performance. Case-1 is nearly impossible if you follow the procedure above.
Post Reply

Return to “NAS Utilities”