• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
导航菜单
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx
您的位置:首页 > 服务器 >云计算 > AWS EC2 调整云主机根卷大小,awsec2

AWS EC2 调整云主机根卷大小,awsec2

作者:网友 字体:[增加 减小] 来源:互联网

本文主要包含aws ec2,amazon aws ec2,aws ec2 价格,aws ec2型号,aws ec2 用户名与密码等服务器相关知识,网友希望可以进行参考

AWS EC2 调整云主机根卷大小,awsec2


对于Redhat/Amazon Linux操作系统,请参考:
调整amazon EC2云主机的EBS启动磁盘大小(http://blog.sina.com.cn/s/blog_704836f40101anhf.html)

对于centos 操作系统,需要做些额外的操作步骤,才能是根卷的大小调整生效,操作如下:

[root@ip-10-0-8-58 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 802M 6.7G 11% /
tmpfs 7.3G 0 7.3G 0% /dev/shm
/dev/xvdb 493G 198M 467G 1% /mnt
[root@ip-10-0-8-58 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 20G 0 disk
└─xvda1 202:1 0 8G 0 part /
xvdb 202:16 0 500G 0 disk /mnt
[root@ip-10-0-8-58 ~]# fdisk -u /dev/xvda

WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
switch off the mode (command ‘c’).

Command (m for help): p

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098461

Device Boot      Start         End      Blocks   Id  System

/dev/xvda1 * 2048 16777215 8387584 83 Linux

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-41943039, default 63): 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):
Using default value 41943039

Command (m for help): p

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098461

Device Boot      Start         End      Blocks   Id  System

/dev/xvda1 2048 41943039 20970496 83 Linux

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098461

Device Boot      Start         End      Blocks   Id  System

/dev/xvda1 * 2048 41943039 20970496 83 Linux

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource
busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@ip-10-0-8-58 ~]# reboot

Broadcast message from root@ip-10-0-8-58
(/dev/pts/0) at 3:58 …

The system is going down for reboot NOW!
[root@ip-10-0-8-58 ~]# Connection to 54.223.220.111 closed by remote host.
Connection to 54.223.220.111 closed.

d@D-PC /d/work/key
$ ssh -i aws-ssh-key.pem root@54.223.220.111

d@D-PC /d/work/key
$ ssh -i aws-ssh-key.pem root@54.223.220.111
Last login: Wed Jul 29 03:07:54 2015 from 223.71.247.139
[root@ip-10-0-8-58 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 802M 6.7G 11% /
tmpfs 7.3G 0 7.3G 0% /dev/shm
/dev/xvdb 493G 198M 467G 1% /mnt
[root@ip-10-0-8-58 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 20G 0 disk
└─xvda1 202:1 0 20G 0 part /
xvdb 202:16 0 500G 0 disk /mnt
[root@ip-10-0-8-58 ~]# fdisk -u /dev/xvda

WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
switch off the mode (command ‘c’).

Command (m for help): p

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098461

Device Boot      Start         End      Blocks   Id  System

/dev/xvda1 * 2048 41943039 20970496 83 Linux

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-41943039, default 63): p
First sector (63-41943039, default 63): 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):
Using default value 41943039

Command (m for help): p

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098461

Device Boot      Start         End      Blocks   Id  System

/dev/xvda1 2048 41943039 20970496 83 Linux

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00098461

Device Boot      Start         End      Blocks   Id  System

/dev/xvda1 * 2048 41943039 20970496 83 Linux

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource
busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@ip-10-0-8-58 ~]# reboot

Broadcast message from root@ip-10-0-8-58
(/dev/pts/0) at 4:03 …

The system is going down for reboot NOW!
[root@ip-10-0-8-58 ~]# Connection to 54.223.220.111 closed by remote host.
Connection to 54.223.220.111 closed.

$ ssh -i aws-ssh-key.pem root@54.223.220.111
Last login: Wed Jul 29 03:59:36 2015 from 223.71.247.139
[root@ip-10-0-8-58 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 802M 6.7G 11% /
tmpfs 7.3G 0 7.3G 0% /dev/shm
/dev/xvdb 493G 198M 467G 1% /mnt
[root@ip-10-0-8-58 ~]#
[root@ip-10-0-8-58 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 802M 6.7G 11% /
tmpfs 7.3G 0 7.3G 0% /dev/shm
/dev/xvdb 493G 198M 467G 1% /mnt
[root@ip-10-0-8-58 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 20G 0 disk
└─xvda1 202:1 0 20G 0 part /
xvdb 202:16 0 500G 0 disk /mnt
[root@ip-10-0-8-58 ~]# resize2fs /dev/xvda1
resize2fs 1.41.1

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • AWS EC2 调整云主机根卷大小,awsec2
  • 使用AWS服务时注意时区的问题,aws服务注意时区

相关文章

  • 机器学习数学基础- gradient descent算法(上),gradientdescent
  • hadoop文件系统详解--(1),
  • 《转》OpenStack Keystone的基本概念理解,《转》openstack
  • Hadoop之——HBASE结合MapReduce批量导入数据,hadoopmapreduce
  • Hadoop之——数据类型,hadoop数据类型
  • JS查看Object对象的内容,jsobject对象
  • Mellanox网卡,使用netperf进行性能测试,mellanoxnetperf
  • 生源再增 欲促寒门出贵子,生源促寒门贵子
  • 观点 | 为什么说云主机比物理机故障率更低?,云主机
  • 玩转OpenStack网络Neutron(3)--配置多种不同类型网络,openstackneutron

文章分类

  • windows
  • 服务器硬件
  • 服务器运维
  • 云计算
  • 虚拟化
  • IIS教程
  • Linux
  • Apache
  • Ftp
  • DNS
  • Nginx

最近更新的内容

    • Binary Tree Preorder Traversal (leetcode 144),preorderleetcode
    • Hive 和普通关系数据库的异同,hive关系数据库
    • RedHadoop创始人童小军在北京开讲“Hadoop2.0集群优化与管理”啦!,redhadoophadoop2.0
    • 独家教程利用VPS服务器搭建独享VPN(基于Centos6.4 Openvpn),vpsopenvpn
    • hadoop集群只有一个datanode启动问题,hadoop集群datanode
    • Hadoop之——有趣问答(一),hadoop问答
    • Elasticsearch之Nested Query,elasticsearch
    • Understanding Cubert Concepts(二)Co-Partitioned Blocks,partitioned
    • 关于hadoop程序优化的几点建议,hadoop几点建议
    • MongoDB Query 的几个方法,mongodbquery

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有