Hi there,
I got a problem while updating my NextcloudVM (Hanssonit, running on Proxmox). The first steps are running smooth:
ncadmin@nextcloudvm:~$ sudo bash /var/scripts/update.sh
Posting notification to users that are admins, this might take a while...
Posting 'Update script started!' to: xxxxxxxxxxxxx
Fetching latest packages with apt...
[⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻⣾⣽⣻]
dpkg-query: no packages found matching veracrypt
Enabling maintenance:mode...
Maintenance mode enabled
dpkg-query: no packages found matching nextcloud-spreed-signaling
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Module mpm_prefork already disabled
Considering conflict mpm_worker for mpm_event:
Considering conflict mpm_prefork for mpm_event:
Module mpm_event already enabled
Restarting Apache2 and PHP-FPM...
Getting current PHP-version...
PHPVER=8.1
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
Trying to upgrade the Redis PECL extension...
Getting current PHP-version...
PHPVER=8.1
Nothing to upgrade
dpkg-query: no packages found matching php-acpu
Trying to upgrade igbinary, and smbclient...
Nothing to upgrade
Nothing to upgrade
Restarting Apache2 and PHP-FPM...
Getting current PHP-version...
PHPVER=8.1
Updating Adminer...
time="2024-04-09T20:54:19Z" level=info msg="Watchtower 1.7.1"
time="2024-04-09T20:54:19Z" level=info msg="Using no notifications"
time="2024-04-09T20:54:19Z" level=info msg="Only checking containers which name matches \"imaginary\""
time="2024-04-09T20:54:19Z" level=info msg="Running a one time update."
time="2024-04-09T20:54:19Z" level=info msg="Session done" Failed=0 Scanned=0 Updated=0 notify=no
time="2024-04-09T20:54:19Z" level=info msg="Waiting for the notification goroutine to finish" notify=no
Imaginary docker image just got updated!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-102-generic
Found initrd image: /boot/initrd.img-5.15.0-102-generic
Found linux image: /boot/vmlinuz-5.15.0-101-generic
Found initrd image: /boot/initrd.img-5.15.0-101-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Disabling maintenance:mode...
Maintenance mode disabled
Trying to automatically update all Nextcloud apps...
Your apps are already up to date!
Broadcast message from root@nextcloudvm on pts/1 (Tue 2024-04-09 22:54:32 CEST):
The system is going down for reboot at Tue 2024-04-09 22:55:32 CEST!
Reboot scheduled for Tue 2024-04-09 22:55:32 CEST, use 'shutdown -c' to cancel.
ncadmin@nextcloudvm:~$
Broadcast message from root@nextcloudvm on pts/1 (Tue 2024-04-09 22:55:32 CEST):
The system is going down for reboot NOW!
I get the following error:
So i looked up the path and indeed, there was no ‘.ocdata’:
www-data@nextcloudvm:/mnt/ncdata$ ls -A -lrt
total 52
-rw-rw-r-- 1 www-data www-data 0 Feb 21 23:45 index.html
-rw-r--r-- 1 www-data www-data 542 Feb 21 23:45 .htaccess
drwxr-xr-x 2 www-data www-data 3 Feb 21 23:45 files_external
drwxr-xr-x 7 www-data www-data 7 Feb 28 10:28 user1
drwxr-xr-x 6 www-data www-data 6 Mar 17 14:14 user2
drwxr-xr-x 13 www-data www-data 13 Mar 17 14:42 appdata_1111111111
drwxr-xr-x 6 www-data www-data 6 Mar 19 19:26 user3
drwxr-xr-x 2 www-data www-data 2 Mar 29 10:38 user4
-rwxr-xr-x 1 www-data www-data 0 Apr 9 21:18 .ocdata
As you can see, I created it, but that did not help. Would be to easy
I guess I know where the problem comes from. On the initial installation I did choose a “local” disk as the “data-disk”. Afterwards i decided to use an NFS mount from a NAS system. I attached it and the NFS share is working fine and Nextcloud does not seem to have issues with it:
ncadmin@nextcloudvm:/mnt$ ls -lrt
total 26
drwxr-xr-x 3 root root 4096 Feb 21 23:44 NCBACKUP-OLD
drwxr-xr-x 4 root root 4096 Feb 21 23:44 NCBACKUP
drwxrwx--- 8 www-data www-data 11 Mar 29 10:38 ncdata
drwxr-xr-x 2 root root 4096 Apr 9 22:52 old
ncadmin@nextcloudvm:/mnt$ cat /etc/fstab
/dev/disk/by-id/dm-uuid-LVM-xxxxxxxxxxxxyyyyyyyyyyyyyyxxxxxxxxxxxyyyyyyy / ext4 defaults 0 1
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/11111111-c8f7-4fad-9f71-f8df3164da2a /boot ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/11111-F56C /boot/efi vfat defaults 0 1
/swap.img none swap sw 0 0
192.168.100.32:/mnt/data-pool/nextcloud-data /mnt/ncdata nfs4 defaults 33 33
ncadmin@nextcloudvm:~$ sudo cat /var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxx',
'secret' => '111111111111111111111111111111111111111111',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '192.168.100.33',
2 => 'nextcloudvm',
3 => 'ext. ipv4',
4 => 'ext. ipv6',
),
'datadirectory' => '/mnt/ncdata',
'dbtype' => 'pgsql',
'version' => '28.0.2.5',
'overwrite.cli.url' => 'https://xxxxxxxxxxxx',
'dbname' => 'nextcloud_db',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud_db_user',
'dbpassword' => '2222222222222222222',
'installed' => true,
'instanceid' => 'xxxxxxxxxxxx',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => '0',
'dbindex' => '0',
'timeout' => '0.5',
'password' => '11111111111111111111',
),
'memcache.local' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => 'true',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'upgrade.disable-web' => true,
'log_type' => 'file',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'loglevel' => '2',
'log.condition' =>
...............
);
I still have the /dev/sdb1 disc and attached it again on the VM:
ncadmin@nextcloudvm:~$ blkid
/dev/sdb1: LABEL="ncdata" UUID="2492222222229556" UUID_SUB="99492222222225833" BLOCK_SIZE="4096" TYPE="zfs_member" PARTLABEL="zfs-a3e22222222229cb" PARTUUID="bb222222-6251-d74c-bcf0-fce14c954a8b"
/dev/mapper/ubuntu--vg-ubuntu--lv: UUID="f2222222-bb1e-4875-b0af-bdb4637543bd" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda2: UUID="f222222c8f7-4fad-9f71-f8df3164da2a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b2222222c79-4c62-af1c-d7b824dfcbed"
/dev/sda3: UUID="f2222222-kEa1-5VFR-VKXU-dBZF-5bku-7oaJJJ" TYPE="LVM2_member" PARTUUID="222222-b7a6-4ac4-8544-50560103004e"
/dev/sda1: UUID="2222-F56C" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="6922222-8285-40da-a72f-619e42c6e302"
My wild guess: it still has some left-over configuration which is not needed anymore, but the update-script fails because of that.
Anyone can help me out with this?
Worst case: create new instance, this time correctly form the start, migrate data.
If you need any additional information, just let me know!
Best regards,
Bernd
P.S.: I changed some names and uuid’s. Nevermind.