Code: Select all
df -h /your/dir
Code: Select all
int64 FileSystem::FreeDiskSize(const char* path)
{
//snip
struct statvfs diskdata;
if (!statvfs(path, &diskdata))
{
return (int64)diskdata.f_frsize * (int64)diskdata.f_bavail;
}
//snip
return -1;
Hey! Sorry for the late reply. Here is the whole filesystemsanderj wrote: ↑29 Apr 2020, 05:462's complement problem? -2146640073 + 2^32 is ... 2147483648. Coincidence?
What doesreport about that diskspace?Code: Select all
df -h /your/dir
AFAIK the relevant code in nzbget is this:
So what is statvfs() reporting? Or is the return -1 kicking in?Code: Select all
int64 FileSystem::FreeDiskSize(const char* path) { //snip struct statvfs diskdata; if (!statvfs(path, &diskdata)) { return (int64)diskdata.f_frsize * (int64)diskdata.f_bavail; } //snip return -1;
Can you compile a c program?
Code: Select all
Filesystem Size Used Avail Use% Mounted on
overlay 908G 11G 851G 2% /
tmpfs 64M 0 64M 0% /dev
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/mapper/vg0-root 908G 11G 851G 2% /mnt
google-tv: 1.0P 0 1.0P 0% /mnt/remote-tv
google-movies: 1.0P 0 1.0P 0% /mnt/remote-movies
union 2.1P 11G 2.1P 1% /mnt/unionfs
shm 64M 0 64M 0% /dev/shm
tmpfs 32G 0 32G 0% /proc/acpi
tmpfs 32G 0 32G 0% /proc/scsi
tmpfs 32G 0 32G 0% /sys/firmware
Code: Select all
Filesystem Size Used Avail Use% Mounted on
union 2.1P 11G 2.1P 1% /mnt/unionfs
They are rclone mounts. Each mount is registered as 1pb, so when 2 are merged it becomes 2pb. Can I change the code somehow to work with the 2.1pb?sanderj wrote: ↑30 Apr 2020, 08:32So, df -h tells you /mnt/unionfs has free ... 2.1PB. That is 2100 TB.
<insert sound of one million dollars dr evil>
2.1PB is 2,1e+9 MB = 2.100.000.000 MB which is indeed around the 2^32 + -2.146.640.073 which I suggested.
But back to your 2.1PB: do you really have 2100 TB diskspace? So 400 disks of 5 TB each ... ?
If not, the problem is in your filesystem / OS, not nzbget
First things first: find any method to find the real available space ... Preferrably via statvfs()
Code: Select all
rclone mount google-drive:LinuxDocs /home/sander/myGoogleDrive_LinuxDocs
Code: Select all
google-drive:LinuxDocs 101G 7,3G 46G 14% /home/sander/myGoogleDrive_LinuxDocs
$ df -h myGoogleDrive_LinuxDocs/
Filesystem Size Used Avail Use% Mounted on
google-drive:LinuxDocs 101G 7,3G 46G 14% /home/sander/myGoogleDrive_LinuxDocs
How large is you gdrive?sanderj wrote: ↑30 Apr 2020, 19:56Out of curiosity, I tried out rclone. It works, but after a mount like this
(which works; I can copy to that directory)Code: Select all
rclone mount google-drive:LinuxDocs /home/sander/myGoogleDrive_LinuxDocs
a `df -h` still show the space of my local disk, and not 1PB or so
So ... how did you mount to get the 1PB or 2PBCode: Select all
google-drive:LinuxDocs 101G 7,3G 46G 14% /home/sander/myGoogleDrive_LinuxDocs $ df -h myGoogleDrive_LinuxDocs/ Filesystem Size Used Avail Use% Mounted on google-drive:LinuxDocs 101G 7,3G 46G 14% /home/sander/myGoogleDrive_LinuxDocs
Users browsing this forum: No registered users and 54 guests