Mkdir invalid argument

Hello everyone I am syncing files onto my drive on Raspberry Pi OS (Debian Distribution) using rclone. I am getting a lot of ERRORs saying mdir: invalid argument when the source folder contains "/", ":" or "?" or other specialities. I know that these are probably invalid characters for Linux directories but even after reading the docs its not clear to me what I would do in such a case. I prefer not to rename the source folders and I would be okay if those characters are replaced with something else in the destination directory.

rclone v1.53.3-DEV

  • os/arch: linux/arm64
  • go version: go1.15.9

Which cloud storage system are you using?

Google Drive

The command you were trying to run

rclone sync GDrive:Music Music -v

How would I formulate this command in a way all directories are successfully created in the destination even when invalid characters are included such as "/", ":" or "?" ...

A log error example from the command with the -v flag

ERROR : Eartheater/Phoenix: Flames Are Dew Upon My Skin/10. Eartheater - Goodbye Diamond.flac: Failed to copy: mkdir /media/chris/T7/Music/Eartheater/Phoenix: Flames Are Dew Upon My Skin: invalid argument

hello and welcome to the forum,

please update to latest stable, v1.61.1 and test again.
https://rclone.org/downloads/#script-download-and-install

I have updated to:

rclone v1.61.1

  • os/version: raspbian 11.6 (64 bit)
  • os/kernel: 5.15.84-v8+ (aarch64)
  • os/type: linux
  • os/arch: arm64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: none

And I see the exact same issue.

can you post a full debug output showing the issue.

I realized that this is only happening on my external SSD that is connected to the raspberry pi. If I run the same command inside my linux home folder it runs without issues :open_mouth:

chris@raspberrypi:/media/chris/T7 $ rclone sync GDrive:Books Books -vv
2023/03/08 21:02:16 DEBUG : rclone: Version "v1.61.1" starting with parameters ["rclone" "sync" "GDrive:Books" "Books" "-vv"]
2023/03/08 21:02:16 DEBUG : Creating backend with remote "GDrive:Books"
2023/03/08 21:02:16 DEBUG : Using config file from "/home/chris/.config/rclone/rclone.conf"
2023/03/08 21:02:16 DEBUG : Google drive root 'Books': 'root_folder_id = 0ACFW6UbMtMimUk9PVA' - save this in the config to speed up startup
2023/03/08 21:02:16 DEBUG : Creating backend with remote "Books"
2023/03/08 21:02:16 DEBUG : fs cache: renaming cache item "Books" to be canonical "/media/chris/T7/Books"
2023/03/08 21:02:17 DEBUG : Local file system at /media/chris/T7/Books: Waiting for checks to finish
2023/03/08 21:02:17 DEBUG : Local file system at /media/chris/T7/Books: Waiting for transfers to finish
2023/03/08 21:02:22 ERROR : 2013/Books: 2013/tumblr.zip: Failed to copy: mkdir /media/chris/T7/Books/2013/Books: 2013: invalid argument
2023/03/08 21:02:22 ERROR : Local file system at /media/chris/T7/Books: not deleting files as there were IO errors
2023/03/08 21:02:22 ERROR : Local file system at /media/chris/T7/Books: not deleting directories as there were IO errors
2023/03/08 21:02:22 ERROR : Attempt 1/3 failed with 1 errors and: mkdir /media/chris/T7/Books/2013/Books: 2013: invalid argument
2023/03/08 21:02:23 DEBUG : Local file system at /media/chris/T7/Books: Waiting for checks to finish
2023/03/08 21:02:23 DEBUG : Local file system at /media/chris/T7/Books: Waiting for transfers to finish
2023/03/08 21:02:28 ERROR : 2013/Books: 2013/tumblr.zip: Failed to copy: mkdir /media/chris/T7/Books/2013/Books: 2013: invalid argument
2023/03/08 21:02:28 ERROR : Local file system at /media/chris/T7/Books: not deleting files as there were IO errors
2023/03/08 21:02:28 ERROR : Local file system at /media/chris/T7/Books: not deleting directories as there were IO errors
2023/03/08 21:02:28 ERROR : Attempt 2/3 failed with 1 errors and: mkdir /media/chris/T7/Books/2013/Books: 2013: invalid argument
2023/03/08 21:02:29 DEBUG : Local file system at /media/chris/T7/Books: Waiting for checks to finish
2023/03/08 21:02:29 DEBUG : Local file system at /media/chris/T7/Books: Waiting for transfers to finish
2023/03/08 21:02:30 ERROR : 2013/Books: 2013/tumblr.zip: Failed to copy: mkdir /media/chris/T7/Books/2013/Books: 2013: invalid argument
2023/03/08 21:02:30 ERROR : Local file system at /media/chris/T7/Books: not deleting files as there were IO errors
2023/03/08 21:02:30 ERROR : Local file system at /media/chris/T7/Books: not deleting directories as there were IO errors
2023/03/08 21:02:30 ERROR : Attempt 3/3 failed with 1 errors and: mkdir /media/chris/T7/Books/2013/Books: 2013: invalid argument
2023/03/08 21:02:30 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 14.0s

2023/03/08 21:02:30 DEBUG : 3 go routines active
2023/03/08 21:02:30 Failed to sync: mkdir /media/chris/T7/Books/2013/Books: 2013: invalid argument

what is the file system, fat32 or what?

chris@raspberrypi:~ $ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
└─sda1
exfat 1.0 T7 6424-76ED 1.2T 33% /media/chr

This command says exfat

seems like that could be the issue.

as what to do, not sure, maybe try
https://rclone.org/overview/#encoding

I think I will go by changing the file system. Thank you for taking your time

ok, but might wait a bit before reformatting, as someone else might have a workaround.
i am not too familiar with encodings.

https://forum.rclone.org/t/google-drive-sync-no-such-file-or-directory-after-switching-from-mac-os-to-chrome-os/29517/2

1 Like

Would this issue qualify as a bug? Or is exfat just some sort of incompatible file system?

Okay looking at the link you shared there is a workaround it seems.

imho, not a bug, but a limitation of exfat.

but i could be wrong, let's see what other forum members suggest.

Oh wow , I didn't know that

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.