linux中挂载硬盘

来源:互联网 发布:阿里云 ddns 编辑:程序博客网 时间:2024/06/05 15:08
1、  首先查看当前系统连接了哪些硬盘[root@localhost dev]# fdisk  -lDisk /dev/sda: 299.4 GB, 299439751168 bytes47 heads, 36 sectors/track, 345652 cylindersUnits = cylinders of 1692 * 512 = 866304 bytes   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *           1         121      102348   83  Linux/dev/sda2             122      345652   292319226   8e  Linux LVMDisk /dev/sdb: 3293.8 GB, 3293837262848 bytes255 heads, 63 sectors/track, 400452 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/sdb1               1      267350  2147483647+  ee  EFI GPTDisk /dev/sdc: 2994.3 GB, 2994397511680 bytes255 heads, 63 sectors/track, 364048 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/sdc1               1      267350  2147483647+  ee  EFI GPTDisk /dev/sdd: 750.1 GB, 750156373504 bytes255 heads, 63 sectors/track, 91201 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/sdd1               1       91202   732571648    7  HPFS/NTFS从上面可以看到总共有sda、sdb、sdc、sdd四个盘2、  通过硬盘的大小,可以发现sdd是我们外接的硬盘,所以可以对这个硬盘进行挂载,需要注意的是我们挂载的是硬盘分区而不是整个盘,所以在这里挂载的应该是sdd13、查看该硬盘的文件系统类型,注意,挂载的时候需要指定文件系统类型,如果系统类型不一样,就会报错,如下:[root@localhost dev]# mount -t vfat  /dev/sdd1 /diskd/mount: wrong fs type, bad option, bad superblock on /dev/sdd,       missing codepage or other error       In some cases useful info is found in syslog - try       dmesg | tail  or so4、  查看该硬盘的文件同类型[root@localhost transcoder]# file -s /dev/sdd1/dev/sdd1: Linux rev 1.0 ext3 filesystem data (needs journal recovery)5、  最后一步就是执行挂载命令了mount –t ext3 /dev/sdd1 /mnt/temp/
0 0
原创粉丝点击