Swooty
August 17, 2020, 11:39am
1
Nextcloud version: 18.0.3
NextCloudPi version: v1.28.3
NextCloudPi image: NextCloudPi_03-28-20
Distribution: Raspbian GNU/Linux 10
The issue you are facing:
I moved my datadir to an external USB drive and also the backup drive is a USB in the same size.
Now when i check the main panel from my NextCloudPi it shows the right datadir but it tells that the disk usage is 23G of 29G. Why does it not show the 64GB space from my USB drive?
datadir /media/NextCloudPiData
data in SD yes
data filesystem ext2/ext3
data disk usage 23G/29G
rootfs usage 23G/29G
Thanks,
Chris
What’s the output of the df -h
command (via ssh or direct access)
Swooty
August 17, 2020, 11:55am
3
Or does the datadir nothing have to do with the system itself and its shown like that for all NextCloudPi users? So that its normal to show round about 22 to 23 GB for system and nextcloud itself but it does not show the datadir and backupdir space?
This is the return but i wonder as /media/NextCloudPiBackup1 is not in use.
root@nextcloudpi:/# df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root 29G 23G 5,3G 81% /
devtmpfs 3,8G 0 3,8G 0% /dev
tmpfs 3,9G 0 3,9G 0% /dev/shm
tmpfs 3,9G 8,5M 3,9G 1% /run
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 55M 198M 22% /boot
/dev/sdb1 59G 3,8M 57G 1% /media/NextCloudPiBackup1
tmpfs 788M 0 788M 0% /run/user/1000
The datadir is /media/NextCloudPiData
The backup dir is /media/NextCloudPiBackup
Both hold the right data when i check them. So i dont even know where the NextCloudPiBackup1 comes from.
drwxr-xr-x 5 root root 4096 Aug 16 15:56 .
drwxr-xr-x 21 root root 4096 Aug 14 20:58 ..
drwxr-xr-x 2 root root 4096 Aug 16 03:00 NextCloudPiBackup
drwxr-xr-x 1 root root 0 Aug 15 12:41 NextCloudPiBackup1
drwxr-x--- 15 www-data www-data 4096 Aug 17 13:49 NextCloudPiData
lrwxrwxrwx 1 root root 24 Aug 16 15:56 USBdrive -> /media/NextCloudPiBackup
lrwxrwxrwx 1 root root 25 Aug 16 15:56 USBdrive1 -> /media/NextCloudPiBackup1
lrwxrwxrwx 1 root root 22 Aug 16 15:56 USBdrive2 -> /media/NextCloudPiData
Well, there’s nothing mounted to /media/NextCloudPiData - so the data still resides on the SD card
Swooty
August 17, 2020, 12:10pm
5
No way! I cleared the /var/www/nextcloud/data dir and the files are still there…
So /media/NextCloudPiData is also shown on the overview?
I think NextcloudPi does read and display in any wrong way maybe? The both USB sticks are connected and accessable as you can see.
Your files are in /media/NextCloudPiData - but that’s just a directory on the SD card at the moment. I’d advise you to
Move your files back to /var/www/nextcloud/data via the ncp web panel
Delete the /media/NextcloudPiData directory (rm -r /media/NextCloudPiData
)
Make sure, your disk/partition is labeled /media/NextcloudPiData and is being recognized by ncp (shown in the web panel)
Move your data to /media/NextCloudPiData again
I can see only one disk that’s connected and it’s mounted to /media/NextCloudPiBackup1
Swooty
August 17, 2020, 12:13pm
8
Uff okay and same for the backup dir? I really hope i not break it when i try. What point i need to use to move the data?
Best would be to use the option in the web panel
Swooty
August 17, 2020, 12:15pm
10
Yes i am in the web panel but what point i can use to move the data?
I think it’s nc-data-dir or nc-data
Swooty
August 17, 2020, 12:18pm
12
Changed to english now is see it lets try, i report back soon
Swooty
August 17, 2020, 1:13pm
13
This looks better
root@nextcloudpi:/media# df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root 29G 12G 17G 42% /
devtmpfs 3,8G 0 3,8G 0% /dev
tmpfs 3,9G 0 3,9G 0% /dev/shm
tmpfs 3,9G 8,5M 3,9G 1% /run
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 55M 198M 22% /boot
tmpfs 788M 0 788M 0% /run/user/1000
/dev/sda1 116G 3,8M 114G 1% /media/NextCloudPiData
/dev/sdb1 116G 3,8M 114G 1% /media/NextCloudPiBackup
now i try to move the data again.
Swooty
August 17, 2020, 1:22pm
14
I get this error but the USB is fresh formated and mounted with NextCloudPi
[ nc-datadir ] (Mon Aug 17 15:20:21 CEST 2020)
INFO: /media/NextCloudPiData is not empty. Creating backup /media/NextCloudPiData-08-17-20
mv: cannot move '/media/NextCloudPiData' to '/media/NextCloudPiData-08-17-20': Device or resource busy
Maintenance mode enabled
moving data directory from /var/www/nextcloud/data to /media/NextCloudPiData...
mkdir: cannot create directory '/media/NextCloudPiData': File exists
rmdir: failed to remove '/media/NextCloudPiData': Device or resource busy
BTRFS filesystem detected
ERROR: target path already exists: /media/NextCloudPiData
bit its empty
root@nextcloudpi:/media# ls -la /media/NextCloudPiData
insgesamt 20
drwxr-xr-x 1 root root 0 Aug 17 15:05 .
drwxr-xr-x 4 root root 4096 Aug 17 15:26 ..
root@nextcloudpi:/media#
Swooty
August 17, 2020, 1:33pm
15
Oh looks like i have to select a sub folder and not the main stick alias
lets see how long this takes:
[ nc-datadir ] (Mon Aug 17 15:32:45 CEST 2020)
Nextcloud is in maintenance mode - no apps have been loaded
Maintenance mode already enabled
moving data directory from /var/www/nextcloud/data to /media/NextCloudPiData/data...
BTRFS filesystem detected
Create subvolume '/media/NextCloudPiData/data'
Swooty
August 17, 2020, 1:56pm
16
Ok it worked Thank you very much! I hope this helps someone else also.
1 Like