{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::mybucket/toto3/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::mybucket",
"Condition": {
"StringLike": {
"s3:prefix": [
"",
"toto3/",
"toto3*"
]
}
}
}
]
}
https://stackoverflow.com/questions/35944349/iam-aws-s3-to-restrict-to-a-specific-sub-folder
compress
compresscmd xz
compressoptions -9
---------------
compress manually:
--verbose show progress
To reduce system load:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652600
#!/bin/sh
#set -x
required_free_percentage=93
percent_free=`df -h | grep /dev/mapper/data-graphite | awk '{print $5}' | sed 's/%//'`
echo ${percent_free}
i=365
while [ ${percent_free} -gt ${required_free_percentage} ]
do
#echo ${i}
find /var/lib/carbon/whisper/ -type f -mtime +${i} | xargs -n1 -r rm
percent_free=`df -h | grep /dev/mapper/data-graphite | awk '{print $5}' | sed 's/%//'`
#echo ${percent_free}
i=$(( $i -1 ))
done
$ cat lvm-playbook.yml
---
- hosts: all
become: yes
tasks:
- name: Create Volume Group
lvg:
vg: "{{ vg_name }}"
pvs: "{{ pvs }}"
- name: Create Logical Volume
lvol:
vg: "{{ vg_name }}"
lv: "{{ lv_name }}"
size: "{{ lv_size }}"
- name: Creafe File System
filesystem:
fstype: ext4
dev: "/dev/{{ vg_name }}/{{ lv_name }}"
- name: Mount Logical volume FS
mount:
name: "/{{ mount_name }}"
src: "/dev/{{ vg_name }}/{{ lv_name }}"
fstype: ext4
state: mounted
$ cat inventory.ini
127.0.0.1:22222 ansible_user=gigauser pvs=/dev/sdb vg_name=vgname1 lv_name=lv_name1 lv_size=50M mount_name=vgmount
$ ansible-playbook -i inventory.ini lvm-playbook.yml --ask-become-pass