linux 挂载磁盘 mount

挂在磁盘操作(还有一个300G的盘没显示出来): 

[root@iZgo67bo9s3uaijzqrgbaxZ ori]# df -h 
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              39G   12G   26G  32% /
tmpfs                 4.0G     0  4.0G   0% /dev/shm

[root@iZgo67bo9s3uaijzqrgbaxZ backup]# fdisk -l    //查找未挂载的磁盘信息 
 
Disk /dev/hda: 42.9 GB, 42949672960 bytes
224 heads, 56 sectors/track, 6687 cylinders
Units = cylinders of 12544 * 512 = 6422528 bytes
 
Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        6688    41940992   83  Linux
Partition 1 does not end on cylinder boundary.
 
 Disk /dev/xvdb: 322.1 GB, 322122547200 bytes 
224 heads, 56 sectors/track, 50155 cylinders
Units = cylinders of 12544 * 512 = 6422528 bytes
 
Disk /dev/xvdb doesn't contain a valid partition table

[root@iZgo67bo9s3uaijzqrgbaxZ opt]#mkfs -t ext3 /dev/xvdb      //格式化未挂载的磁盘,使用ext3格式 
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
39321600 inodes, 78643200 blocks
3932160 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2400 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616
 
Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root@iZgo67bo9s3uaijzqrgbaxZ opt]# mkdir /mnt/sdb       //创建挂载对应的目录 

[root@iZgo67bo9s3uaijzqrgbaxZ sdb]#mount /dev/xvdb /mnt/sdb    //将磁盘挂载到创建的目录上 
[root@iZgo67bo9s3uaijzqrgbaxZ sdb]# df -h        
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              39G   12G   26G  32% /
tmpfs                 4.0G     0  4.0G   0% /dev/shm
 /dev/xvdb             296G  191M  281G   1% /mnt/sdb

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值