开发者社区> 问答> 正文

CentOS系统挂载数据盘

按照官方发布的挂载数据盘帖子操作没有成功 代码如下
第一步
------------------------------------------

[root@AY140425115133Z ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       20G  4.9G   14G  26% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
-----------------------------------------
第二步
-----------------------------------------

[root@AY140425115133Z ~]# 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: 0x0007ce89


    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1        2611    20970496   83  Linux


Disk /dev/xvdb: 137.4 GB, 137438953472 bytes
255 heads, 63 sectors/track, 16709 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: 0xa3095856


    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1               1       16710   134215680    f  W95 Ext'd (LBA)
/dev/xvdb5               1       16710   134214656    7  HPFS/NTFS
--------------------------------------------------
第三步( 出现重复要求输入命令
-------------------------------------------------

[root@AY140425115133Z ~]# fdisk /dev/xvdb


WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').


Command (m for help): n^H
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined.  Delete it before re-adding it.


Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
p
Partition number (1-4): 2
No free sectors available


Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined.  Delete it before re-adding it.


Command (m for help): wp
The partition table has been altered!


Calling ioctl() to re-read partition table.
Syncing disks.
------------------------------------------------------
第四步
-----------------------------------------------------
准备格式化 [root@AY140425115133Z ~]# mkfs.ext3 /dev/xvdb1  后面没有操作了,怕出错,求高手指点指点

展开
收起
cqcet 2014-07-22 13:32:30 32287 0
4 条回答
写回答
取消 提交回答
  • Disk /dev/xvdb: 137.4 GB, 137438953472 bytes
    255 heads, 63 sectors/track, 16709 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: 0xa3095856


        Device Boot      Start         End      Blocks   Id  System
    /dev/xvdb1               1       16710   134215680    f  W95 Ext'd (LBA)
    /dev/xvdb5               1       16710   134214656    7  HPFS/NTFS

    从红色字来看,你的硬盘上原来有分区啊,是不是重复做过分区?如果你还没有用过这些分区,可以按d删除,然后再新建立分区。
    2014-10-31 09:26:47
    赞同 展开评论 打赏
  • ReCentOS系统挂载数据盘
    官方挂载教程有问题,会让下一步的网站目录无法挂载到数据盘上。
    我是按照这个教程挂载的
    http://bbs.aliyun.com/read/151152.html?spm=0.0.0.0.rYtNTF
    2014-10-31 09:04:35
    赞同 展开评论 打赏
  • ReCentOS系统挂载数据盘
    我也遇到这个问题了 ,请问你解决了吗?
    2014-10-30 23:40:47
    赞同 展开评论 打赏
  • 按照帮助中心的教程来吧
    2014-07-22 13:52:43
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
低代码开发师(初级)实战教程 立即下载