Cloning to a larger SD card on a Raspberry Pi

  • Hi All,


    Still very new to this but super happy with this set up so far. I have a Pi 4 running the latest OMV 4 image running two USB 3 8TB drives. I used Etcher to burn the image and after some screwing around finally got things to boot on the Pi 4. The image was burned onto a 32 gig SD card and I am not familiar enough with Linux to understand if their is a way to recover the remaining 24 gig from the partition. This is what I see right now when I go into the File System. The system does see the full 32 gig under Disks. I did try searching, however, if I could just get pointed in the right direction I would greatly appreciate it! If I should have used an alternative to Etcher, please let me know.


    Thanks,
    Barry

    • Offizieller Beitrag

    You can use G-parted to expand flash drive partitions, just like a spinning drive. On the other hand, note that whether it's allocated to a partition or not, all of the unwritten space in your 32gb SD-card will be used by the cards controller for wear leveling. So, if you don't need the space, leaving the card as it is, is fine. I have a 16GB USB thumbdrive, with the original partitions, that's working well. (BTW: There's no point in altering the small boot partition. There's nothing to be gained.)


    There's an alternative to etcher that is capable of reading and writing images, Win32diskimager. And there's a cloning process in this -> guide (under OS backup).


    Note that it's easy to clone small to large. If trying to go the other way, large to small, check the box for "Read Only Allocated Partitions".

    • Offizieller Beitrag

    I think you should examine your reasons to why you want to "recover" the 24GB.


    I suspect those reasons are bad™ and you really should leave the SD card as it is.


    Good SD cards implement wear leveling. Not as good as a SSD, but still. That means that a big card that is mostly unused is likely to last much longer than a big card that is mostly used.


    By default OMV writes very little to the SD card. That is good because it is mostly writes that make the card fail. If you expand the rootfs and start using it for storing something you most likely will write more or even often to the card. That is bad™.


    I use 32 GB or 64 GB SD cards and typically less than 8GB is used. The rest is unpartitioned.

  • Crash and Adoby, thanks a ton for your advice, I had no idea that the unused space would still be beneficial. Adoby, you are in fact correct, my reason was it simply seemed like a waste to have the unused space just sitting there. That is clearly not the case!

Jetzt mitmachen!

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