How to move sda1 from a hard drive to a flash disk

  • Hey Guys,


    I have my sda1 installed on the same hard drive of my data. I want to move the sda1 partition to an external flash disk here sdb1?


    Is this possible without any damages or loosing data?


    Please let me know!


    Thanks

    • Offizieller Beitrag

    Why have you moved from the thread you started


    I didn't reply to that because someone had already pointed you to Clonezilla, except with Clonezilla you'll need to run expert mode and clone the boot sector also ensuring that the boot loader is also cloned.


    The simplest and most efficient way to do this is to back up/copy your data off that drive, install OMV on a USB flash drive and start again.

  • thanks for you help!


    The initial thread was about enlarging the sda1 partition so just wanted to be more clear. Sorry


    So I will use clonezilla to backup my data and start a fresh new omv installation.


    That said how to restore my saved data to the new flash disk


    If you could detail step by step as I am so afraid of loosing all my settings and data...


    Much appreciated

    • Offizieller Beitrag

    So I will use clonezilla to backup my data and start a fresh new omv installation.

    No, you need to attach another drive, if you have any exiting files on the current drive copy them to the second, I mean files, documents, movies, music, photos, Clonezilla will not do that.


    Once you have done that install OMV to a USB flash drive then boot OMV using that with the current drive disconnected, then fully update OMV, set time etc but don't install anything including docker.

  • Hello,

    Everything went smoothly but when I tried booting on the usb flash disk it's keep saying

    mdadm: no arrays found in config file or automatically

    OMV refuse to boot...

    Any idea?

    Thanks

    I have removed the internal hard drive

    • Offizieller Beitrag

    mdadm: no arrays found in config file or automatically

    That seems to be a generic error there are some threads on here about it but it should correct itself once updated.

    OMV refuse to boot...

    Any idea?

    Without more information or a screenshot no, how did you install from cd or from another usb, when your pc boots is there an option to select the boot device, it's usually F12.

  • Thanks for your feedback!

    I have reinstalled OMV and it went through....

    However it is very slow communication...I did put it on a 2.0 USB flash disk may be that's why...it will improve if I put a 3.0 usb stick?

    Otherwise do you have any idea to move everything linked to docker to an external drive...I am trying to find a solution...

    thanks

    • Offizieller Beitrag

    However it is very slow communication...I did put it on a 2.0 USB flash disk may be that's why

    I use USB2 the slow part can be when you make changes and click apply.


    Have you connected the 1TB drive.

    Otherwise do you have any idea to move everything linked to docker to an external drive

    You simply cannot move things this will a clean set up

  • I replaced the 1TB drive and removed the flash disk. It is very slow. Could not even login to OMV portal it is lagging...

    How about uninstall docker...and have a shared folder created under the hard drive and reinstall docker with the new path?

    Let me know

    thanks dude

  • is this way works?


    Code
    sudo service docker stop
    sudo mv /var/lib/docker /a/new/location
    sudo ln -s /a/new/location /var/lib/docker 
    sudo service docker start

    What version of OMV are you on? You should put this information in a posting signature and tag your posts appropriately too.


    Is there some reason you can't use the OMV provided facility to do this?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • slouma84

    Hat das Label OMV 5.x hinzugefügt.
  • I have updated as requested sorry I thought it was there...


    Actually, I am out of space on my sda1 partition as docker/portainer are installed there . They are sharing space with OMV stuff as well.


    I need to move all dockers/images from /var/lib/docker to my new shared folder /srv/dev-disk-by-id-ata-ST31000528AS_5VP8RK5N-part3/Docker without


    loosing my existing images. That way OMV will be alone on the partition and no more storage issue...


    Hope that helps!

  • As you listed previously do (but I would copy the data first, then if all goes well you can delete it from the original drive later):


    sudo service docker stop

    sudo cp -r -p /var/lib/docker /srv/dev-disk-by-id-ata-ST31000528AS_5VP8RK5N-part3/Docker


    Then in OMV WebGUI open System | OMV-Extras | Docker Tab.


    Then set the Docker Storage path as /srv/dev-disk-by-id-ata-ST31000528AS_5VP8RK5N-part3/Docker


    Then save and apply changes.


    Then sudo service docker start


    After you are sure all your docker work properly you can delete the folder /var/lib/docker

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Are you sure that the directories and files got copied to the new location?


    Are you sure you changed the Docker Storage path in OMV? Is it still set properly?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!