[Nextcloudpi] Only 647.6 MB available despite using nc-automount

Nextcloud version : 12.0.2
Operating system and version : Raspian 9
Apache or nginx version : Apache 2.4.25
PHP version : 7.0
Is this the first time you’ve seen this error?: Yes

The issue you are facing:
I’ve used nc-automount to mount a 4TB hdd but when I log I each of the 3 users only have 647 MB available. Have I done something wrong?

waiting for @nachoparker to join in here…

but as a first read/hint --> [Solved] Nextcloudpi - Format HDD 3Tb - could that be a part of the problem as well?

To add some info the hdd was formatted to Ext4 on my laptop (Ubuntu).

have you put stuff there?

output of

df -h

I haven’t flung too much at it just a couple of test photos and a pdf.

pi@raspberrypi:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 2.7G 1.9G 631M 76% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 13M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p1 42M 21M 21M 51% /boot
tmpfs 93M 0 93M 0% /run/user/1000
/dev/sda 3.6T 68M 3.4T 1% /media/b2db1d72-06d7-4d4e-a159-f87f9a199506

/dev/sda is mounted. Have you also used nc-datadir to move the datadir to the HDD?

output of ls -l /media

I’m sure I did

pi@raspberrypi:~ $ ls -l /media
total 8
drwx------ 3 pi pi 4096 Sep 22 21:15 b2db1d72-06d7-4d4e-a159-f87f9a199506
drwxr-xr-x 3 root root 4096 Sep 22 21:28 USBdrive

Have you updated from an old image? because /media/USBdrive should be a link. If you don’t have stuff that you don’t want to lose, I suggest you clean up that directory and reboot.

First, run nc-init from the TUI or ncp-web to start from a clean NC configuration.

Then,

sudo mv /media/USBdrive /media/USBdrive.moved
sudo reboot

After reboot, /media/USBdrive should be a link

ls -l /media

Then, you can do nc-datadir to move the datadir and all the rest.

Followed and rebooted. Is this looking right?

pi@raspberrypi:~ $ ls -l /media
total 8
drwx------ 3 pi pi 4096 Sep 22 21:15 b2db1d72-06d7-4d4e-a159-f87f9a199506
drwxr-xr-x 3 root root 4096 Sep 22 21:28 USBdrive.moved

no, there’s no link. Can you try again after activating nc-automount again?

also, after that, what’s the output of

systemctl status nc-automount
systemctl status nc-automount-links

Done

$ systemctl status nc-automount
● nc-automount.service - Automount USB drives
Loaded: loaded (/usr/lib/systemd/system/nc-automount.service; enabled; vendor preset: enabled Active: active (running) since Mon 2017-09-25 11:09:12 BST; 50min ago
Main PID: 350 (udiskie)
CGroup: /system.slice/nc-automount.service
└─350 /usr/bin/python3 /usr/bin/udiskie -NTF

Sep 25 11:09:12 raspberrypi systemd[1]: Started Automount USB drives.
Sep 25 11:09:20 raspberrypi udiskie[350]: mounted /org/freedesktop/UDisks2/block_devices/sda on lines 1-9/9 (END)

● nc-automount-links.service - Monitor /media for mountpoints and create USBdrive* symlinks
Loaded: loaded (/usr/lib/systemd/system/nc-automount-links.service; enabled; vendor preset: e Active: active (running) since Mon 2017-09-25 11:09:13 BST; 52min ago
Main PID: 389 (nc-automount-li)
CGroup: /system.slice/nc-automount-links.service
├─389 /bin/bash /usr/local/etc/nc-automount-links-mon
├─417 inotifywait --monitor --event create --event delete --format %f %e /media/
├─418 grep --line-buffered ISDIR
└─419 /bin/bash /usr/local/etc/nc-automount-links-mon

Sep 25 11:09:13 raspberrypi systemd[1]: Started Monitor /media for mountpoints and create USBdriSep 25 11:09:13 raspberrypi nc-automount-links-mon[389]: Setting up watches.
Sep 25 11:09:13 raspberrypi nc-automount-links-mon[389]: Watches established.
Sep 25 11:09:18 raspberrypi nc-automount-links-mon[389]: b2db1d72-06d7-4d4e-a159-f87f9a199506 DESep 25 11:09:19 raspberrypi nc-automount-links-mon[389]: b2db1d72-06d7-4d4e-a159-f87f9a199506 CR~

Something happened to the last lines, it’s not complete. You might want to go full screen before running the command

Let’s try that again then

pi@raspberrypi:~ $ systemctl status nc-automount
● nc-automount.service - Automount USB drives
Loaded: loaded (/usr/lib/systemd/system/nc-automount.service; enabled; vendor preset: enabled Active: active (running) since Mon 2017-09-25 11:09:12 BST; 1h 4min ago
Main PID: 350 (udiskie)
CGroup: /system.slice/nc-automount.service
└─350 /usr/bin/python3 /usr/bin/udiskie -NTF

Sep 25 11:09:12 raspberrypi systemd[1]: Started Automount USB drives.
Sep 25 11:09:20 raspberrypi udiskie[350]: mounted /org/freedesktop/UDisks2/block_devices/sda on lines 1-9/9 (END)…skipping…
● nc-automount.service - Automount USB drives
Loaded: loaded (/usr/lib/systemd/system/nc-automount.service; enabled; vendor preset: enabled Active: active (running) since Mon 2017-09-25 11:09:12 BST; 1h 4min ago
Main PID: 350 (udiskie)
CGroup: /system.slice/nc-automount.service
└─350 /usr/bin/python3 /usr/bin/udiskie -NTF

Sep 25 11:09:12 raspberrypi systemd[1]: Started Automount USB drives.
Sep 25 11:09:20 raspberrypi udiskie[350]: mounted /org/freedesktop/UDisks2/block_devices/sda on ~
~
~
~
~
~
~
~
~
~
● nc-automount.service - Automount USB drives
Loaded: loaded (/usr/lib/systemd/system/nc-automount.service; enabled; vendor preset: enabled Active: active (running) since Mon 2017-09-25 11:09:12 BST; 1h 4min ago
Main PID: 350 (udiskie)
CGroup: /system.slice/nc-automount.service
└─350 /usr/bin/python3 /usr/bin/udiskie -NTF

Sep 25 11:09:12 raspberrypi systemd[1]: Started Automount USB drives.
Sep 25 11:09:20 raspberrypi udiskie[350]: mounted /org/freedesktop/UDisks2/block_devices/sda on ~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-9/9 (END)

pi@raspberrypi:~ $ systemctl status nc-automount-links
● nc-automount-links.service - Monitor /media for mountpoints and create USBdrive* symlinks
Loaded: loaded (/usr/lib/systemd/system/nc-automount-links.service; enabled; vendor preset: e Active: active (running) since Mon 2017-09-25 11:09:13 BST; 1h 1min ago
Main PID: 389 (nc-automount-li)
CGroup: /system.slice/nc-automount-links.service
├─389 /bin/bash /usr/local/etc/nc-automount-links-mon
├─417 inotifywait --monitor --event create --event delete --format %f %e /media/
├─418 grep --line-buffered ISDIR
└─419 /bin/bash /usr/local/etc/nc-automount-links-mon

Sep 25 11:09:13 raspberrypi systemd[1]: Started Monitor /media for mountpoints and create USBdriSep 25 11:09:13 raspberrypi nc-automount-links-mon[389]: Setting up watches.
Sep 25 11:09:13 raspberrypi nc-automount-links-mon[389]: Watches established.
Sep 25 11:09:18 raspberrypi nc-automount-links-mon[389]: b2db1d72-06d7-4d4e-a159-f87f9a199506 DESep 25 11:09:19 raspberrypi nc-automount-links-mon[389]: b2db1d72-06d7-4d4e-a159-f87f9a199506 CRlines 1-15/15 (END)…skipping…
● nc-automount-links.service - Monitor /media for mountpoints and create USBdrive* symlinks
Loaded: loaded (/usr/lib/systemd/system/nc-automount-links.service; enabled; vendor preset: e Active: active (running) since Mon 2017-09-25 11:09:13 BST; 1h 1min ago
Main PID: 389 (nc-automount-li)
CGroup: /system.slice/nc-automount-links.service
├─389 /bin/bash /usr/local/etc/nc-automount-links-mon
● nc-automount-links.service - Monitor /media for mountpoints and create USBdrive* symlinks
Loaded: loaded (/usr/lib/systemd/system/nc-automount-links.service; enabled; vendor preset: e Active: active (running) since Mon 2017-09-25 11:09:13 BST; 1h 1min ago
Main PID: 389 (nc-automount-li)
CGroup: /system.slice/nc-automount-links.service ├─389 /bin/bash /usr/local/etc/nc-automount-links-mon
├─417 inotifywait --monitor --event create --event delete --format %f %e /media/
├─418 grep --line-buffered ISDIR └─419 /bin/bash /usr/local/etc/nc-automount-links-mon
Sep 25 11:09:13 raspberrypi systemd[1]: Started Monitor /media for mountpoints and create USBdriSep 25 11:09:13 raspberrypi nc-automount-links-mon[389]: Setting up watches.
Sep 25 11:09:13 raspberrypi nc-automount-links-mon[389]: Watches established.
Sep 25 11:09:18 raspberrypi nc-automount-links-mon[389]: b2db1d72-06d7-4d4e-a159-f87f9a199506 DESep 25 11:09:19 raspberrypi nc-automount-links-mon[389]: b2db1d72-06d7-4d4e-a159-f87f9a199506 CR~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-15/15 (END)

still nothing. Let’s try to see if the link is created

sudo /usr/local/etc/nc-automount-links
ls -l /media

I really appreciate your time and help here!

pi@raspberrypi:~ $ ls -l /media
total 8
drwx------ 3 pi pi 4096 Sep 22 21:15 b2db1d72-06d7-4d4e-a159-f87f9a199506
lrwxrwxrwx 1 root root 43 Sep 25 12:20 USBdrive → /media/b2db1d72-06d7-4d4e-a159-f87f9a199506drwxr-xr-x 3 root root 4096 Sep 22 21:28 USBdrive.moved

no problem,

ok that worked… I wonder why it doesn’t work when you reboot :S

if you reboot now, does the link in /media/USBdrive persist?

edit: two things that I have noticed is that the drive doesn’t have a label, and that it is not ‘properly’ formatted, because there is no partition table ( everything is under /dev/sda, and there is no /dev/sda1). That shouldn’t affect but I am curious to see if that has an influence.

A reboot has removed the link!
I did original format on the pi with nc-format-USB but that was only giving me 2TB to use.

yes, that has been reported recently. We are fixing it.

Still it shouldn’t fail. I wish we could see the output.

Try this, after reboot

systemctl status nc-automount-links > /tmp/templog.txt
cat /tmp/templog.txt

pi@raspberrypi:~ $ systemctl status nc-automount-links > /tmp/templog.txt
pi@raspberrypi:~ $ cat /tmp/templog.txt
● nc-automount-links.service - Monitor /media for mountpoints and create USBdrive* symlinks
Loaded: loaded (/usr/lib/systemd/system/nc-automount-links.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2017-09-25 13:32:23 BST; 36s ago
Main PID: 349 (nc-automount-li)
CGroup: /system.slice/nc-automount-links.service
├─349 /bin/bash /usr/local/etc/nc-automount-links-mon
├─374 inotifywait --monitor --event create --event delete --format %f %e /media/
├─375 grep --line-buffered ISDIR
└─376 /bin/bash /usr/local/etc/nc-automount-links-mon

Sep 25 13:32:23 raspberrypi systemd[1]: Started Monitor /media for mountpoints and create USBdrive* symlinks.
Sep 25 13:32:23 raspberrypi nc-automount-links-mon[349]: Setting up watches.
Sep 25 13:32:23 raspberrypi nc-automount-links-mon[349]: Watches established.
Sep 25 13:32:29 raspberrypi nc-automount-links-mon[349]: b2db1d72-06d7-4d4e-a159-f87f9a199506 DELETE,ISDIR
Sep 25 13:32:30 raspberrypi nc-automount-links-mon[349]: b2db1d72-06d7-4d4e-a159-f87f9a199506 CREATE,ISDIR
pi@raspberrypi:~ $

nothing weird, let me retest if there should be a DELETE before CREATE