1.查看服務器硬體資訊
fdisk -l
#內容如下:
磁盤 /dev/sda:1000.2 GB, 1000204886016 位元組,1953525168 個扇區 ……(此處為電腦內硬碟資訊,省略) 磁盤 /dev/sdb:16.0 GB, 16005464064 位元組,31260672 個扇區 Units = 扇區 of 1 * 512 = 512 bytes 扇區大小(邏輯/物理):512 位元組 / 512 位元組 I/O 大小(最小/最佳):512 位元組 / 512 位元組 磁盤標簽型別:dos 磁盤識別符號:0xcad4ebea 設備 Boot Start End Blocks Id System /dev/sdb4 * 256 31260671 15630208 7 HPFS/NTFS/exFAT
#可以看到,U盤磁盤為sdb,用sdb4來表示U盤內容區域
2.打開掛載資訊組態檔
#永久性掛載配置
vim /etc/fstab
添加內容:/dev/sdb1 /opt ext3 defaults 1 1
3.及時生效掛載資訊
mount -a
#查看硬體資訊
df -h
【centos-臨時掛載】
1.命令查看磁盤情況
fdisk -l
#可以看到,磁盤為sdb,用sdb4來表示U盤內容區域
2.掛載移動硬碟或U盤
#若掛載目錄不存在,則新建
mkdir -p /mnt/udisk
#掛載
mount -t ntfs-3g /dev/sdb4 /mnt/udisk/
3.使用完后,取消掛載,否則容易造成資料丟失
umount /mnt/udisk/
【常見問題】
1.未知的檔案系統型別“ntfs”
#如果使用默認方式(-w以讀寫方式掛載)和指明檔案系統型別的方式(mount [-t vfstype] [-o options] device dir)掛載U盤,都提示當前系統未知’ntfs’型別,
#解決方法:安裝ntfs內核模塊
參考:http://jingyan.baidu.com/article/76a7e409b9a531fc3b6e150c.html
1.查看相應模塊
yum list *ntfs*
2.對于centos7 64bit來說,應該安裝fuse-ntfs-3g.x86_64
yum install fuse-ntfs-3g
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/235607.html
標籤:Linux
上一篇:搭建LAMP平臺
