Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/front-web/build/assets/styles/80lvmthinpool-monitor.tar
Назад
module-setup.sh 0000755 00000001105 15107651561 0007532 0 ustar 00 #!/usr/bin/bash # called by dracut check() { # No point trying to support lvm if the binaries are missing require_binaries lvm sort tr awk || return 1 return 255 } # called by dracut depends() { echo lvm return 0 } # called by dracut install() { inst_multiple sort tr awk inst_script "$moddir/start-thinpool-monitor.sh" "/bin/start-thinpool-monitor" inst "$moddir/start-thinpool-monitor.service" "$systemdsystemunitdir/start-thinpool-monitor.service" $SYSTEMCTL -q --root "$initdir" add-wants initrd.target start-thinpool-monitor.service } start-thinpool-monitor.service 0000644 00000000506 15107651561 0012612 0 ustar 00 [Unit] Description=Lvm thinpool monitor service Before=initrd.target After=initrd-fs.target Conflicts=shutdown.target emergency.target [Service] Type=forking ExecStart=/bin/start-thinpool-monitor PIDFile=/run/thinpool-moni.pid StandardInput=null StandardOutput=journal+console StandardError=journal+console KillSignal=SIGHUP start-thinpool-monitor.sh 0000755 00000002731 15107651561 0011571 0 ustar 00 #!/usr/bin/sh type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh LVS=$(getargs rd.lvm.lv -d rd_LVM_LV=) is_lvm2_thinp_device() { _device_path=$1 _lvm2_thin_device=$(lvm lvs -S 'lv_layout=sparse && lv_layout=thin' \ --nosuffix --noheadings -o vg_name,lv_name "$_device_path" 2> /dev/null) [ -n "$_lvm2_thin_device" ] && return $? } for LV in $LVS; do if is_lvm2_thinp_device "/dev/$LV"; then THIN_POOLS="$(lvm lvs -S 'lv_layout=sparse && lv_layout=thin' \ --nosuffix --noheadings -o vg_name,pool_lv "$LV" \ | awk '{printf("%s/%s",$1,$2);}') $THIN_POOLS" fi done THIN_POOLS=$(echo "$THIN_POOLS" | tr ' ' '\n' | sort -u | tr '\n' ' ') if [ -n "$THIN_POOLS" ]; then if [ -e "/etc/lvm/lvm.conf" ]; then # Use 'monitoring=0' to override the value in lvm.conf, in case # dmeventd monitoring been started after the calling. CONFIG="activation {monitoring=0}" else CONFIG="activation {monitoring=0 thin_pool_autoextend_threshold=70 thin_pool_autoextend_percent=20}" fi # Activate the thinpool in case the thinpool is in inactive state. # Otherwise lvextend will fail. for THIN_POOL in $THIN_POOLS; do lvm lvchange -ay "$THIN_POOL" --config "$CONFIG" done while true; do for THIN_POOL in $THIN_POOLS; do lvm lvextend --use-policies --config "$CONFIG" "$THIN_POOL" done sleep 5 done & echo $! > /run/thinpool-moni.pid fi
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка