Build Version:
- rpm -qa | grep nooba
*nooba*a-core-5.19.0-20250519.el9.x86_64
- mms3 account create may20acc1 --uid 1000 --gid 1000 --newBucketsPath /mnt/gpfs0/may20acc1
Account may20acc1 created successfully
- mms3 bucket create may20buc1 --accountName may20acc1 --filesystemPath /mnt/gpfs0/may20acc1/may20buc1
Bucket may20buc1 created successfully
- s3may20ac1 s3 ls
2025-05-20 08:49:31 may20buc1
- s3may20ac1 s3 ls s3://may20buc1
- s3may20ac1 s3 cp anaconda-ks.cfg s3://may20buc1
upload: ./anaconda-ks.cfg to s3://may20buc1/anaconda-ks.cfg
- s3may20ac1 s3 ls s3://may20buc1
2025-05-20 08:54:12 5447 anaconda-ks.cfg
#s3may20ac1 s3api put-bucket-lifecycle-configuration --bucket may20buc1 --lifecycle-configuration file://expirtationRules1.json
- s3may20ac1 s3api put-bucket-lifecycle-configuration --bucket may20buc1 --lifecycle-configuration file://expirtationRules1.json
- s3may20ac1 s3api get-bucket-lifecycle-configuration --bucket may20buc1
{
"Rules": [
{
"Expiration":
{ "Days": 4 },
"ID": "expire-data",
"Filter":
{ "Prefix": "data" },
"Status": "Enabled"
},
{
"Expiration":
{ "Days": 2 },
"ID": "expire-logs",
"Filter":
{ "Prefix": "logs/" },
"Status": "Enabled"
}
]
}
- s3may20ac1 s3api put-bucket-lifecycle-configuration --bucket may20buc1 --lifecycle-configuration file://expirtationRules1.json
- s3may20ac1 s3api get-bucket-lifecycle-configuration --bucket may20buc1
{
"Rules": [
{
"Expiration":
{ "Days": 4 },
"ID": "expire-data",
"Filter":
{ "Prefix": "data/" },
"Status": "Enabled"
},
{
"Expiration":
{ "Days": 2 },
"ID": "expire-logs",
"Filter":
{ "Prefix": "logs/" },
"Status": "Enabled"
}
]
}
- cd /mnt/gpfs0/may20acc1/may20buc1/
- cd data/
# for i in {1..10}; do touch -d "10 days ago" file$i.txt; done
- ls -lrt
total 0
rw-rr-. 1 root root 0 May 10 08:58 file1.txt
rw-rr-. 1 root root 0 May 10 08:58 file2.txt
rw-rr-. 1 root root 0 May 10 08:58 file3.txt
rw-rr-. 1 root root 0 May 10 08:58 file4.txt
rw-rr-. 1 root root 0 May 10 08:58 file5.txt
rw-rr-. 1 root root 0 May 10 08:58 file6.txt
rw-rr-. 1 root root 0 May 10 08:58 file7.txt
rw-rr-. 1 root root 0 May 10 08:58 file8.txt
rw-rr-. 1 root root 0 May 10 08:58 file9.txt
rw-rr-. 1 root root 0 May 10 08:58 file10.txt
- cd logs
# for i in {1..10}; do touch -d "10 days ago" file$i.txt; done
- ls -lrt
total 0
rw-rr-. 1 root root 0 May 10 08:58 file1.txt
rw-rr-. 1 root root 0 May 10 08:58 file2.txt
rw-rr-. 1 root root 0 May 10 08:58 file3.txt
rw-rr-. 1 root root 0 May 10 08:58 file4.txt
rw-rr-. 1 root root 0 May 10 08:58 file5.txt
rw-rr-. 1 root root 0 May 10 08:58 file6.txt
rw-rr-. 1 root root 0 May 10 08:58 file7.txt
rw-rr-. 1 root root 0 May 10 08:58 file8.txt
rw-rr-. 1 root root 0 May 10 08:58 file9.txt
rw-rr-. 1 root root 0 May 10 08:58 file10.txt
- s3may20ac1 s3 ls s3://may20buc1/data/
2025-05-10 08:58:21 0 file1.txt
2025-05-10 08:58:21 0 file10.txt
2025-05-10 08:58:21 0 file2.txt
2025-05-10 08:58:21 0 file3.txt
2025-05-10 08:58:21 0 file4.txt
2025-05-10 08:58:21 0 file5.txt
2025-05-10 08:58:21 0 file6.txt
2025-05-10 08:58:21 0 file7.txt
2025-05-10 08:58:21 0 file8.txt
2025-05-10 08:58:21 0 file9.txt
- s3may20ac1 s3 ls s3://may20buc1/logs/
2025-05-10 08:58:34 0 file1.txt
2025-05-10 08:58:34 0 file10.txt
2025-05-10 08:58:34 0 file2.txt
2025-05-10 08:58:34 0 file3.txt
2025-05-10 08:58:34 0 file4.txt
2025-05-10 08:58:34 0 file5.txt
2025-05-10 08:58:34 0 file6.txt
2025-05-10 08:58:34 0 file7.txt
2025-05-10 08:58:34 0 file8.txt
2025-05-10 08:58:34 0 file9.txt
Actual output:
{
"Rules": [
{
"Expiration":
{ "Days": 4 },
"ID": "expire-data",
"Filter":
{ "Prefix": "data/" },
"Status": "Enabled"
},
{
"Expiration":
{ "Days": 2 },
"ID": "expire-logs",
"Filter":
{ "Prefix": "logs/" },
"Status": "Enabled"
}
]
}
Expected Output:
{
"Rules": [
{
"Expiration":
{ "Days": 4 },
"ID": "expire-data",
"Filter":
{ "Prefix": "data" },
"Status": "Enabled"
},
{
"Expiration":
{ "Days": 2 },
"ID": "expire-logs",
"Filter":
{ "Prefix": "logs/" },
"Status": "Enabled"
}
]
}