linux中挂载硬盘

1、  首先查看当前系统连接了哪些硬盘
[root@localhost dev]# fdisk  -l

Disk /dev/sda: 299.4 GB, 299439751168 bytes
47 heads, 36 sectors/track, 345652 cylinders
Units = 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 LVM

Disk /dev/sdb: 3293.8 GB, 3293837262848 bytes
255 heads, 63 sectors/track, 400452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      267350  2147483647+  ee  EFI GPT

Disk /dev/sdc: 2994.3 GB, 2994397511680 bytes
255 heads, 63 sectors/track, 364048 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      267350  2147483647+  ee  EFI GPT

Disk /dev/sdd: 750.1 GB, 750156373504 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = 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是我们外接的硬盘,所以可以对这个硬盘进行挂载,需要注意的是我们挂载的是硬盘分区而不是整个盘,所以在这里挂载的应该是sdd1

3、查看该硬盘的文件系统类型,注意,挂载的时候需要指定文件系统类型,如果系统类型不一样,就会报错,如下:

[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 so

4、  查看该硬盘的文件同类型
[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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值