NAS326 migrate RAID0 array to RAID1 on different disks

Options

Hello, I would like to know if there was any intelligent way to migrate a RAID0 cluster (1TB + 1TB) to a RAID1 (4TB + 4TB) cluster on DIFFERENT disks. The 1TB drives are in the NAS, and I can manage to connect one 4TB drive via a USB adapter, but not both.

The "solution" I thought about was to just start copying everything to the HDD and then RAIDing it with the other disk, but I have no idea if that would work or it would delete everything from the source 4TB hdd.

Please help me :(

Accepted Solution

  • Mijzelf
    Mijzelf Posts: 2,635  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options

    You could copy the raid0 array to an external disk, then remove the 1TB disks, create a single disk raid1 array on the remaining disk. Copy files back, and finally add the external disk to add it to the raid1 array.

    If you are not afraid for the commandline, you could take the 1TB disks out, put in the 4TB disks and create a raid1 array. Then put back the 1TB disks, manually mount one 4TB disk as a degraded raid1 array in an ssh shell, and copy files over. Put that 4TB disk back and so the NAS recognizes the degraded array, and finally add the remaining 4TB disk, which will cause a resync.

    Either way, do not thrash the 1TB disks before you have verified your files are on a healthy raid1 array.

    And because this is Linux, and people want to have fun, there is yet another option. Put in the 2 4TB disks, and create a raid1 array. Then connect 1 1TB disk over USB, and create a partition dump from it's data partition to the raid1 array. Then connect the 2nd 1 TB disk, and assemble the partition dump together with the physical disk to a raid0 array, mount it, and copy files over. This is fun, but slow(er). During the copy the source physical disk is the same as the target physical disk, which causes a lot of head movement.

All Replies

  • Mijzelf
    Mijzelf Posts: 2,635  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options

    You could copy the raid0 array to an external disk, then remove the 1TB disks, create a single disk raid1 array on the remaining disk. Copy files back, and finally add the external disk to add it to the raid1 array.

    If you are not afraid for the commandline, you could take the 1TB disks out, put in the 4TB disks and create a raid1 array. Then put back the 1TB disks, manually mount one 4TB disk as a degraded raid1 array in an ssh shell, and copy files over. Put that 4TB disk back and so the NAS recognizes the degraded array, and finally add the remaining 4TB disk, which will cause a resync.

    Either way, do not thrash the 1TB disks before you have verified your files are on a healthy raid1 array.

    And because this is Linux, and people want to have fun, there is yet another option. Put in the 2 4TB disks, and create a raid1 array. Then connect 1 1TB disk over USB, and create a partition dump from it's data partition to the raid1 array. Then connect the 2nd 1 TB disk, and assemble the partition dump together with the physical disk to a raid0 array, mount it, and copy files over. This is fun, but slow(er). During the copy the source physical disk is the same as the target physical disk, which causes a lot of head movement.

  • Knocks
    Options

    Thanks a lot!

    I would have loved to try the fun way, but sadly I'm not that good at managing RAID via CLI, so instead of mounting the degraded RAID0 I followed the second way, which was creating the RAID1, mounting the RAID0 disks and connecting a single RAID1 disk (degraded array). I just "cp"ied everything from the RAID0 (/i-data/<something>) to my mountpoint for the RAID1 disk (in my case I mounted it to /e-data) and that was it.

    The only disadvantage is that I have lost all the permissions for the files, but luckily I didn't have any particular setting, so now I'm just "chmod"ding everything back to shape.

  • Mijzelf
    Mijzelf Posts: 2,635  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    Good. For future experiments, 'cp -a', when run as root, copies all permissions and owners.

Consumer Product Help Center