mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-09-22 14:47:30 +00:00
fix: improve host diagnostics, storage handling, and maintenance workflows
- add zero-downtime Proxmox TLS certificate refresh from the Security panel (#307) - classify storage availability independently from missing capacity information (#309) - update ZFS ARC sizing and safely reconcile conflicting module configurations - preserve and restore migrated ZFS settings without overwriting later administrator changes - stop memory optimization from forcing the kernel overcommit policy - correlate multi-line OOM events and identify the affected LXC, cgroup limits, swap and killed process - add selectable Bash prompt path styles and clearer shell activation guidance - protect technical names during automatic translation and correct localized terminology - update the Coral and VM/LXC Apps and Updates documentation, translations and screenshots
This commit is contained in:
@@ -908,6 +908,11 @@ uninstall_pigz() {
|
||||
}
|
||||
|
||||
uninstall_zfs_arc() {
|
||||
local backup_dir="$BASE_DIR/backups/zfs_arc"
|
||||
local manifest="$backup_dir/manifest.tsv"
|
||||
local remaining_manifest=""
|
||||
local original backup post_hash current_hash
|
||||
|
||||
msg_info2 "$(translate 'Reverting ZFS ARC tuning...')"
|
||||
if [[ -f /etc/modprobe.d/99-zfsarc.conf.bak ]]; then
|
||||
mv -f /etc/modprobe.d/99-zfsarc.conf.bak /etc/modprobe.d/99-zfsarc.conf
|
||||
@@ -916,6 +921,43 @@ uninstall_zfs_arc() {
|
||||
rm -f /etc/modprobe.d/99-zfsarc.conf
|
||||
msg_ok "$(translate 'ZFS ARC config removed (kernel defaults will apply on reboot)')"
|
||||
fi
|
||||
|
||||
if [[ -s "$manifest" ]]; then
|
||||
remaining_manifest=$(mktemp "${manifest}.XXXXXX") || remaining_manifest=""
|
||||
while IFS=$'\t' read -r original backup post_hash; do
|
||||
[[ -n "$original" && -n "$backup" ]] || continue
|
||||
|
||||
current_hash=""
|
||||
if [[ -f "$original" ]]; then
|
||||
current_hash=$(sha256sum "$original" 2>/dev/null | awk '{print $1}')
|
||||
fi
|
||||
|
||||
if [[ ! -e "$original" || "$current_hash" == "$post_hash" ]]; then
|
||||
if [[ -f "$backup" ]] && cp -p "$backup" "$original"; then
|
||||
rm -f "$backup"
|
||||
msg_ok "$(translate 'External ZFS ARC settings restored:') $original"
|
||||
elif [[ -n "$remaining_manifest" ]]; then
|
||||
printf '%s\t%s\t%s\n' "$original" "$backup" "$post_hash" >> "$remaining_manifest"
|
||||
fi
|
||||
else
|
||||
msg_warn "$(translate 'External ZFS configuration changed after the ProxMenux migration; current file and backup preserved:') $original"
|
||||
if [[ -n "$remaining_manifest" ]]; then
|
||||
printf '%s\t%s\t%s\n' "$original" "$backup" "$post_hash" >> "$remaining_manifest"
|
||||
fi
|
||||
fi
|
||||
done < "$manifest"
|
||||
|
||||
if [[ -n "$remaining_manifest" ]]; then
|
||||
if [[ -s "$remaining_manifest" ]]; then
|
||||
mv -f "$remaining_manifest" "$manifest"
|
||||
else
|
||||
rm -f "$remaining_manifest" "$manifest"
|
||||
fi
|
||||
fi
|
||||
rmdir "$backup_dir" 2>/dev/null || true
|
||||
rmdir "$BASE_DIR/backups" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
update-initramfs -u -k all >/dev/null 2>&1 || true
|
||||
if command -v proxmox-boot-tool >/dev/null 2>&1; then
|
||||
proxmox-boot-tool refresh >/dev/null 2>&1 || true
|
||||
|
||||
Reference in New Issue
Block a user