News for hackers. Stuff that matters.
Re:Running Out of Disk Space in Production by zrm on Wednesday April 08, 2026 @04:34AM (#47687120)
A good way to do this is to create a swap file, both because then you can use it as a swap file until you need to delete it and because swap files are required to not be sparse.
Re:Running Out of Disk Space in Production by genewitch on Thursday April 09, 2026 @01:56AM (#47699792)
I'm not at a machine, linux doesn't zero the swap "file" does it? if i set vm.swappiness = 0, will your "trick" work if i never hit memory pressure?
Re:Running Out of Disk Space in Production by zrm on Thursday April 09, 2026 @02:19AM (#47699931)
If you create the file with 'mkswap --file' it allocates the blocks. Trying to use 'swapon' with an existing sparse file won't remove the holes for you but does notice them and then refuse to use it.