running openHABian (latest) on a Pi4 and tried to setup SC Card Mirroring.
openHABian tells me, the sizes won’t fit, so I checked:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 59,5G 0 disk
mmcblk0 179:0 0 59,6G 0 disk
So, there’s a tiny bit missing… Can I do anything to expand the freshly bought SD Card.
Funny thing: both are SanDisk Extreme - 64GB?
This is unfortunately almost always happening with SD cards. You have to use the smaller one as main and the biggest one as backup but you can’t do the other way around.
If you have to transfer the content of the biggeser SD to the smaller one you have to do it manually, by taking a backup with a pc, shrinking the image with a Linux script and then writing the reduced size image to the smaller SD. The script modifies the image so that at first boot it will expand to the new available size.
I use the shrink script on my raspberry and use my Nas connected by NFS as temporary storage
shame. I didn’t know, that the same vendor makes different blocks for the same product.
but yeah, the workaround should do it.
Or simply don’t resize to the max
Problem is: cloning doesn’t work on partition size, but on blocksize. So resizing a partition on a 64GB SD Card or not doesn’t make a difference, sadly.
Obviously, the vendors take different manufacturers for the same product. And I got “lucky” to get one of the “large” batch. I even got another vendor with 59,4G size… really strange.
Even a Disk Imager can’t “clone” without a big fat warning message. But luckily after I just clicked on “OK” with Win32DiskImager, it wrote the image I extracted to the “slightly smaller” SD Card and it worked - despite saying there’s likely data on the last 0,1 GB of the image, that don’t fit anymore…
No, read the openHABian docs and proceed with the selected solution .