Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Storage (Local) #855

Closed
nightmare1942 opened this issue Jan 16, 2019 · 9 comments
Closed

External Storage (Local) #855

nightmare1942 opened this issue Jan 16, 2019 · 9 comments
Labels

Comments

@nightmare1942
Copy link

Hi,
I do have a similar problem with NC14.0.5 as described in here.
I mounted an SMB share via fstab to /media/storage.
Afterwards I tried to use the external storage (local) extension to mound a folder under this mountpoint.
It worked for a long time but now it has the following error:

stat(): stat failed for /media/storage/pictures/ at /snap/nextcloud/10791/htdocs/lib/private/Files/Storage/Local.php#142

I also connected the removable-media plug as described here

But I still only see the red dot and the media is not working.

Any clues?

@r4co0n
Copy link
Contributor

r4co0n commented Jan 18, 2019

Hi,
you didn't state whether your mount point is available outside of the snap now and whether it still contains pictures. You can test for this running

ls /media/storage
ls /media/storage/pictures

The error message you posted states that the pictures folder was not available to the snap.

@nightmare1942
Copy link
Author

Hi,
yes they are available:

ll /media/storage/ insgesamt 36918308 dr-xr-xr-x. 2 root root 0 28. Dez 10:41 Bilder dr-xr-xr-x. 2 root root 0 16. Nov 10:57 Dokumente dr-xr-xr-x. 2 root root 0 5. Jan 00:10 Downloads

ll /media/storage/Bilder/ insgesamt 4 drwxr-xr-x. 2 root root 0 2. Mär 2018 2001 drwxr-xr-x. 2 root root 0 17. Jun 2017 2002 drwxr-xr-x. 2 root root 0 17. Jun 2017 2003 drwxr-xr-x. 2 root root 0 26. Nov 2017 2004
As you see, it's availabe, that's why it's so weired to me!
(just for clarification: The pictures folder is called Bilder in German! ;) )

@kyrofa
Copy link
Member

kyrofa commented Jan 19, 2019

Can you run this command and let me know it's output, please?

$ sudo snap run --shell nextcloud.occ <<EOF
ls -l /media/
EOF

@nightmare1942
Copy link
Author

Hi,
the output is:

total 0 drwxr-xr-x. 2 root root 40 Jan 13 18:34 . drwxr-xr-x. 24 root root 321 Dec 14 11:54 ..

@kyrofa
Copy link
Member

kyrofa commented Jan 19, 2019

That indicates that the snap is firing up before the mount is put in place. You might consider doing the mount in systemd instead.

@nightmare1942
Copy link
Author

Sry, I'm not sure what'd you mean.

$ systemctl status media-storage.mount ● media-storage.mount - /media/storage Loaded: loaded (/etc/fstab; bad; vendor preset: disabled) Active: active (mounted) since So 2019-01-13 18:34:56 CET; 5 days ago Where: /media/storage What: //server/storage Docs: man:fstab(5) man:systemd-fstab-generator(8) Process: 5551 ExecMount=/bin/mount //server/storage /media/storage -t cifs -o defaults,credentials=/root/.smbcredentials (code=exited, status=0/SUCCESS) Tasks: 0
That's what systemd says

@nightmare1942
Copy link
Author

nightmare1942 commented Feb 1, 2019

Okay, i did the mount in systemd:

/lib/systemd/system/media-storage.mount

`[Unit]
DefaultDependencies=yes

[Mount]
What=//Server/Storage
Where=/media/storage
Type=cifs
Options=defaults,credentials=/folder/.credentials
DirectoryMode=0755
TimeoutSec=0

[Install]
WantedBy=remote-fs.target`

But still not working.

Edit:
I also updated to 15.0.2!
The output of the command further up is this time:
total 0

@kyrofa
Copy link
Member

kyrofa commented Mar 15, 2019

@topf82 that's unrelated, please log another issue and I'll share some suggestions.

@github-actions
Copy link

This issue is stale because it has been without activity for 60 days. It will be closed after 7 more days of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants