Migrate from 64GB to 128GB SD card

  • I've decided to upgrade the 64GD micro SD card in the RPi3 I use for TVHeadend to a 128GB card. I know I can clone from a smaller to a larger card but there's something about touching a file to tell the Pi on the next boot that it should expand to fill the space.

    My questions are a) which file and b) how do you touch a file?

  • I've decided to upgrade the 64GD micro SD card in the RPi3 I use for TVHeadend to a 128GB card. I know I can clone from a smaller to a larger card but there's something about touching a file to tell the Pi on the next boot that it should expand to fill the space.

    My questions are a) which file and b) how do you touch a file?

    I don't know if the LE able to do something like this, to resize the partition what is mounted and in use. Maybe thru SSH and some linux commands? If I don't mistake, at the first boot is created the "userdata" (Ext4) partition using the available space.

    If you probably already use a PC to clone the card, why don't use a partition tool to resize the partition on the new card? Like "Minitool Partition Wizzard Free" (Windows) or "Gparted" (Linux).

  • Creating /storage/.please_resize_me will result in the current partition being removed and a new one being created on the next boot. This is a destructive action that will nuke the current contents of /storage, so you probably don't want to do that.

    Instead, take a backup using the LE settings add-on, move it somewhere safe, then clean install the same LE version you're currently running to the new SD card (which will use the full space of the card) then use the settings add-on to restore the backup onto the new card.

    Doing a backup/restore is normally a lot faster than card cloning methods because the amount of data 'on the card' is normally only a fraction of the large capacity of the card; whereas cloning requires you to bit-for-bit copy the card including all the unused space.

  • Note that the LE settings add-on backup will NOT backup existing recordings and such, only the addons/config etc. - but after you've got a working system again you can put the old SD card in a USB card reader, connect to the RPi, and transfer the files locally.

  • If you probably already use a PC to clone the card, why don't use a partition tool to resize the partition on the new card?

    I did think of that, and will be trying it, but I don't know if it will work and remember someone saying about clone and touching some file.

    Creating /storage/.please_resize_me will result in the current partition being removed and a new one being created on the next boot.

    I'm happy with that - I can copy the stuff recorded before doing it.

  • I did think of that, and will be trying it, but I don't know if it will work and remember someone saying about clone and touching some file.

    Two things:

    1. For backup (and clone) I'm using the "Win32DiskImager", latest version (1.0.0 - 2017) have option to don't save empty parts. So for cloning, I made a backup (image), then write the image to another card. That is complicated in case of big cards with a lot of data...

    2. I prefer to use small (high speed) SD card for system (LE), and for any other data a big USB-stick. It's a huge advantage, when I need to reinstall the LE and don't need to take care about all other files, downloads, music, video... because is stored in the USB-stick...

  • Creating /storage/.please_resize_me will result in the current partition being removed and a new one being created on the next boot. This is a destructive action that will nuke the current contents of /storage, so you probably don't want to do that.

    The resize file is ignored if there is anything relevant on the partition although the resize operations are not destructive (when the whole process is working correctly).

    It only works on a fresh empty image.

  • Job done - Macrium Reflect free edition to do the cloning, couldn't get anything to resize the partitions using Windows (7, 10, 11) and MiniTool or Aomei so bunged the card in mi ultraportable Linux Mint machine and everything working, nothing lost.