NZBGet Shows -2146640073.00mb Disk Space

Get help, report and discuss bugs.
kiityman
Posts: 7
Joined: 18 Mar 2020, 07:10

NZBGet Shows -2146640073.00mb Disk Space

Post by kiityman » 28 Apr 2020, 23:57

Hi. I just setup a new install of nzbget and now am getting this issue. It has happened before on the same system. I am running the latest testing image from LinuxServer.

The thing which I think could cause this is the fast that I have nzbget pointed at a mergerfs mount. (Combining local (rw) and remote (ro))

I would appreciate the help. Attached is a picture of the issue. The only reason I care about this is because the min disk space doesn't work so it downloads until 0% disk space and everything breaks. Thanks!

https://i.imgur.com/xsrRrV1.jpg

sanderj
Posts: 164
Joined: 10 Feb 2014, 21:46

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by sanderj » 29 Apr 2020, 05:46

2's complement problem? -2146640073 + 2^32 is ... 2147483648. Coincidence?

What does

Code: Select all

df -h /your/dir
report about that diskspace?

AFAIK the relevant code in nzbget is this:

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;
So what is statvfs() reporting? Or is the return -1 kicking in?
Can you compile a c program?

kiityman
Posts: 7
Joined: 18 Mar 2020, 07:10

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by kiityman » 30 Apr 2020, 07:49

sanderj wrote:
29 Apr 2020, 05:46
2's complement problem? -2146640073 + 2^32 is ... 2147483648. Coincidence?

What does

Code: Select all

df -h /your/dir
report about that diskspace?

AFAIK the relevant code in nzbget is this:

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;
So what is statvfs() reporting? Or is the return -1 kicking in?
Can you compile a c program?
Hey! Sorry for the late reply. Here is the whole filesystem

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
Here is just the download directory

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
union         2.1P   11G  2.1P   1% /mnt/unionfs

sanderj
Posts: 164
Joined: 10 Feb 2014, 21:46

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by sanderj » 30 Apr 2020, 08:32

So, 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

kiityman
Posts: 7
Joined: 18 Mar 2020, 07:10

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by kiityman » 30 Apr 2020, 08:39

sanderj wrote:
30 Apr 2020, 08:32
So, 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
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
Posts: 164
Joined: 10 Feb 2014, 21:46

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by sanderj » 30 Apr 2020, 08:49

<double>
Last edited by sanderj on 30 Apr 2020, 08:50, edited 1 time in total.

sanderj
Posts: 164
Joined: 10 Feb 2014, 21:46

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by sanderj » 30 Apr 2020, 08:49

kiityman wrote:
30 Apr 2020, 08:39

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?
First things first: find any method to find the real available space ... Preferrably via statvfs()

EDIT:

Wait ... if rclone space indeed is 2.1PB as reported by df ... how does df get that info?

EDIT 2:

maybe relevant
https://github.com/rclone/rclone/issues/2356
https://forum.rclone.org/t/block-size-i ... nd/12683/3

sanderj
Posts: 164
Joined: 10 Feb 2014, 21:46

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by sanderj » 30 Apr 2020, 19:56

Out of curiosity, I tried out rclone. It works, but after a mount like this

Code: Select all

rclone mount  google-drive:LinuxDocs /home/sander/myGoogleDrive_LinuxDocs
(which works; I can copy to that directory)

a `df -h` still show the space of my local disk, and not 1PB or so

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
So ... how did you mount to get the 1PB or 2PB

kiityman
Posts: 7
Joined: 18 Mar 2020, 07:10

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by kiityman » 30 Apr 2020, 20:00

sanderj wrote:
30 Apr 2020, 19:56
Out of curiosity, I tried out rclone. It works, but after a mount like this

Code: Select all

rclone mount  google-drive:LinuxDocs /home/sander/myGoogleDrive_LinuxDocs
(which works; I can copy to that directory)

a `df -h` still show the space of my local disk, and not 1PB or so

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
So ... how did you mount to get the 1PB or 2PB
How large is you gdrive?

I mount to /mnt/remote-(name)

sanderj
Posts: 164
Joined: 10 Feb 2014, 21:46

Re: NZBGet Shows -2146640073.00mb Disk Space

Post by sanderj » 30 Apr 2020, 20:22

Ouch: my https://drive.google.com/drive/my-drive says "55.8 GB of 101 GB used". Ah, so in my case the "df -h" is showing the correct space.

So ... how do you get the 1PB and 2PB? Is that goolge language for a unlimited plan?

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests