Evicting data or objects by using the manual updates mode of the AFM to cloud object storage
The replication of the AFM to cloud object storage file system by using manual updates mode does not support automatic eviction, instead data or objects can be evicted by using mmafmcosctl evict command.
Procedure
-
List the file systems.
ls -lash /gpfs/fs3 total 81M 256K drwxr-xr-x 4 root root 256K May 19 10:44 . 4.0K drwxrwxrwx 6 root root 4.0K May 19 03:29 .. 512 drwx------ 2 root root 4.0K May 19 03:35 .afm 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file1 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file10 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file2 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file3 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file4 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file5 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file6 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file7 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file8 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file9 512 drwx------ 65535 root root 4.0K May 19 03:35 .ptrash 512 dr-xr-xr-x 2 root root 8.0K Dec 31 1969 .snapshots - Upload all files to the bucket on the cloud object storage.
mmafmcosctl fs3 root /gpfs/fs3/ upload --all Queued Failed TotalData (approx in Bytes) 10 0 83588400 Object Upload successfully queued at the gateway. - Create an evict file to evict these files.
cat > /evictfile /gpfs/fs3/file1 /gpfs/fs3/file2 /gpfs/fs3/file3 /gpfs/fs3/file4 /gpfs/fs3/file5 - Check how many files are evicted.
cat > /evictfile /gpfs/fs3/file1 /gpfs/fs3/file2 /gpfs/fs3/file3 /gpfs/fs3/file4 /gpfs/fs3/file5 - Check contents of the file system.
ls -lash /gpfs/fs3 total 41M 256K drwxr-xr-x 4 root root 256K May 19 10:44 . 4.0K drwxrwxrwx 6 root root 4.0K May 19 03:29 .. 0 -rwxr-xr-x 1 root root 8.0M May 19 10:44 file1 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file10 0 -rwxr-xr-x 1 root root 8.0M May 19 10:44 file2 0 -rwxr-xr-x 1 root root 8.0M May 19 10:44 file3 0 -rwxr-xr-x 1 root root 8.0M May 19 10:44 file4 0 -rwxr-xr-x 1 root root 8.0M May 19 10:44 file5 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file6 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file7 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file8 8.0M -rwxr-xr-x 1 root root 8.0M May 19 10:44 file9Here, the file1 through file5 files are evicted.