On Vi, 01 oct 21, 09:23:52, Andrei POPESCU wrote: > On Jo, 30 sep 21, 21:51:20, Reco wrote: > > > > On Thu, Sep 30, 2021 at 04:26:18PM +0100, Myron wrote: > > > > > Does it mean that if I remove the partition and then re-create the > > > partition from the same starting block as the old partition, that the data > > > on the MicroSD card will not actually be erased, but will be encapsulated > > > by the new smaller partition? > > > > Haha. You won't be able to do that, Red Hat took care of it back in 3.2 > > kernel days. You cannot cannot change a partition layout on a block > > device which has any filesystem mounted (or swap is used), the kernel > > won't permit you to do that. Red Hat deserved and deserves whatever > > things IBM is doing to them now, let's leave it at this. > > Moreover, even if was possible, you'd need to shrink the filesystem > > first, or you will damage it. And shrinking a mounted ext4 is impossible. > > [citation needed]
Apologies, I should have checked it before challenging that. From resize2fs(8): If the filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel and the file system supports on-line resizing. so ext4 indeed doesn't support online shrinking. According to Wikipedia it seems very few file systems do (notable exceptions btrfs and (!) NTFS). https://en.wikipedia.org/wiki/Comparison_of_file_systems#Resize_capabilities > > It's plain and downright impossible, unless you're using LVM. And even > > then it's filesystem-specific, which excludes ext4 for instance. Sorry > > to bring you the bad news. > https://linuxconfig.org/how-to-resize-ext4-root-partition-live-without-umount This however implies growing should be possible. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
signature.asc
Description: PGP signature