Re: gfs_tools reclaim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ananda Bhattacharya wrote:

Hi I was wondering what the differences between gfs_tool reclaim and gfs_tool shrink?

And secondly is there a need for these commands to be run?

-Anand

Hi Anand,

This is how I think it works (and as always, I could be wrong):

gfs_tool reclaim takes GFS metadata on disk that is no longer being used, and converts it back to free space. That's normally not an issue because those unused metadata blocks will usually be reused anyway. For example: create files A then file B. When you delete file A, you have an unused metadata block for A's inode, which has been deleted. If you allocate more space to file B, it normally won't reuse A's deleted inode because it's "freed metadata" rather than "free space." However, if your file system is out of "free space", I think a reclaim automatically happens and it will reuse that space anyway. Now let's say that you create file C. GFS can now reuse the freed metadata (inode) formally used for A, to keep the new metadata (inode) for C. So in either case, the deleted metadata blocks will be reused when GFS sees fit, and therefore, you shouldn't need to run this command
  unless you have special needs.

Incidentally, GFS2 no longer has the distinction between "free space" and "free metadata space", so free space is free space regardless of whether it was previously
  used for metadata or user data.

gfs_tool shrink throws out unused gfs locks from memory (cache). Ordinarily, gfs manages its own glocks according to the tuning parameters. So there's really no need to do this unless you have a special problem regarding the caching of gfs locks.

Regards,

Bob Peterson
Red Hat Cluster Suite

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux