Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1640
  • 博文数量: 1
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 40
  • 用 户 组: 普通用户
  • 注册时间: 2015-08-26 15:34
文章分类

全部博文(1)

文章存档

2015年(1)

我的朋友
最近访客

分类: 云计算

2015-11-18 15:06:56

本文介绍了aliyun数据盘的挂载方法,aliyun的centos系统数据盘默认情况下是没有挂上去的,而且都没有分区和格式化,需要自己手动操作,有需要的朋友参考下。

阿里云aliyun数据盘挂载方法(使用阿里云服务器新手必备教程):

1,查看硬盘
 
复制代码 代码示例:
#df -h,只有挂载的才可以看的到。
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1             20G  6.1G   13G  33% /
tmpfs                 750M     0  750M   0% /dev/shm

2,查看所有硬盘
 
复制代码 代码示例:

#fdisk -l
Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x00073f45
 
    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1        2611    20970496   83  Linux

Disk /dev/xvdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0xbf36230f
 
    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1               1        2610    20964793+  83  Linux

3,对/dev/xvdb进行分区
 

#fdisk /dev/xvdb
依次执行命令:

n:增加分区

p:主分区

1:第一个分区

回车两次,默认选择所有磁道

w:保存

4,查看新分区:
 
复制代码 代码示例:
#fdisk -l

5,格式化新分区:
 
复制代码 代码示例:
#mkfs.ext4 /dev/xvdb1

6,添加启动时的自动挂载
 
#vi /etc/fstab
添加一行
/dev/xvdb1    /mnt    ext4    defaults    0    0
#mount -a,挂载

也可以手动挂载:
#mount /dev/xvdb1 /mnt


























































































































































http://tinyurl.com/ngo2cue

































































http://tinyurl.com/p6ds7cu


















































































































**4




阅读(783) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:没有了

给主人留下些什么吧!~~