Hard disk migration

  • Hello all,


    I have had an OMV NAS for several years and I am super satisfied with it. Unfortunately, the disk space is now no longer enough, so I need to migrate to larger disks. Currently 3x6TB disks are installed as RAID5. Now 3x18TB disks are to be installed. The motherboard has only 4 SATA ports, so a direct copy is not possible. So I wanted to ask you how you would do such a migration?


    - Backup of the share

    - do I have to delete the share or can I replace the disks directly?

    - should I unconfigure the RAID5 before the swap

    - then the phys. Swap the disks

    - if necessary create RAID5 and share again

    - Restore the data


    Or how would you do it?


    thx

    Mario

  • I would put a 4 port (or larger) sata controller card in the system and use that for the new configuration to do the copy. It will be much faster than the backup and restore option.


    SATA Card 4 Port with 4 SATA Cables, 6 Gbps SATA 3.0 Controller PCI Express Expression Card with Low Profile Bracket Support 4 SATA 3.0 Devices
    SATA Card 4 Port with 4 SATA Cables, 6 Gbps SATA 3.0 Controller PCI Express Expression Card with Low Profile Bracket Support 4 SATA 3.0 Devices
    www.amazon.com

    SATA Expansion Card 10 Ports, SATA PCIe Card,6Gbps PCI Express x1 to SATA 3.0 Controller Card for Windows XP/7/8/10 SSD HDD
    SATA Expansion Card 10 Ports 6Gbps PCI Express x1 to SATA 3.0 Controller Card for Windows XP/7/8/10 SSD HDD
    www.amazon.com


    You can move the drives back to the motherboard later if you want or leave all drives and controller in there if you have the space to mount the drives.


    If you want to do the backup and restore option you need a drive big enough to hold all the data temporarily, so the controller card may actually be a cheaper option too if you don't have that temporary storage). Once the backup is done, there is no need to unconfigure the raid before the swap. The raid info is stored on the drives, so just unplugging it will not cause a problem.


    You should, however, remove any shares from OMV before removing the old drives, and re-create them on the new ones, since the absolute path to the shares will be different. Otherwise you will have to go manually editing xml files to remove them.

  • Hello BernH, thanks for the tip, but I have an ASRock J5005 board installed in my NAS. The board has only one PCI slot, which I use for a boot NVME card (OMV system disk).

    I have not quite understood the correct procedure yet. Since I have to replace the old disks 1:1 with the new ones, the only way I can do it is via the backup. If I understand you correctly, I have to remove the share first. Or would it be possible to simply disable SMB? What about the file system? Do I have to unmount it first? Or at what step can I remove the disks?


    I ask all this because I want to avoid zombie disks or configurations.


    Thanks again!

    Mario

  • The smb config and shared folders are set up in the omv config xml. If you don't remove those befre removing the old disks they will continue to show up, but will be referencing the uuid of the old array and you will have to manually remove them from the xml.


    Your process will have to be

    1. backup to temp storage,

    2. remove smb and shares

    3. shut down and remove old disks

    4. install new disks and boot up

    5. create new array and file system

    6. restore the backup to the new array

    7. create shared folders and smb on new array

    8. fix any storage paths used by and dockers to point to the new array


    If you don't remove any settings that reference the old array before removing it you will have zombie configs pointing to the old array and you will have to manually go editing the config xml to remove them. This is not a fun thing to do.

  • Thank you very much for your explanation !!!


    Maybe you have a tip for the needed backup too. Is it possible to connect an external USB drive to the NAS and copy directly from the RAID to this USB drive ? Would this be done through the shell or GUI and would the file permissions be preserved ?


    Thanks again!

  • Yes you can plug in a usb drive and backup to that. Make sure the filesystem on the usb drive is a linux friendly filesystem such as ext4, xfs, etc., if you want to keep all the source permissions (ntfs, exfat, and fat32 will not keep all the permissions)


    It can be done via the GUI or the cli. I would recommend rsync to do the clone.


    The rsunc plugin in the GUI works with shared folders, so if you have a lot of chard folder you need to replicate them in them in on the new drive and then do an rsync per share if I recall. The CLI can do it all in one job.


    The basic rsync syntax for cli usage is:

    rsync -avh /absolute/path/to/source /absolute/path/to/destination


    Here is a cheat sheet for rsync:

    Rsync cheatsheet
    The one-page guide to Rsync: usage, examples, links, snippets, and more.
    devhints.io

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!