How to install an exFAT USB drive

Issues related to applications and software problems
rtcary
Posts: 130
Joined: 2005/10/13 18:40:55
Contact:

How to install an exFAT USB drive

Post by rtcary » 2020/01/09 23:31:19

The drive was formatted on a Windows 10 system and is to be used to move some data between the sever, Windows system and a Mac.

When I plug it into my Centos 7 server and run fdisk -l, I see it listed as sdb1. And after some poking around, I can access it as /run/media/tcary/ - I'm not sure how that path could have been found with a command?

On the server, I have a directory, /var/www/html and I'd like to copy the contents to /run/media/tcary/html. When I run

cp /var/www/html/* /run/media/tcary/html/

some files are transferred, but none of the directories. I get for example for each directory

cp: omitting directory '/var/www/html/css'

Not sure what I am not doing correctly!?!

I would prefer to use rsync, however in reading the man pages, things certainly become confusing.

Any help would be greatly appreciated.

\rtc

tony_down_under
Posts: 81
Joined: 2019/08/07 01:50:24
Location: Perth, Australia but originally from Carshalton, Surrey

Re: How to install an exFAT USB drive

Post by tony_down_under » 2020/01/10 02:39:16

Hey

First up - looks like the centos system automatically mounted the usb drive. Without automount you can mount the /dev/sdb1 to some folder, usually in /mnt/ but it doesnt matter.

Code: Select all

 mount /dev/sdb1 /mnt/usb/
Second, with "cp" you need to specify one option to achieve what you're looking for. If you type "man cp" on your system, this brings up a help page. On my system i see:
-R, -r, --recursive
copy directories recursively
So I think you can use: cp -r /var/www/html/* /run/media/tcary/html/

The "man" pages are a great way for information about commands. You can pretty much type "man" followed by the command/application. Like "man tar" for example.

Another way that could work is if you copy the contents into a .tar file:

Code: Select all

tar -czvf /run/media/tcary/html/html.tar.gz /var/www/html/
Although, depending on how fast the usb is, it might take a while like that. You might have better response if you first make the .tar in another location like /tmp/ and then copy it from there to the usb:

Code: Select all

tar -czvf /tmp/html.tar.gz /var/www/html/
cp /tmp/html.tar.gz /run/media/tcary/html/
To extract the .tar file you can use:

Code: Select all

tar -xzvf html.tar.gz

stevemowbray
Posts: 491
Joined: 2012/06/26 14:20:47

Re: How to install an exFAT USB drive

Post by stevemowbray » 2020/01/10 09:37:46

"df" would tell you what's mounted where.

If you want to use rsync to update changed files in future:

Code: Select all

rsync -av --delete /var/www/html/ /run/media/tcary/html

rtcary
Posts: 130
Joined: 2005/10/13 18:40:55
Contact:

Re: How to install an exFAT USB drive

Post by rtcary » 2020/01/12 01:10:41

My apologies for not acknowledging your detailed and thorough help earlier - I was tied up with some on the road business and just got back. I will implement these suggestions shortly and get back to you.

With appreciation...

\rtc

rtcary
Posts: 130
Joined: 2005/10/13 18:40:55
Contact:

Re: How to install an exFAT USB drive

Post by rtcary » 2020/01/15 23:27:39

I used the rsync command

rsync -av --delete /var/www/html/ /run/media/tcary/html

and all is backed up on the USB drive and is readable on the network (Windows). However on the GUI File Manger, Dolphin, which I seldom use, I get the following:

An error occurred while accessing 'Home', the system responded: The requested operation has failed: Error mounting /dev/sdb1 at /run/media/tcary/BKUP_LINUX: Filesystem type exfat not configured in kernel.

The USB drive (labeled BKUP_LINUX by Windows) appears to be self-mounting since it is available by just turning it on. Apparently I'm either missing a step or violating some protocol.

\rtc

rtcary
Posts: 130
Joined: 2005/10/13 18:40:55
Contact:

Re: How to install an exFAT USB drive

Post by rtcary » 2020/01/15 23:53:22

My mistake! I thought the USB was mounted; it is not. The rsync command just created the backup on the system disk. So, the USB needs to be mounted. Back to square one...

When I tried

mount /dev/sdb1 /mnt/usb/

I get the error

mount: mount point /mnt/usb/ does not exist

\rtc

User avatar
TrevorH
Forum Moderator
Posts: 27358
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to install an exFAT USB drive

Post by TrevorH » 2020/01/16 07:21:09

What's the output from the command rpm -qa \*exfat\* ?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

rtcary
Posts: 130
Joined: 2005/10/13 18:40:55
Contact:

Re: How to install an exFAT USB drive

Post by rtcary » 2020/01/16 20:16:03

The reply to
rpm -qa \*exfat\*
is blank/NULL

\rtc

User avatar
TrevorH
Forum Moderator
Posts: 27358
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to install an exFAT USB drive

Post by TrevorH » 2020/01/16 20:29:49

That's why you cannot mount it then. CentOS does not ship with exFAT support. The only repo for CentOS 7 that I know of that ships exFAT packages is nux-dextop. That repo is mutually incompatible with the rpmfusion repo but if you use that then you could install nux-dextop then add an includepkgs=*exfat* line to its repo file so that only the exfat packages can be pulled in from there.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

rtcary
Posts: 130
Joined: 2005/10/13 18:40:55
Contact:

Re: How to install an exFAT USB drive

Post by rtcary » 2020/01/16 20:51:43

Yes, after doing some research, I learned the same thing. So, using ext4 would be the most logical solution since I prefer not to use workarounds unless absolutely necessary. Of course, the drive cannot be read by Windows or Macs.

The usb drive was formatted by Windows, however can Centos 7 reformat to ext4 - erase the exfat and format it as ext4?

My disadvantage is that my web page design and software development is done outside of Linux, so I setup the server and let it just run (do updates and minor maintenance). This puts me at a disadvantage when I need to use some of the more detailed commands. Bottom line: THANK YOU!

Todd

Post Reply

Return to “CentOS 7 - Software Support”