4

My external 5 TB backup drive is almost full.

When I formatted it as Ext4 and created just one partition to it using Raspberry Buster, it reserved 10 % of space so available space was just 4.5 TB.

If I run sudo tune2fs -m 1 /dev/sda1, does it erase old files from the drive?

Stephen Kitt
  • 434,908

2 Answers2

7

tune2fs -m 1 /dev/sda1 will only reduce the percentage of blocks reserved for root; it won’t touch any of the data stored in the file system. So for your purposes it’s entirely safe.

For an external drive especially, i.e. one which doesn’t have file systems that are essential to keep the system working, this reservation is only useful to avoid fragmentation, and reducing it in this way won’t have any adverse effects either.

Stephen Kitt
  • 434,908
-2

rm is the command to remove old files from the filesystem. tune2fs just adjusts the filesystem's metadata, "reserved-blocks-percentage" here.

In general it's a bad idea to fill up filesystems up to the last block, as fragmentation cannot be undone easily.

U. Windl
  • 1,411