Some advice moving rootfs to SSD

  • Hi there,


    I hope I can get some advise from you forum readers.
    I have the following installation.
    I got a Odroid HC1, in it a SDcard with the OMV 4.0 image written on it.
    In the Odroid there is a SSD connected to the SATA.
    Ii got everything up and running. A Samba share, a media server, a syncthing, some dockers (baikal, photoshow) and I like it verry much.
    BUT i worry a bit becouse al of this is installed and run from a SDcard. And I know from experience that this can break very easy. I got the flashdisk plugin installed that some how should reduce write/read actions


    Now there are plenty how to's for moving the rootfs to the SSD and run OMV and everything installed from the SSD.
    But all these howto's start from scratch and I all ready have a complete setup with all sorts of files on the SSD.


    I did mount a HDD of 2TB on the USB port. SSD is only 120GB. So I would like to move all files to the HHD in the future.


    So how to go about this? Move all files to HDD and then format SSD and move rootfs and than reinstall everything.


    Or can I some how just move rootfs right now and keep everything as is. I expect not becouse you need to repartion the SSD.


    Or do you think that the flashdrive plugin is good enough.


    Can I get some advice from you guys/girls how to get about this.


    Thank you.

  • Use Clonezilla (or dd) to clone the SDcard to the SDD drive.

    --
    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.

  • Really? but you have to repartition the SSD for the new rootfs right? And format it.

    Absolutely not.


    And just in case you are not aware, the SSD will be completely wiped in the process. So if you have valuable data on it, copy it somewhere.

    --
    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.

    2 Mal editiert, zuletzt von gderf ()

  • Let's say your OMV system disk is on the SDcard and it is /dev/sda. And your SSD is /dev/sdb.


    Then in a root shell you could run:


    dd if=/dev/sda of=/dev/sdb bs=1M


    And you would wind up with your OMV completely cloned to the SSD disk. Just shut the machine down, remove the SDcard, and turn the machine back on.


    But you had better be very sure about which drive is which. And you should disconnect any other drives while doing this.


    Mistakes made with dd can be fatal and are permanent and unrecoverable.


    If you are not sure about what you are doing, then do not do it.


    You could also use the Clonezilla program to do the same thing. You'll have to read up on that for yourself.


    See: https://clonezilla.org/

    --
    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.

    Einmal editiert, zuletzt von gderf ()

    • Offizieller Beitrag

    OMV 4 for Odroid XU4, HC2 and HC1 is based on Armbian.


    You partition the SSD, using some other Linux computer, so that it has a suitable partition for the root filesystem. 16 GB is plenty. Partition the rest for data or for use by docker and so on.


    Then install OMV4 as normal, only touching the SD card.


    Then run the script nand-sata-install. It will move the root filesystem for you. The script is available in the root filesystem on the SD card.


    You still need the SD card present for the boot files, but other than that you are done. And you can use other partitions on the SSD for data.


    However, as long as you don't use the SD card for frequently changing data, it is perfectly fine to keep the root filesystem there. If you worry, clone the card. Then you can simply swap cards if there are any problems.

    • Offizieller Beitrag

    Or do you think that the flashdrive plugin is good enough.

    Yes.


    And as Adoby wrote, if you worry, clone the card so you have a backup.
    You can also use an oversized card to get even more safety.

  • thank you for explaining. But this is a odroid and its boot.ini needs to be on the SD card. Its not that simple as just clone SD card to the SSD. The odoid wil search on the SDcard for boot first. But still thank you for taking the time.

  • Okay but this means setting it up all over again. Thats what Iam trying to avoid. But it starting to look like there is no other way.
    I have this in mind. Place all data and folders to the external HDD. Then make a backup of OMV. Repartition SSD, reinstall OMV on the SDcard run nand-sata-install then reboot and restore OMV backup. Then place all files back on SSD. Seams a way to go.
    Thank you for your reply.

    • Offizieller Beitrag

    I recommend that you keep the root filesystem on the SD card. Don't do anything. How is that for not having to set up everything again? Just imagine the time and effort that you save!


    I have had several OMV HC2 installs running from SD cards, for quite a while, and I have no problems. I also have a HC1 install running from the sata drive, after doing as I described. I regret doing that. I would be much better off not moving the rootfs to SATA. For instance it is very easy to clone a sd card. Or swap it.


    Just make sure not to use the SD card to store frequently variable data. For instance metadata and databases for media servers. By default a lot of stuff is installed to /var/lib/whatever. If /var/lib/whatever is located on the SD card, that is Bad™. For instance /var/lib/docker, /var/lib/plexmediaserver. Place those folders on the SSD!

  • I recommend that you keep the root filesystem on the SD card. Don't do anything. How is that for not having to set up everything again? Just imagine the time and effort that you save!


    I have had several OMV HC2 installs running from SD cards, for quite a while, and I have no problems. I also have a HC1 install running from the sata drive, after doing as I described. I regret doing that. I would be much better off not moving the rootfs to SATA. For instance it is very easy to clone a sd card. Or swap it.


    Just make sure not to use the SD card to store frequently variable data. For instance metadata and databases for media servers. By default a lot of stuff is installed to /var/lib/whatever. If /var/lib/whatever is located on the SD card, that is Bad™. For instance /var/lib/docker, /var/lib/plexmediaserver. Place those folders on the SSD!

    Okay well Iam a bit of a novice linux user.
    But I can say that the /var/lib/docker is not on the SSD but on the SDcard. That said the only dockers I have is photoshow and baikal and the data for these are on the SSD. So any databases for those docker instances are on the SSD.


    How to move these /var/lib/whatever to the SSD?


    EDIT: I found a field where I could specify the base folder for docker. I have set it to a sharedfolder on the SSD.
    But nothing shows up in that folder. I think i need to reconfigure all docker images. These are still set to the default folder.

    • Offizieller Beitrag

    There are several threads on this subject here.


    Some options:


    Specify an alternative path as the "docker base path" in the OMV GUI for docker, before any docker is installed. May require a fresh reinstall.


    Move the /var/lib/whatever folder and replace it with a link to the new location.


    Create a separate partition for /var/lib/whatever, or even /var/lib, on suitible media and mount it using an entry in fstab.


    When installing software that want to use /var/lib/whatever, specify an alternative path.


    One nice thing about this is that it helps keeping the root filesystem small and simple to backup. Just clone the SD card. You can easily backup the whatever software separate from the root filesystem, if you want to. And of course, together with the flash plugin, this greatly reduces the amount of writes to the root filesystem, meaning that a good SD card is likely to last for many years.

    • Offizieller Beitrag

    You can only change the docker base path BEFORE it is used. Once you have installed some docker it is fixed. By default to /var/lib/docker.


    You can either make a fresh reinstall (that is what I did) or try one of the the other options I suggested. Or try to "hack" or modify the installation.

  • Okay will look into it. Good advice it think thank you.

  • Okay will look into it. Good advice it think thank you.

    • Offizieller Beitrag

    Shut down your Odroid, pull the ssd card, and do a "dd" or some such.
    Here's an article for Windows or Mac: https://thepi.io/how-to-back-up-your-raspberry-pi/

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

Jetzt mitmachen!

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