Red Hat Enterprise Linux 7.5挂载NTFS移动硬盘
一般情况下,Red Hat Enterprise Linux 7.5是已经安装好了fuse,如果没安装好的,可以yum install fuse -y安装。 查看已经挂载成功的命令: [root@localhost ~]# lsmod |grep fuse fuse 91880 7 或者输入mknt按Tab键,可以补齐完整的mkntfs即表示可以挂载带有NTFS格式的移动硬盘。
下载ntfs-3g软件包:
wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz
解压ntfs-3g软件包并编译安装:
tar -zxf ntfs-3g_ntfsprogs-2015.3.14.tgz
cd ntfs-3g_ntfsprogs-2015.3.14/
./configure
make
make install 首先,建立一个临时文件夹: mkdir -p /mnt/windows根目录应当获得最高的优先权 1, 其它所有需要被检查的设备设置为 2. 0 表示设备不会被 fsck 所检查。 接着,找到移动硬盘的盘符: [root@localhost soft]# fdisk -l |grep NTFS WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. /dev/sdc4 * 256 30218841 15109293 7 HPFS/NTFS/exFAT 把移动硬盘mount到临时文件夹: mount -t ntfs-3g /dev/sdc4 /mnt/windows/ 最后查看移动硬盘内容: [root@localhost soft]# ls /mnt/windows/ cn_windows_10_enterprise_version_1703_updated_march_2017_x64_dvd_10194191.iso
当不需要用到移动硬盘后,用umount命令取消:
[root@localhost ~]# umount /dev/sdc4
查看临时文件夹,发现没有内容了才是正常:
[root@localhost ~]#
[root@localhost ~]# ls /mnt/windows
如果需要永久挂载,先查到该盘的UUID号:
[root@localhost ~]# blkid
/dev/sda4: UUID="4e34e962-ec94-45d7-aba8-e5b41d4ba703" TYPE="xfs" PARTUUID="6901d320-9cbd-4269-84f6-cb5d1707a091"
/dev/sda1: UUID="2899-F592" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="80acce44-0363-48b8-b7c1-3951708df9b2"
/dev/sda2: UUID="152bee94-cabd-4e87-af2b-fd5baab81123" TYPE="xfs" PARTUUID="d9f9530c-f05e-4d09-b55a-2f66edff9389"
/dev/sda3: UUID="600cead1-4fd1-4aa5-a8db-cd984be85708" TYPE="swap" PARTUUID="d8b02739-65b2-4b11-a7ac-6235614f34b3"
/dev/sdb1: UUID="25bf95bd-33f4-43ff-b7f7-a192ed80b4e3" TYPE="xfs" PARTLABEL="oracle" PARTUUID="6dd4b4f1-8575-424d-bc30-fef82ee1e349"
/dev/sdc1: LABEL="apple_4g" UUID="DA18EBFA09C1B27D" TYPE="ntfs"
[root@localhost ~]# vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu May 30 19:46:21 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=4e34e962-ec94-45d7-aba8-e5b41d4ba703 / xfs defaults 0 0
UUID=152bee94-cabd-4e87-af2b-fd5baab81123 /boot xfs defaults 0 0
UUID=2899-F592 /boot/efi vfat umask=0077,shortname=winnt 0 0
UUID=600cead1-4fd1-4aa5-a8db-cd984be85708 swap swap defaults 0 0
UUID=25bf95bd-33f4-43ff-b7f7-a192ed80b4e3 /data xfs defaults 0 0