開始:windows
我拿到的是一個新盤,遇到的第一個問題是插上去後centos不能識別他,使用fdsik -l也沒有這個U盤的任何信息,再windows上面查看他的格式也是fat32,沒有問題,因而折騰了好久後我從新把他格式化,也一樣格式化爲fat32,此次就能識別了。centos
命令:fdisk -l (查看磁盤分區信息)ide
[root@phoenix Desktop]# fdisk -l Disk /dev/sda: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000f2962 Device Boot Start End Blocks Id System /dev/sda1 * 1 26 204800 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 26 281 2048000 82 Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/sda3 281 3917 29203456 83 Linux Disk /dev/sdb: 31.1 GB, 31104958464 bytes 255 heads, 63 sectors/track, 3781 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 3782 30371840 c W95 FAT32 (LBA)
經過上面經過上面信息咱們能夠看出USB設備是FAT32格式的,標識爲/dev/sdb1spa
命令:mount -t vfat /dev/sdb1 /mnt/usb(掛載U盤,注意若是是ntfs格式的話可能須要安裝ntfs-3g這個插件才能執行)插件
成功後就能夠進入 /mnt/usb查看到U盤相應的內容了code
命令:umount /mnt/usb(卸載U盤)blog
執行umount命令卸載U盤時,報以下錯誤「device is busy」,能夠用參數l解決問題。固然你也能夠用fuser命令解決問題。以下所示it
[root@wgods ~]# umount /mnt/usb umount: /mnt/usb: device is busy umount: /mnt/usb: device is busy [root@wgods ~]# umount -f /mnt/usb umount2: Device or resource busy umount: /mnt/usb: device is busy umount2: Device or resource busy umount: /mnt/usb: device is busy [root@wgods ~]# umount -l /mnt/usb(成功卸載)