Expand Disk/partition?

Hi, at the end, I had to format the SDD I have atached to my Raspberry…
So, I formated it, writed a new image with 64 bit and begined again…
All seems to work welll… no need any SD, the Raspberry booted directcly with the 500 Gb SDD…

But the problem is that I cant not “expand” my Disk. I have no option in “Settings/Internal Memory”:

This is my SDD now:
root@syncloud:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 2.9G 2.1G 668M 76% /
devtmpfs 763M 0 763M 0% /dev
tmpfs 925M 0 925M 0% /dev/shm
tmpfs 925M 17M 908M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 925M 0 925M 0% /sys/fs/cgroup
/dev/loop0 165M 165M 0 100% /snap/platform/1481
/dev/loop2 168M 168M 0 100% /snap/platform/1746
/dev/loop1 169M 169M 0 100% /snap/users/244
/dev/loop3 93M 93M 0 100% /snap/files/158

How can I expand my disk?
Is there any command for that?

Thaks in advance

Can you try this command:

/snap/platform/current/bin/boot_extend.sh

Yeah!!! It works:

root@syncloud:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 470G 2.1G 448G 1% /
devtmpfs 763M 0 763M 0% /dev
tmpfs 925M 0 925M 0% /dev/shm
tmpfs 925M 17M 908M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 925M 0 925M 0% /sys/fs/cgroup
/dev/loop0 165M 165M 0 100% /snap/platform/1481
/dev/loop2 168M 168M 0 100% /snap/platform/1746
/dev/loop1 169M 169M 0 100% /snap/users/244
/dev/loop3 93M 93M 0 100% /snap/files/158

Created an issue for UI: boot extend button is not visible · Issue #666 · syncloud/platform · GitHub

More problems:
Before I realized that I had a problem of lack of space, I uninstalled Nextcloud…

Now I try to install it, but there is no way.
From the command list, I try to do it directly with these commands:

wget apps.syncloud.org/apps/nextcloud_621_$(dpkg --print-architecture).snap

snap install nextcloud_621_$(dpkg --print-architecture).snap --devmode

But the result is this:
root@syncloud:~# snap install nextcloud_621_$(dpkg --print-architecture).snap --devmode
error: cannot perform the following tasks:

  • Run configure hook of “nextcloud” snap if present (run hook “configure”:

2022-12-18 09:36:14,745 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c “ALTER USER nextcloud WITH PASSWORD ‘nextcloud’;”
2022-12-18 09:36:15,214 - database - INFO - ALTER ROLE
2022-12-18 09:36:24,748 - nextcloud_occ - ERROR - occ error: Username is invalid because files already exist for this user
Traceback (most recent call last):
File “/snap/nextcloud/x1/meta/hooks/configure”, line 7, in
Installer().configure()
File “/snap/nextcloud/x1/hooks/installer.py”, line 107, in configure
self.initialize()
File “/snap/nextcloud/x1/hooks/installer.py”, line 195, in initialize
self.occ.run(‘maintenance:install --database pgsql --database-host {0}:{1}’
File “/snap/nextcloud/x1/hooks/octools.py”, line 19, in run
raise e
File “/snap/nextcloud/x1/hooks/octools.py”, line 13, in run
output = check_output(‘{0} {1}’.format(self.occ_runner_path, args), shell=True).decode().strip()
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘/snap/nextcloud/current/bin/occ-runner maintenance:install --database pgsql --database-host /var/snap/nextcloud/current/database:5436 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user installer --admin-pass 8edb51e15b044dbab4f3a8bf117fbd56 --data-dir /opt/disk/internal/nextcloud’ returned non-zero exit status 1.
-----)

I tried to delete users with users app… and I made an “activation” again…
But no way…

Trying with 631, but the same:

root@syncloud:~# snap install nextcloud_631_$(dpkg --print-architecture).snap --devmode
error: cannot perform the following tasks:

  • Run configure hook of “nextcloud” snap if present (run hook “configure”:

2022-12-18 10:34:16,246 - database - INFO - postgres executing: snap run nextcloud.psql -U nextcloud -d postgres -c “ALTER USER nextcloud WITH PASSWORD ‘nextcloud’;”
2022-12-18 10:34:16,700 - database - INFO - ALTER ROLE
2022-12-18 10:34:26,636 - nextcloud_occ - ERROR - occ error: Username is invalid because files already exist for this user
Traceback (most recent call last):
File “/snap/nextcloud/631/meta/hooks/configure”, line 7, in
Installer().configure()
File “/snap/nextcloud/631/hooks/installer.py”, line 107, in configure
self.initialize()
File “/snap/nextcloud/631/hooks/installer.py”, line 195, in initialize
self.occ.run(‘maintenance:install --database pgsql --database-host {0}:{1}’
File “/snap/nextcloud/631/hooks/octools.py”, line 19, in run
raise e
File “/snap/nextcloud/631/hooks/octools.py”, line 13, in run
output = check_output(‘{0} {1}’.format(self.occ_runner_path, args), shell=True).decode().strip()
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/subprocess.py”, line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘/snap/nextcloud/current/bin/occ-runner maintenance:install --database pgsql --database-host /var/snap/nextcloud/current/database:5436 --database-name nextcloud --database-user nextcloud --database-pass nextcloud --admin-user installer --admin-pass 1a4e057cdbd64577a4acfc5591fb32e6 --data-dir /opt/disk/internal/nextcloud’ returned non-zero exit status 1.
-----)

Can you show contents of /data/nextcloud?

ls -la /data/nextcloud

One more thing can you try installing latest (just to check):

snap install nextcloud

Sorry, I had no more time, so I Formated again all before your answers…

This time I extended the boot with the command and all worked.
Thanks