I found that moosefs trash take too much of my disk space. according to moosefs documentation, it will keep it for a while in case user want it back. But How to clean it up manually to save space?
how to manually empty moosefs trash folder to save space
1.7k views Asked by scott huang At
1
In order to purge MooseFS' trash, you need to mount special directory called "MooseFS Meta".
Create mountdir for MooseFS Meta directory first:
and mount
mfsmeta
:If your Master Server Host Name differs from default
mfsmaster
and/or port differs from default9421
, use appropriate switch, e.g.:Then you can find your deleted files in
/mnt/mfsmeta/trash/SUBTRASH
directory. Subtrash is a directory inside/mnt/mfsmeta
named000..FFF
. Subtrashes are helpful if you have many (e.g. millions) of files in trash, because you can easily operate on them using Unix tools likefind
, whereas if you had all the files in one directory, such tools may fail.If you do not have many files in trash, mount Meta with
mfsflattrash
parameter:or if you use Master Host Name or Port other than default:
In this case your deleted files will be available directly in
/mnt/mfsmeta/trash
(without subtrash).In both cases you can remove files by simply using
rm file
or undelete them by moving them toundel
directory available in trash or subtrash (mv file undel
).Remember, that if you do not want to have certain files moved to trash at all, set "trash time" (in seconds) for these files to
0
prior to deletion. If you set specific trash time for a directory, all the files created in this directory inherit trash time from parent, e.g.:You can also set a trash time to other value, e.g. 1 hour:
For more information on specific parameters passed to
mfsmount
ormfssettrashtime
, seeman mfsmount
andman mfstrashtime
.Hope it helps!
Peter