Topic
  • 5 replies
  • Latest Post - ‏2013-12-05T19:36:16Z by dlmcnabb
wettstein
wettstein
8 Posts

Pinned topic threshold policy deletion with snapshots

‏2013-12-03T17:05:23Z |

Hi,

I'm wondering how a gpfs threshold deletion works if a snapshot of the file system has been created. For example, say I have a policy deletion defined that has 80% high and 70% low thresholds and I want to select candidate files that are older than 90 days. The current usage of the file system is 85%. If I take a snapshot of the file system and then run the policy deletion will the 70% threshold ever be met since the snapshot is in place? Or will all files over 90 days be deleted since the snapshot has been taken and the usage will not actually go down? If all files will be deleted older than 90 days, is there an alternate way to perform this type of operation?

Thanks

Andy

 

  • dlmcnabb
    dlmcnabb
    1012 Posts

    Re: threshold policy deletion with snapshots

    ‏2013-12-03T19:29:33Z  

    If you have a snapshot, then deleting files will not recover any space. It just moves the blocks of the deleted files to the snapshot and the space usage will remain the same.

    The only way to regain space is to delete the oldest snapshot.

  • wettstein
    wettstein
    8 Posts

    Re: threshold policy deletion with snapshots

    ‏2013-12-05T18:35:39Z  

    Is there any alternate way of doing this? I can't create a policy that just says delete 10TB worth of candidate files ?

  • dlmcnabb
    dlmcnabb
    1012 Posts

    Re: threshold policy deletion with snapshots

    ‏2013-12-05T18:56:08Z  
    • wettstein
    • ‏2013-12-05T18:35:39Z

    Is there any alternate way of doing this? I can't create a policy that just says delete 10TB worth of candidate files ?

    As I said, if you have snapshots, deleting files will not regain space. mmapplypolicy cannot be used. You have to delete the oldest snapshot in order to regain space.

  • wettstein
    wettstein
    8 Posts

    Re: threshold policy deletion with snapshots

    ‏2013-12-05T19:09:22Z  
    • dlmcnabb
    • ‏2013-12-05T18:56:08Z

    As I said, if you have snapshots, deleting files will not regain space. mmapplypolicy cannot be used. You have to delete the oldest snapshot in order to regain space.

    Yes, I understand that the space will not be reclaimed until the snapshot is deleted. I'm going to run a policy based deletion regardless, and I want to know if there is a way to limit the amount of files deleted in some way with a snapshot in place. The use case I have is for an automated scratch purge in which I do the following: take a snapshot of the scratch file system, purge selected files, let users know which files were purged, tell users how to access the snapshot and copy files back in case some files were purged that should not have been, delete the snapshot after some period of time to actually free the space.

    I know how much space I want to have free after the snapshot is deleted. I would prefer to delete the minimum amount of files necessary for this. If it isn't possible, I'll just delete all the candidate files.

  • dlmcnabb
    dlmcnabb
    1012 Posts

    Re: threshold policy deletion with snapshots

    ‏2013-12-05T19:36:16Z  
    • wettstein
    • ‏2013-12-05T19:09:22Z

    Yes, I understand that the space will not be reclaimed until the snapshot is deleted. I'm going to run a policy based deletion regardless, and I want to know if there is a way to limit the amount of files deleted in some way with a snapshot in place. The use case I have is for an automated scratch purge in which I do the following: take a snapshot of the scratch file system, purge selected files, let users know which files were purged, tell users how to access the snapshot and copy files back in case some files were purged that should not have been, delete the snapshot after some period of time to actually free the space.

    I know how much space I want to have free after the snapshot is deleted. I would prefer to delete the minimum amount of files necessary for this. If it isn't possible, I'll just delete all the candidate files.

    If policy gives you a candidate list, then just keep track of how big the files are that you are deleting, and stop when you have deleted enough.