Alles klar — dann brauchst du jetzt das gleiche Vorgehen für die produktive Maschine, aber sauber als Runbook mit Checks, Wartungsfenster, Umzug und Rollback.
Wichtig: Auf deiner Produktivumgebung kann die „große Platte“ entweder wie bei deinem Test als /home (LVM) vorhanden sein oder als eigenes Device. Darum ist Schritt 1 immer: korrektes Ziel identifizieren (nicht blind /dev/sdb1).
/ auf große Partition verschieben (AlmaLinux)bashdf -h
lsblk -f
getenforce
du -sh /var/www/vhosts 2>/dev/null
Entscheidung:
Wenn du eine große Partition bereits gemountet hast, z. B. /home mit ~2TB frei → wir nutzen /home/vhosts als Ziel.
Wenn du eine separate Platte hast, wird sie in lsblk -f sichtbar und muss zuerst gemountet werden.
/homebashsystemctl stop nginx
systemctl stop httpd
bashmkdir -p /home/vhosts
bashrsync -aHAX --numeric-ids --info=progress2 /var/www/vhosts/ /home/vhosts/
bashmv /var/www/vhosts /var/www/vhosts.old
mkdir -p /var/www/vhosts
mount --bind /home/vhosts /var/www/vhosts
/etc/fstabbashgrep -q "^/home/vhosts /var/www/vhosts" /etc/fstab || \
echo "/home/vhosts /var/www/vhosts none bind 0 0" >> /etc/fstab
mount -a
bashrestorecon -Rv /var/www/vhosts
restorecon -Rv /var/www/vhosts/system
bashplesk repair fs -y
plesk repair web -y
systemctl start httpd
systemctl start nginx
bashdf -h /var/www/vhosts
mount | grep /var/www/vhosts
/)bashrm -rf /var/www/vhosts.old
Device finden:
bashlsblk -f
Mountpoint:
bashmkdir -p /mnt/storage
Mount (Device anpassen, z. B. /dev/sdb1 oder /dev/vdb1):
bashmount /dev/DEIN_DEVICE /mnt/storage
df -h /mnt/storage
Persistenz via UUID:
bashblkid
/etc/fstab ergänzen (Beispiel):
textUUID=xxxx /mnt/storage xfs defaults,noatime 0 0
Dann folgt der gleiche Ablauf wie oben, nur Ziel ist /mnt/storage/vhosts statt /home/vhosts.
bashsystemctl stop nginx
systemctl stop httpd
umount /var/www/vhosts
rm -rf /var/www/vhosts
mv /var/www/vhosts.old /var/www/vhosts
# fstab bind-zeile entfernen (manuell) und:
mount -a
systemctl start httpd
systemctl start nginx
In der Produktivumgebung: zeigt lsblk -f die große Partition als /home (wie im Test) oder als extra Device (z. B. /dev/sdb1)?
Wie groß ist du -sh /var/www/vhosts auf Prod?
Wenn du mir die Ausgaben von lsblk -f und df -h von Prod reinkopierst, schreibe ich dir die finale Befehlsliste exakt passend (ohne „falls/variante“).
rm -rf /var/lib/psa/dumps/*
rm -rf /var/lib/psa/dumps/.[!.]* /var/lib/psa/dumps/..?* 2>/dev/null