Closed Morgendorfferr closed 2 years ago
can you run snap install nextcloud
and post the full output?
Sure:
root@syncloud:~# snap install nextcloud error: cannot perform the following tasks:
- Run install hook of "nextcloud" snap if present (run hook "install": <exceeded maximum runtime of 10m0s>) root@syncloud:~#
ok, can you as a test, deactivate your external disk and then install nextcloud?
It worked. Can I activate the external drive?
you can try, I think the problem is that you have too many files on your storage and it takes more than 10 minutes to fix permissions, can you run this:
time find /data/nextcloud -maxdepth 3 | wc -l
I activated external disk in settings, it shows up there now. The result of the time command is:
root@syncloud:~# time find /data/nextcloud -maxdepth 3 | wc -l 98
real 0m0.739s user 0m0.000s sys 0m0.061s
The result of file scan:
root@syncloud:~# snap run nextcloud.occ files:scan --all Starting scan for user 1 out of 1 () Home storage for user not writable Make sure you're running the scan command only as the user the web server runs as +---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 0 | 0 | 00:00:00 | +---------+-------+--------------+
do you see your files in /data/nextcloud/[user]/files ?
did you activate the device under the same user as last time?
mount | grep external
Yes, I see the files in Terminal and in Files Browser. I changed nothing, I can access nextcloud with my old user credentials. But there I don’t see the files.
root@syncloud:~# mount | grep external /dev/sdb1 on /opt/disk/external type ext4 (rw,relatime,data=ordered)
I just ran the filescan again (after accessing nextcloud). Result:
root@syncloud:~# snap run nextcloud.occ files:scan --all Starting scan for user 1 out of 1 (***) +---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 6 | 28 | 00:00:01 | +---------+-------+--------------+
But these are only the sample files.
ls -la /data
root@syncloud:~# ls -la /data lrwxrwxrwx 1 root root 18 Feb 4 13:25 /data -> /opt/disk/external
Nothing inside /data/nextcloud
?
Maybe with different user?
Can you deactivate it and explore on your PC?
Are you saying all files are gone?
No, they are all there:
root@syncloud:/data/nextcloud/***# ls -la total 28 drwxrwxrwx 7 nextcloud nextcloud 4096 Nov 6 10:39 . drwxrwxrwx 6 nextcloud nextcloud 4096 Nov 1 17:09 .. drwxrwxrwx 2 nextcloud nextcloud 4096 Jun 25 2021 cache drwxrwxrwx 15 nextcloud nextcloud 4096 Dec 2 19:26 files drwxr-xr-x 5 nextcloud nextcloud 4096 Nov 6 10:39 files_trashbin drwxrwxrwx 7 nextcloud nextcloud 4096 Nov 11 19:46 files_versions drwxrwxrwx 2 nextcloud nextcloud 4096 Jan 30 18:52 uploads
Nextcloud obviously uses the internal disk, although the external is shown as activated:
root@syncloud:/opt/disk/internal/nextcloud/***# ls -la total 16 drwxr-xr-x 4 nextcloud nextcloud 4096 Feb 4 13:44 . drwxrwx--- 6 nextcloud nextcloud 4096 Feb 4 13:42 .. drwxr-xr-x 2 nextcloud nextcloud 4096 Feb 4 13:44 cache drwxr-xr-x 5 nextcloud nextcloud 4096 Feb 4 13:44 files
ok, can you fix permissions:
chown -R nextcloud. /data/nextcloud
and then scan again:
snap run nextcloud.occ files:scan --all
check nextcloud data dir:
snap run nextcloud.occ config:system:get datadirectory
still internal:
root@syncloud:~# chown -R nextcloud. /data/nextcloud root@syncloud:~# snap run nextcloud.occ files:scan --all Starting scan for user 1 out of 1 (***) +---------+-------+--------------+ | Folders | Files | Elapsed time | +---------+-------+--------------+ | 6 | 28 | 00:00:01 | +---------+-------+--------------+ root@syncloud:~# snap run nextcloud.occ config:system:get datadirectory /opt/disk/internal/nextcloud
Nextcloud should actually react to disk activation (I will test that) For now can you remove/install nextcloud to see if that causes it to start using external disk?
Install does not work. Same as before:
root@syncloud:~# snap install nextcloud error: cannot perform the following tasks:
- Run install hook of "nextcloud" snap if present (run hook "install": <exceeded maximum runtime of 10m0s>)
Ok, something is wrong with disk I guess
do you have a separate disk to test?
Yes, it worked with an old USB stick.
root@syncloud:~# snap run nextcloud.occ config:system:get datadirectory /opt/disk/external/nextcloud
So I guess, the fault is on my hardwares side.
But when I check the disk with diskutil it seems to be oK. But I can’t mount it with a Mac. Do you have any idea if and how it is possible to rescue data?
if you can actually see files when you activate it with Syncloud, you can try one thing:
If you cannot read then you probably need one of these tools (PhotoRec I used successfully in past in the similar situation) https://www.tecmint.com/photorec-recover-deleted-lost-files-in-linux/
Many thanks for that. Syncthing is really great, but does not see the files inside directories of the external disk (a scan shows only the directories, no files). What works - but takes some time - is copying the files to the internal disk with command line and using Syncthing from there. Once I am done with that I will replicate my old external drive and try to sync it with syncthing to a new activated external drive.
One question related to that process: Do I need to format the external drive with the device or will it also work with a disk already formatted as ExFAT?
No, you need a linux filesystem which supports permissions, like ext4.
Ok, it works. The only remaining issue is that I can not install Pihole:
root@syncloud:/# snap install pihole error: cannot perform the following tasks:
Run install hook of "pihole" snap if present (run hook "install":
2022/02/10 17:01:40 open /snap/pihole/210320405/config/platform.cfg: no such file or directory Traceback (most recent call last): File "/snap/pihole/210320405/meta/hooks/install", line 6, in
installer.Installer().install() File "/snap/pihole/210320405/hooks/installer.py", line 56, in install self.install_config() File "/snap/pihole/210320405/hooks/installer.py", line 48, in install_config 'ipv4': check_output(['/snap/platform/current/bin/cli', 'ipv4']) File "/snap/pihole/current/python/lib/python2.7/subprocess.py", line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['/snap/platform/current/bin/cli', 'ipv4']' returned non-zero exit status 1 -----)
But I guess that is a new issue, and this one is closed.
Many thanks for your help, I really learned a lot in the process about the device I am using every day.
Hello, I have a problem similar to the closed issue #609. But my issue is not solved, the problem is persistent.
The output after
snap refresh nextcloud
looks like this after some time (10min?):Running
journalctl -n 100 --no-pager
produces this:Can you help?