GlusterFS - Is there an easy way to count the number of files on a brick?

186 views Asked by At

I would like to count the number of files on a GlusterFS volume ending in .res. Is there a command to do this. Nothing I have found on the net is what I need. Cheers

1

There are 1 answers

0
quoc9x On

First, you can use command gluster volume info volume-id to get path of brick

enter image description here

Then, use command ls -lR path_brick/*.res | wc -l
Example in my case:

ls -lR /var/lib/heketi/mounts/vg_53ec29d2b03384b7f8cd5c2a609bd0f7/brick_49e5acc25f5a31438e2726b9b03feaed/brick/*res | wc -l