Starting with version 0.2.6 (released on August 28, 2024), OpenPanel began utilizing fstab
to handle the automatic mounting of storage files during server reboots.
For users created prior to version 0.2.6, their entries are not included in the /etc/fstab
file. As a result, their home files will not be accessible in their containers after a reboot.
Resolution
For a Few Users:
Manually add an entry in the fstab
file for each user. Replace stefan with the actual username in the following command:
echo "/home/storage_file_stefan /home/stefan ext4 loop 0 0" | tee -a /etc/fstab
For Many Users:
Continue using the deprecated opencli files-remount
script to remount files after reboot. Run this command to automate this process:
grep -Fxq '@reboot root /usr/local/bin/opencli files-remount && echo "$(date) Storage files mounted on reboot" >> /var/log/openpanel/admin/cron.log' /etc/cron.d/openpanel || echo '@reboot root /usr/local/bin/opencli files-remount && echo "$(date) Storage files mounted on reboot" >> /var/log/openpanel/admin/cron.log' >> /etc/cron.d/openpanel
This will ensure storage files are mounted automatically on reboot, maintaining compatibility for older users.