Lessfs with background deletion and truncation.
Today I decided to upload a pre-release of lessfs-1.1.6. It has a new feature that a number of users have been lobbying fore. The feature is background deletion / truncation of files.
Let me explain this a bit further. Up till now deleting large files has been an operation that required patience. Lessfs will have to go through the deleted chunks to see if they are reference by any other file. If not it can be put on the freelist (file_io) or deleted from the database with the tc data store.
This test release now marks the file as being deleted and spawns a thread that will do the actual work in the background. While the thread is running it sets a lock on the inode and a lock per hash / per block. The only disadvantage is that when you unmount lessfs, the actual lessfs process may stay around for some time until it has finished it’s background tasks. In the future these delete/truncate operations may become restartable but for now they are not.
You can download the new code from:
lessfs_background_delete
Enjoy,
Mark Ruijter
The linux Kernel Shared Memory, dedup for memory, has a list of pages that are to volatile to dedup. could lessfs benefit from such a feature too? It wil not help for backup, but it might for vm’s.
Would someone be able to help me getting lessfs setup? I think I am pretty close to getting it set up, but I can’t quite get it to work.
Regards,
Brad
Just discovered a bug:
‘tail -f .lessfs/lessfs_stats’ is causing a cpuload around 50%, while there are no read/write operations. Killing tail and lessfs consumes 0% while being idle.
Now that is a Change i have been waiting for which will make lessfs finally usable for me. Will definitely try it out this weekend.
Thanks
With background deletes, it seems that the best solution for the unmount problem is to not consider the unmount finished until all background deletes have completed. So when a background delete is in process and you type the unmount command, it will block until the delete finishes, and then the unmount command will finish.
I upgraded to 1.1.6 and I’m having trouble getting into the /fuse directory as non-root user. Root works fine for me. Here are my mount options:
lessfs on /fuse type fuse.lessfs (rw,nosuid,nodev,default_permissions,allow_other,max_read=131072,max_read=131072,default_permissions,allow_other)
Any ideas why this is happening? I thought allow_other would let non-root users get in.
Actually I figured it out … i think I had some permissions set wrong on the fuse folder.