What is the right path of recycle-bin in eos 4.4.10?

As per EOS document i.e. http://eos-docs.web.cern.ch/eos-docs/configuration/recyclebin.html, it say about to add recycle bin and define the size of recycle bin.
######################
If you want to set the policy to use the recycle bin in a subtree of the namespace run:
EOS Console [root://localhost] |/eos/dev/2rep/subnode/> recycle config --add-bin /eos/dev/2rep/subnode/tree
#######################
What is the mean of " subtree of the namespace run"?

We add recycle bin under /eos/instance_name/grid/recyclebin and remove the test file i.e. sovan from eos. But it’s directly remove from eos. File are not go to recycle bin. So, unable to restore.


[root@eos-test ~]# eos -b mkdir /eos/vikaskolkata/grid/recyclebin
[root@eos-test ~]# eos -b recycle config --add-bin /eos/vikaskolkata/grid/recyclebin
[root@eos-test ~]# eos cp /data/sovan /eos/vikaskolkata/grid/
[eoscp] sovan Total 1600.00 MB |====================| 100.00 % [94.7 MB/s]
[eos-cp] copied 1/1 files and 1.68 GB in 18.13 seconds with 92.56 MB/s
[root@eos-test ~]# eos file info /eos/vikaskolkata/grid/sovan
File: ‘/eos/vikaskolkata/grid/sovan’ Flags: 0640
Size: 1677721600
Modify: Wed Jan 16 19:31:10 2019 Timestamp: 1547647270.272587000
Change: Wed Jan 16 19:30:52 2019 Timestamp: 1547647252.263552175
CUid: 0 CGid: 4 Fxid: 00000040 Fid: 64 Pid: 14 Pxid: 0000000e
XStype: adler XS: 11 46 7e 83 ETAGs: “17179869184:11467e83”
raid6 Stripes: 6 Blocksize: 1M LayoutId: 20640542
#Rep: 6
┌───┬──────┬────────────────────────────┬────────────────┬────────────────┬──────────┬──────────────┬────────────┬────────┬────────────────────────┐
│no.│ fs-id│ host│ schedgroup│ path│ boot│ configstatus│ drainstatus│ active│ geotag│
└───┴──────┴────────────────────────────┴────────────────┴────────────────┴──────────┴──────────────┴────────────┴────────┴────────────────────────┘
0 13 v1.internal.tier2-kol.res.in default.2 /vikas2 booted rw nodrain online geotagdefault
1 16 v4.internal.tier2-kol.res.in default.2 /vikas2 booted rw nodrain online geotagdefault
2 14 v2.internal.tier2-kol.res.in default.2 /vikas2 booted rw nodrain online geotagdefault
3 15 v3.internal.tier2-kol.res.in default.2 /vikas2 booted rw nodrain online geotagdefault
4 18 v6.internal.tier2-kol.res.in default.2 /vikas2 booted rw nodrain online geotagdefault
5 17 v5.internal.tier2-kol.res.in default.2 /vikas2 booted rw nodrain online geotagdefault


[root@eos-test ~]#
[root@eos-test ~]# eos -b recycle ls
[root@eos-test ~]# eos rm /eos/vikaskolkata/grid/sovan
[root@eos-test ~]# eos -b recycle ls
[root@eos-test ~]# eos -b recycle restore sovan
error: cannot find object referenced by recycle-key=sovan (errc=2) (No such file or directory)
[root@eos-test ~]#


So, how we correctly define the recycle bin in eos (eos version 4.4.10)?

Also, there is default recycle folder under the /eos/instance_name/proc/recycle. So, what is the function of these recycle bin? Is these recycle bin is usable and how it use?


[root@eos-test ~]# eos -b ls -la /eos/vikaskolkata/proc/
drwxr-xr-x 1 root root 0 Jan 8 18:41 .
drwxrwxr-+ 1 root root 0 Jan 14 18:50 …
drwxrwx— 1 daemon daemon 0 Jan 1 1970 archive
drwxrwx— 1 daemon daemon 0 Jan 1 1970 conversion
drwx------ 1 daemon root 0 Jan 1 1970 delegation
drwx------ 1 daemon root 0 Jan 1 1970 lock
-rw-r–r-- 0 root root 4096 Jan 4 10:22 master
-rw-r–r-- 0 root root 4096 Jan 4 10:22 quota
-rw-r–r-- 0 root root 4096 Jan 4 10:22 reconnect
drwx-----+ 1 root root 0 Jan 1 1970 recycle
-rw-r–r-- 0 root root 4096 Jan 4 10:22 who
-rw-r–r-- 0 root root 4096 Jan 4 10:22 whoami
drwx------ 1 daemon root 0 Jan 1 1970 workflow
[root@eos-test ~]#


Also, recycle config –size is not work.

Yes,
Elvin had removed ‘recycle config --size’ command … we have to fix the documentation or put it back.

You have to set the recycle quota by hand, then it should work:

eos quota -p /eos/vikaskolkata/proc/recycle -g 99 -i 10M -v 50T

e.g. allow up to 10M and 50T in the recycle bin.

You can set the retention policies 'recycle config --lifetime 86400 ’ and a ratio 'recycle config --ratio 0.8
e.g. keep a file for atleast 1 day in the recycle bin and let the bin fill up to 80%

I have created a bug in JIRA:

https://its.cern.ch/jira/browse/EOS-3203