LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-11-2024, 12:15 AM   #1
keirvt
Member
 
Registered: Sep 2006
Location: Sydney Australia
Distribution: fedora/Ubuntu
Posts: 156

Rep: Reputation: 18
Faulty copy to USB drive exfat


I wish to restore a scientist works from Lacie drives to archive in a library.
There are many drives of this research with thousands of files. About 5 percent have bad filenames. (Colons slashes in filename)

The Lacie Drives Are apple probably "HFS file system. These drives mount okay on my Mint Linux system although the file system is read only for some reason.

My problem is that many (not all) Jpeg files and Photoshop files are corrupted after being copied to a USB drive. ( 2.5" SA external Serial ATA USB3.0 - apparently "super speed".) These brand new drives are formatted as exfat. This is convenient in case some files are greater than 4 gig and also should be readable by other academics on a Windows machine.

I tried copying using rsync, the unix cp command and even python's shutil.copytree. All these methods resulted in jpegs and Photoshop and Word documents being corrupted. I tried a different brand new drive with the same problem.

If I copy by dragging the icon, the copy works okay but because there are unrecognised file names the copy is halted with an error message with the option to cancel or skip. No option to skip on subsequent errors. If clicking on skip, the copy continues but then a little later it halts again on another unlawful file name. It will take too long to copy the many files and drives if it keeps stopping and requiring a click.

It may be the exfat file system that is the problem. Has anyone else encountered this?

Last edited by keirvt; 01-11-2024 at 12:18 AM.
 
Old 01-11-2024, 03:30 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,744

Rep: Reputation: Disabled
These are termed illegal because they are used in code - replace them using a script to remove them - then they should copy across.

However, I would suggest using an external SSD/HDD rather than pendrives, (pendrives are not for long term storage).
 
Old 01-11-2024, 05:36 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,163

Rep: Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658
Any thing outside a user /home directory will generally be read only for a regular user. That should not prevent a user copying FROM that device filesystem.

The big problem seems to be the filenames. Since you are concerned about others using the files from windows and are using a windows filesystem, maybe you could try borrowing/using a windows computer to do this.
 
Old 01-11-2024, 05:55 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7 / 8
Posts: 3,538

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
You might find my blog post on troublesome filenames useful: https://centos.tips/fixing-troublesome-filenames/
 
Old 01-11-2024, 09:22 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,459

Rep: Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216Reputation: 6216
As far as I know linux doesn't have read write support for journaled HFS+ filesystems and therefore it is mounted read only by default. If the Lacie drives are something other then HFS+ they might be mounted as read only.

As posted the copy problem is due to the destination drive being exFAT because there are DOS illegal filename characters being used on the Mac. linux/unix allows just about any character except for a NULL. As suggest you need to run a script to remove the illegal filename characters and copy.
 
Old 01-11-2024, 09:23 AM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by yancek View Post
Any thing outside a user /home directory will generally be read only for a regular user. That should not prevent a user copying FROM that device filesystem.

The big problem seems to be the filenames. Since you are concerned about others using the files from windows and are using a windows filesystem, maybe you could try borrowing/using a windows computer to do this.
I don't think Windows will know what the heck to do with a MacOS (HFS) partition, and I don't think Windows is any happier with ":" or "/" in file names anyway.
 
  


Reply

Tags
exfat usb copy


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] external exfat usb 2gb drive error mikudo Linux - Desktop 6 12-02-2019 11:57 AM
USB external drive problem with exFAT drives. bscho Linux Mint 3 10-04-2019 05:55 AM
RAID1: can't replace faulty spare (marked again as 'faulty spare' within seconds) Thambry Linux - General 2 11-14-2013 08:31 AM
Faulty card or faulty config? svar Linux - Networking 4 09-02-2009 10:39 AM
Do I have a faulty USB drive? Trijicon Linux - Hardware 1 02-02-2009 08:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration