Preface
Following are the simple instructions on how to mount Windows USB drive onto Centos/RHEL 7 and also resolve a very common mounting issue which presents itself with error: mount: unknown filesystem type ‘exfat’.
How-To
Before we can mount the USB drive, we need to first obtain its file system path. Run following command to do so:
In the output, you need to look for your USB drive, I’ve found mine by SSD the disk size (120 GB) and SDB denominator.
Another, perhaps easier way to do this, is to run following command:
- for devlink in /dev/disk/by-id/usb*; do readlink -f ${devlink}; done
Anyhow, as you can see, my USB drive is listed as: /dev/sdb1, and this is all I needed to know in order to mount it onto my CentOS system. Now, let’s create a directory to which we will attach our USB drive:
And finally let’s mount the file system to /mnt/usb directory we’ve just created.
Now your USB drive will be accessible by browsing to: /mnt/usb. If you want to un-mount manually, simple use:
If the drive is busy and above command won’t let you un-mount, you can forcefully unmount it by using this command:
Now, as far as dealing with error: mount: unknown filesystem type ‘exfat’. You’ll most likely experience this error because you’re trying to mount a drive previously formatted under Windows OS. To resolve the issue, you’ll need to install support for mounting EXFAT drives onto Linux. Do that by installing following two programs: exfat-utils and fuse-exfat
Normally, these are not present in Centos 7, so before you will run Yum Install command, you’ll first need to add li.nux.ro Epel repository to your system:
Finally, you can install exfat support with this simple command:
And once this is done, you can run above mounting procedure again – it’ll work without any errors.
沒有留言:
張貼留言