v CSA storge/archive空間使用100%
3079 ワード
ふとvs CSAタージュ/archive空間を100%使っていることに気づき、整理しておくことにしました.
find*-mtime+30-execm{}; //作成時間が30日以上のすべてのファイルを検索して削除します.
root@vcenter [ ~ ]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 916K 16G 1% /dev/shm
tmpfs 16G 684K 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda3 11G 6.4G 3.7G 64% /
tmpfs 16G 1.9M 16G 1% /tmp
/dev/mapper/imagebuilder_vg-imagebuilder 25G 44M 24G 1% /storage/imagebuilder
/dev/mapper/core_vg-core 99G 134M 94G 1% /storage/core
/dev/mapper/log_vg-log 25G 5.0G 19G 22% /storage/log
/dev/mapper/netdump_vg-netdump 9.8G 23M 9.2G 1% /storage/netdump
/dev/sda1 120M 34M 78M 31% /boot
/dev/mapper/autodeploy_vg-autodeploy 25G 44M 24G 1% /storage/autodeploy
/dev/mapper/updatemgr_vg-updatemgr 99G 1.5G 92G 2% /storage/updatemgr
/dev/mapper/dblog_vg-dblog 25G 2.4G 21G 11% /storage/dblog
/dev/mapper/db_vg-db 25G 1.7G 22G 7% /storage/db
/dev/mapper/archive_vg-archive 99G 94G 15M 100% /storage/archive
/dev/mapper/seat_vg-seat 1.4T 5.5G 1.3T 1% /storage/seat
クリーンコマンド:find*-mtime+30-execm{}; //作成時間が30日以上のすべてのファイルを検索して削除します.
root@vcenter [ /storage/archive/vpostgres ]# find * -mtime +30 -exec rm {} \;
root@vcenter [ /storage/archive/vpostgres ]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 916K 16G 1% /dev/shm
tmpfs 16G 684K 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda3 11G 6.4G 3.7G 64% /
tmpfs 16G 1.9M 16G 1% /tmp
/dev/mapper/imagebuilder_vg-imagebuilder 25G 44M 24G 1% /storage/imagebuilder
/dev/mapper/core_vg-core 99G 134M 94G 1% /storage/core
/dev/mapper/log_vg-log 25G 5.0G 19G 22% /storage/log
/dev/mapper/netdump_vg-netdump 9.8G 23M 9.2G 1% /storage/netdump
/dev/sda1 120M 34M 78M 31% /boot
/dev/mapper/autodeploy_vg-autodeploy 25G 44M 24G 1% /storage/autodeploy
/dev/mapper/updatemgr_vg-updatemgr 99G 1.5G 92G 2% /storage/updatemgr
/dev/mapper/dblog_vg-dblog 25G 2.4G 21G 11% /storage/dblog
/dev/mapper/db_vg-db 25G 1.7G 22G 7% /storage/db
/dev/mapper/archive_vg-archive 99G 60G 34G 64% /storage/archive
/dev/mapper/seat_vg-seat 1.4T 5.5G 1.3T 1% /storage/seat