abraunegg / onedrive

OneDrive Client for Linux
https://abraunegg.github.io
GNU General Public License v3.0
9.63k stars 849 forks source link

Bug: Updated Remaining Free Space: 865972781056 but every file "Insufficient local disk space to download file" #2737

Closed ga2k closed 1 month ago

ga2k commented 1 month ago

Describe the bug

After replacing system drive and reinstalling OpenSUSE Tumbleweed and the onedrive client from the Suse repositories, I am unable to perform a --synchronize. Every file says Insufficient local disk space to download file.

Operating System Details

Linux localhost.localdomain 6.9.3-1-default #1 SMP PREEMPT_DYNAMIC Thu May 30 08:29:01 UTC 2024 (279162a) x86_64 x86_64 x86_64 GNU/Linux

OpenSUSE Tumbleweed (don't know how to get the version, but it was installed from a fresh iso download on 2024-06-08

Client Installation Method

From Distribution Package

OneDrive Account Type

Personal

What is your OneDrive Application Version

onedrive v2.4.25

What is your OneDrive Application Configuration

> onedrive --display-config
Configuration file successfully loaded
onedrive version                             = v2.4.25
Config path                                  = /home/geoffrey/.config/onedrive
Config file found in config path             = true
Config option 'sync_dir'                     = /home/geoffrey/OneDrive
Config option 'enable_logging'               = true
Config option 'log_dir'                      = /var/log/onedrive/
Config option 'disable_notifications'        = false
Config option 'min_notify_changes'           = 5
Config option 'skip_dir'                     =
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 60
Config option 'monitor_log_frequency'        = 6
Config option 'monitor_fullscan_frequency'   = 12
Config option 'read_only_auth_scope'         = false
Config option 'dry_run'                      = false
Config option 'upload_only'                  = false
Config option 'download_only'                = false
Config option 'local_first'                  = false
Config option 'check_nosync'                 = false
Config option 'check_nomount'                = false
Config option 'resync'                       = false
Config option 'resync_auth'                  = false
Config option 'cleanup_local_files'          = false
Config option 'classify_as_big_delete'       = 1000
Config option 'disable_upload_validation'    = false
Config option 'bypass_data_preservation'     = false
Config option 'no_remote_delete'             = false
Config option 'remove_source_files'          = false
Config option 'sync_dir_permissions'         = 775
Config option 'sync_file_permissions'        = 664
Config option 'space_reservation'            = 54975581388800
Config option 'application_id'               =
Config option 'azure_ad_endpoint'            =
Config option 'azure_tenant_id'              = common
Config option 'user_agent'                   =
Config option 'force_http_11'                = false
Config option 'debug_https'                  = false
Config option 'rate_limit'                   = 0
Config option 'operation_timeout'            = 3600
Config option 'dns_timeout'                  = 60
Config option 'connect_timeout'              = 10
Config option 'data_timeout'                 = 600
Config option 'ip_protocol_version'          = 0
Config option 'sync_root_files'              = false
Selective sync 'sync_list' configured        = false
Config option 'sync_business_shared_folders' = false
Business Shared Folders configured           = false
Config option 'webhook_enabled'              = false

~                                                                                                           at 23:54:12
↥ 1 >

What is your 'curl' version

> curl --version
curl 8.8.0 (x86_64-suse-linux-gnu) libcurl/8.8.0 OpenSSL/3.1.4 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh/0.10.6/openssl/zlib nghttp2/1.61.0 OpenLDAP/2.6.7
Release-Date: 2024-05-22
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

> mount
/dev/sdb2 on / type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=288,subvol=/@/.snapshots/25/snapshot)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=4096k,nr_inodes=4078695,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=6540692k,nr_inodes=819200,mode=755,inode64)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=8408)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=16351724k,nr_inodes=1048576,inode64)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
/dev/sdb2 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=261,subvol=/@/boot/grub2/x86_64-efi)
/dev/sdb2 on /boot/grub2/i386-pc type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=262,subvol=/@/boot/grub2/i386-pc)
/dev/sdb2 on /root type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=259,subvol=/@/root)
/dev/sdb2 on /.snapshots type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=263,subvol=/@/.snapshots)
/dev/sdb2 on /opt type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=260,subvol=/@/opt)
/dev/sdb2 on /usr/local type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=258,subvol=/@/usr/local)
/dev/sdb2 on /var type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@/var)
/dev/sdb1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sdc on /srv type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /home type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3270344k,nr_inodes=817586,mode=700,uid=1000,gid=1000,inode64)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
/dev/sde1 on /run/media/geoffrey/ESD-USB type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

What are all your local file system partition types

> lsblk -f
NAME   FSTYPE  FSVER LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 xfs           Home      cc2769a6-efbc-49d1-a868-dab994740624    1.1T    41% /home
└─sda2 swap    1               a58c3642-4437-4925-a0ac-0317396680a8
sdb
├─sdb1 vfat    FAT32           E38A-DF73                             505.2M     1% /boot/efi
└─sdb2 btrfs                   4a53d594-37f0-4aab-b100-9bc65d9e9841  920.6G     1% /var
/usr/local
/opt
/.snapshots
/root
/boot/grub2/i386-pc
/boot/grub2/x86_64-efi
/
sdc    ext4    1.0             d697bf42-df82-435b-b18c-28f6cb3af838  869.2G     0% /srv
sdd    iso9660       RESCUE906 2022-12-18-07-46-07-00
├─sdd1 iso9660       RESCUE906 2022-12-18-07-46-07-00
└─sdd2 vfat    FAT12 RESCUE906 3078-553F
sde
└─sde1 vfat    FAT32 ESD-USB   B08B-6CA8                              28.8G     0% /run/media/geoffrey/ESD-USB
sr0

~                                                                                                           at 23:55:29
↥ 1 >

How do you use 'onedrive'

/home is on a separate drive to the system drive that was replaced. My OneDrive account is shared between this Linux machine, a macOS machine, and a Windows 10 machine. I access these three machines serially, never at the same time.

Steps to reproduce the behaviour

Reinstall OS Install OneDrive Client Delete all files from the onedrive sync_dir $ onedrive --resync $ onedrive --synchronize

Complete Verbose Log Output

> onedrive --synchronize --verbose
Using 'user' Config Dir: /home/geoffrey/.config/onedrive
Using 'system' Config Dir: /etc/onedrive
Configuration file successfully loaded
Using logfile dir: /var/log/onedrive/
Checking Application Version ...
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Using Curl defaults for all HTTP operations
Opening the item database ...
All operations will be performed in: /home/geoffrey/OneDrive
Application version: v2.4.25
Account Type: personal
Default Drive ID: 2967ca8572a8cdcb
Default Root ID: 2967CA8572A8CDCB!125
Remaining Free Space: 865972781056
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes and items from OneDrive ...
Applying changes of Path ID: 2967CA8572A8CDCB!125
Updated Remaining Free Space: 865972781056
Processing 216 OneDrive items to ensure consistent local state
Downloading file Documents/gsasl-2.zip ... failed!
Insufficient local disk space to download file
Downloading file Desktop/balenaEtcher.lnk ... failed!
Insufficient local disk space to download file
Downloading file Documents/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20240607-Media.iso ... failed!
Insufficient local disk space to download file
Downloading file Downloads/Linux/gsasl-2.zip ... failed!
Insufficient local disk space to download file
Downloading file Downloads/Win/gsasl-2.zip ... failed!
Insufficient local disk space to download file
Downloading file Downloads/Linux/sqlite-dll-win-x64-3450300.zip ... failed!
Insufficient local disk space to download file
Downloading file Downloads/Linux/sqlite-preprocessed-3450300.zip ... failed!
Insufficient local disk space to download file
Downloading file Downloads/Linux/.com.microsoft.Edge.D1c55K ... failed!
Insufficient local disk space to download file
Downloading file Downloads/Linux/proxmox-ve_8.2-1.iso ... ^C

~                                                                                                  took 28s at 00:01:02
↥ 1 INT >

Screenshots

No response

Other Log Information or Details

No response

Additional context

If it means anything, looking into the verbose verbose log I see this

[DEBUG] Local Disk Space Actual: 1173223698432 [DEBUG] Free Space Reservation: 54975581388800 [DEBUG] File Size to Download: 4040161 failed! Insufficient local disk space to download file

My config file has this line space_reservation = "52428800"

But the --display-config agrees with the log output Config option 'space_reservation' = 54975581388800

ga2k commented 1 month ago

My bad. I generated the config file from the --display-config output, and so the space_reservation value was set to hundreds of terabytes, due to the differences in the --display-config value and the config file value. Even though this bug isn't a bug, I've chosen to keep it open as this sort of thing; where one value set somewhere is diplayed differently somewhere else; probably should be considered a bug.

abraunegg commented 1 month ago

@ga2k Please actually read the documentation on 'space_reservation' to understand what this means:

The value in your config file is entered in 'MB' whilst it is displayed in Bytes. The default is 50MB.

The application tracks things as bytes - thus in the debug log it is always going to be in Bytes

Insufficient local disk space to download file

Unfortunately where things are at in development of v2.5.x this will not be looked at for v2.4.x

Your options to solve:

  1. Please read the documentation on 'space_reservation' and configure appropriately for your environment
  2. If still encountering an issue, please test to v2.5.0 RC2. The details can be found here: https://github.com/abraunegg/onedrive/discussions/2710
abraunegg commented 1 month ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.