Disk usage and nextcloud data

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): replace me
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing:
I have my nextcloud data on /dev/sbd2 (External USB Drive), but the disk usage grows at /dev/sda5 whenever I add files to nextcloud.

Before uploading a 2 gb file:

df -h /dev/sda5 /dev/sdb2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        49G   36G   11G  79% /
/dev/sdb2       7.3T  524G  6.8T   8% /media/go4nat/Seagate BPD 6TB

after uploading:

df -h /dev/sda5 /dev/sdb2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        49G   38G  8.9G  81% /
/dev/sdb2       7.3T  524G  6.8T   8% /media/go4nat/Seagate BPD 6TB

I have the config files as

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  'datadirectory' => '/media/usb/nextcloud-data',
  'default_language' => 'en',
  'default_locale' => 'en_US',
  'default_phone_region' => 'US',
  'dbtype' => 'mysql',

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Hi @go4nat

that indeed seems a bit odd since given the config you posted it should indeed end up on /media/usb/nextcloud-data. Could you maybe check that this folder is indeed mounted to /dev/sdb2? Because that’s the part I cannot see in the output you’ve posted - there I only see that /dev/sdb2 seems to point to /media/go4nat/Seagate BPD 6TB.

Cheers
/S

@simonspa, Thanks for the help.

Command 1

go4nat@Ubuntu-VBox:/media/usb$ findmnt -T .
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda5 ext4 rw,relatime,errors=remount-ro
go4nat@Ubuntu-VBox:/media/usb$

Command 2

go4nat@Ubuntu-VBox:/media/usb$ df -h /mnt
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 49G 38G 8.9G 81% /
go4nat@Ubuntu-VBox:/media/usb$ ls
nextcloud-data

Looks like it’s been mounted on /dev/sda5 which is virtual disk. Please confirm. Also, how do I mount it to /dev/sdb2 from /dev/sda5?

Thanks in advance

Nat

Not sure, if I am right, Below command shows /media/go4nat is on External hard drive, /dev/sdb2.

go4nat@Ubuntu-VBox:/media/usb$ findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda5 ext4 rw,relatime,errors=remo
├─/sys sysfs sysfs rw,nosuid,nodev,noexec,
│ ├─/sys/kernel/security securityfs securit rw,nosuid,nodev,noexec,
│ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/unified cgroup2 cgroup2 rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/rdma cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup cgroup rw,nosuid,nodev,noexec,
│ │ ├─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,
│ │ └─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,
│ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,
│ ├─/sys/fs/bpf none bpf rw,nosuid,nodev,noexec,
│ ├─/sys/kernel/debug debugfs debugfs rw,nosuid,nodev,noexec,
│ ├─/sys/kernel/tracing tracefs tracefs rw,nosuid,nodev,noexec,
│ ├─/sys/fs/fuse/connections fusectl fusectl rw,nosuid,nodev,noexec,
│ └─/sys/kernel/config configfs configf rw,nosuid,nodev,noexec,
├─/proc proc proc rw,nosuid,nodev,noexec,
│ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=28,pgrp=
├─/dev udev devtmpf rw,nosuid,noexec,relati
│ ├─/dev/pts devpts devpts rw,nosuid,noexec,relati
│ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev,inode64
│ ├─/dev/hugepages hugetlbfs hugetlb rw,relatime,pagesize=2M
│ └─/dev/mqueue mqueue mqueue rw,nosuid,nodev,noexec,
├─/run tmpfs tmpfs rw,nosuid,nodev,noexec,
│ ├─/run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,
│ └─/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatim
│ └─/run/user/1000/gvfs gvfsd-fuse fuse.gv rw,nosuid,nodev,relatim
├─/snap/core18/2074 /dev/loop0 squashf ro,nodev,relatime
├─/snap/core18/2128 /dev/loop1 squashf ro,nodev,relatime
├─/snap/gnome-3-34-1804/66 /dev/loop3 squashf ro,nodev,relatime
├─/snap/gnome-3-34-1804/72 /dev/loop2 squashf ro,nodev,relatime
├─/snap/gtk-common-themes/1515 /dev/loop4 squashf ro,nodev,relatime
├─/snap/snap-store/547 /dev/loop5 squashf ro,nodev,relatime
├─/snap/snapd/12883 /dev/loop6 squashf ro,nodev,relatime
├─/snap/snapd/12704 /dev/loop7 squashf ro,nodev,relatime
├─/snap/snap-store/518 /dev/loop8 squashf ro,nodev,relatime
├─/snap/gtk-common-themes/1514 /dev/loop9 squashf ro,nodev,relatime
├─/boot/efi /dev/sda1 vfat rw,relatime,fmask=0077,
├─/media/go4nat/Seagate BPD 6TB /dev/sdb2 fuseblk rw,nosuid,nodev,relatim
└─/media/go4nat/VBox_GAs_6.1.26 /dev/sr0 iso9660 ro,nosuid,nodev,relatim

Not exactly. The command says that /media/go4nat/Seagate BPD 6TB is on the said harddrive. But if you place things in /media/go4nat they will still reside on the disk your file system root is located on.

/S