Migrate hard drives

  • I have recently had a hard drive failure and am after some advice.

    Current setup is:

    Beelink EQ12 with OMV installed on the 512GB NVME

    120GB SSD holding Docker and my containers

    All storage is on NAS drives


    I am currently rebuilding my containers on the 120GB drive after an older 512GB SSD drive died. I have ordered a 1TB SSD drive to replace the 120GB but it is a week away.


    Once I have built my containers and they are all functioning correctly, what is the cleanest way to migrate from the 120GB to the 1TB, keeping all my containers information etc.?


    I know I will have to recreate and remap shares for docker, appdata, downloads etc. but other than remapping, what's the best way to move the files? I am not great with Linux command line so will need some help and wouldn't mind practising a bit before the new drive comes along so I have ironed out any kinks

    • New
    • Official Post

    You could just clone the 120GB drive to the 1TB drive and expand the filesystem to the full size. Don't use the two drives with OMV at the same time, but only the 1TB drive. OMV and docker will not notice a difference.

  • You could just clone the 120GB drive to the 1TB drive and expand the filesystem to the full size. Don't use the two drives with OMV at the same time, but only the 1TB drive. OMV and docker will not notice a difference.

    Any guides you could point me too on how to achieve this? I am very very new to Linux (OMV is my first time wading into it) and while my Google skills are reasonable, I would feel better if someone who actually knew what they were doing could point me in the right direction

  • Don't know if there is a guide in the omv extras wiki, but omv extras does offer a disk clone plugin. Just pick the correct source and destination and off you go.


    Alternately, clonezilla or rescuezilla. Once again, no particular guides I am aware of, but if your google skills are as reasonable as you say it shouldn't be too hard to find one.


    The omv extras kernel plugin will let you install clonezilla as a bootable option, or you can download and flash it to a thumb drive to boot from.

  • CloneZilla I used many times on many PCs and I can recommend to create a 'snapshot' of the internal drive with your perfectly configurated and good running OS, to restore it one-to-one whenever your system or drive will be gone...

    Not even to restore to your previously done perfect configuration when you occasionally did a misconfiguration. When your internal drive dies, you just buy another drive with equal or more space, restore from your CloneZilla image your previous over-all setting, and your server is up again within some minutes!

    You may create images from specified partitions, or from a complete drive. I always create images of complete drives from my servers. By this - worst case - I'm able to recover the exact setting to a new drive within some minutes.

    Note that CloneZilla brings a Linux-live-OS with it, so in case of a recovery (and your old OS-drive was completely dead), your brand new replacement drive does not need any preconfiguration!

    Usage for creating an image is like this (to restore it's more or less the same steps) :

    - download the live version (https://clonezilla.org/downloads/download.php?branch=stable) and get it on a USB-Stick (thumb drive) or an external CD,

    - boot your PC from that external drive (OFF your machine completely, switch ON, immediately press "F2" or whatever key your mainboard needs for entering the UEFI setup, set 'boot priority order' to your external drive... google how it is done on your specific machine),

    - after boot-up of the live-OS on the CloneZilla media, the CloneZilla GUI displays, note that the GUI shows explanations on each and every config question that you answer. Here is a step by step summary what you do in the GUI to create an image:

    - RETURN (to execute the preselected and highlighted text 'Start_Clonezilla'),

    - RETURN (to execute preselected 'device_image' ; so you config to process to grab a device and later to create an image of it),

    - RETURN (to execute preselected 'local_dev' ; by this you say you'd like to work on a local device),

    - now plug in another external (USB) device (where the image of your good working internal drive should be written to - to later restore it if your OS drive dies one day), wait some 5 seconds,

    - lines with all drives recognised arise on the GUI, excluded of the one CloneZilla was booted from, so minimum is two lines, one for your internal OS drive and one for the external drive (target drive) that gets the image written to in a later step,

    - type simultaneously the both keys 'Ctrl' and 'c' (to exit the display of drives found),

    - by arrow down key select that single one drive that has to receive(!) the image (NOT the internal OS drive, but the external one) and RETURN,

    - RETURN (for not processing a file system check before mounting this external drive - be sure it's file system is error free),

    - RETURN (for continue),

    - arrow down to select 'Expert_mode', RETURN,

    - RETURN (to execute preselected 'Save_local_disk_as_an_image'),

    - RETURN (to use preselected suggestion of the folder name to create on the external drive to later write the image into ; usually the date and time in the format <yyyy-mm-dd-hh-img>),

    - wait some seconds (to give time to list all other possible drives - ...that are not the target drive and not the CloneZilla drive),

    - 'arrow down' and 'arrow up' to select that drive that you'd like to create the image from (possibly your internal drive with the OS), RETURN,

    - RETURN (to execute the suggested imaging procedure ; mostly 'Priority: partclone > partimage >dd'),

    - RETURN (for accepting the many or not preselected options. Take your time and read the explanations to learn, but possibly just change nothing and just proceede),

    - RETURN (for using the preselected compression algo ; I prefer an old and slow (but hopefully well tested by time) algo, so I check the '-z1' option. But anyway what you choose, while recovering, CloneZilla will detect your selection and will restore perfectly),

    - insert '4096' to be able to divide the image into parts of this size max. and save the parts on (many) CDs, even if your drive has much more data than a single CD), RETURN,

    - RETURN (to skip checking the source file system (internal drive with OS),

    - RETURN (to execute the preselected 'Yes' to CHECK the image created later),

    - RETURN (to execute '-senc Not_to_encrypt_the_image' ; or otherwise let it encrypt),

    - RETURN (to after the image creation decide what to do ; ...and to have time to read the screen and not to shut down automaticly),

    - RETURN (to continue with all your configurations done),

    - enter 'y' and RETURN (to certify to launch the imaging process),

    - ...wait some minutes to get it done and watch the status lines scolling over the screen. Even a yellow coloured line needn't to indicate a serious problem. Yellow just means interesting or possibly important. I never ended up in a broken image. Time is by size of image and speed of your USB bus and writing speed of the external target drive, but it takes just some minutes.

    - RETURN (for 'Finished saving...'),

    - RETURN (for 'Press Enter to continue...'),

    - RETURN (for I have read the warning not to forget a POWER DOWN after all),

    - 'arrow down' until 'PowerOFF' is selected, RETURN,

    => that's it! :)

    Notes:

    - whatever is to be seen on the screen, read as careful as possible and you will understand completely what is all about - even if you claim to have no idea of linux

    - I always restore an image created onto another (new or spare) drive and replace the original drive by the one with the restored image. For important machines I always have a spare setting (machine with the exact config). In this machine I can test the 'recovery' to be sure, the image IS DEFINITELY NOT BROKEN

    - The restore procedure is not explained step-by-step here, because it is almost the same like the imaging process. More or less only the drives are the other way round: CloneZilla reads from the external drive and writes to the internal. On the other hand, many GUI screens are spared out. E.g. for writing the image it is needed to know weather to compress the data or not. While restoring the data is handled the right way, no matter if or which compression algo was used. Therefore on the recovery process, you will not see any question about compression. And so is with other options too.


    Another hint: After having used CloneZilla for some time, you will end up with many folders with complete images in. But which one was what machine and setting? To avoid guessing, right after the creation of an image, add a textfile to the folder with a decent description of the image (what machine, what OS, what purpose, what special configs, login and password for admin and so on). Because what is the use of an image, if the image is 12 months old, but you just remember the passwords of the last three months???

    You may add to the folder of the image files without causing the recovery problems, as long as you use file names not known to CloneZilla.

    • New
    • Official Post

    what is the cleanest way to migrate from the 120GB to the 1TB, keeping all my containers information etc.?

    I recently did the same operation.

    Stop the containers. Use rsync to duplicate the folders to the new drive. Modify the docker paths to the new hard drive, if you use environment variables there will be few modifications. Modify the relative paths of the folders configured in the plugin. Restart the server (or docker). Restart the containers. Ready. Simple and easy.

  • I recently did the same operation.

    Stop the containers. Use rsync to duplicate the folders to the new drive. Modify the docker paths to the new hard drive, if you use environment variables there will be few modifications. Modify the relative paths of the folders configured in the plugin. Restart the server (or docker). Restart the containers. Ready. Simple and easy.

    Did you use the rsync built into OMV and just do directory by directory or is there a way to clone the whole drive at once?

    • New
    • Official Post

    Did you use the rsync built into OMV and just do directory by directory or is there a way to clone the whole drive at once?

    I did it from CLI folder by folder. There were only five or six folders.

    • New
    • Official Post

    CloneZilla is not asking how many thousand or million folders to bring to another drive

    That's true. So depending on what you want to do, it may be more interesting to use clonezilla or rsync. In my opinion, in this case, rsync is much simpler.

Participate now!

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