iON Cloud是美国主机商Krypt旗下的一个子品牌,主要提供美国VPS产品服务,所销售的云服务器产品凭借价格便宜、稳定性高等优势,在国内拥有不错的口碑。有时为了业务需求,我们要对硬盘大小进行调整,下面就来看下升级iON云服务器后如何调整硬盘分区大小。
ION Cloud官网:https://ion.krypt.asia/
1、交换区调整大小。
[root@takatest ~]# cat /proc/swapsFilename Type Size Used Priority
/dev/vda2 partition 1048572 0 -2 [root@takatest ~]# swapoff -a [root@takatest ~]# cat /proc/swaps
Filename Type Size Used Priority
2、删除swap和主分区,把硬盘空间重新分区,然后重启。
[root@takatest ~]# fdisk -lDisk /dev/vda: 343.6 GB, 343597383680 bytes, 671088640 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 label type: dos
Disk identifier: 0x000958c2
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 668989055 334493504 83 Linux
/dev/vda2 668989056 671086207 1048576 82 Linux swap / Solaris
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 is deleted
Command (m for help): d
Selected partition 1
Partition 1 is deleted
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-671088639, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-671088639, default 671088639):
Using default value 671088639
Partition 1 of type Linux and of size 320 GiB is set
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.
3、文件系统调整大小操作。主要使用到# resize2fs /dev/vda1,# df -h命令。
[root@takatest ~]# resize2fs /dev/vda1resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 40, new_desc_blocks = 40
The filesystem on /dev/vda1 is now 83885824 blocks long. [root@takatest ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 315G 1.4G 298G 1% /
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 8.5M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 1.6G 0 1.6G 0% /run/user/0
搬瓦工新手选择服务器必备的教程:
1、搬瓦工购买教程:搬瓦工VPS主机购买教程 选择一款合适的外贸主机
2、搬瓦工优惠码:BWH3HYATVBJW
3、搬瓦工套餐推荐:搬瓦工云服务器全部套餐对比列表 可选CN2 GIA和香港机房
4、搬瓦工测试IP:搬瓦工全部数据中心测试IP地址和下载测速文件
5、搬瓦工面板管理:搬瓦工KIWIVM面板的全部功能介绍
搬瓦工VPS的最便宜套餐和最具性价比套餐,简单整理如下:
方案 | CPU | 内存 | 硬盘 | 流量 | 带宽 | 机房 | 价格 | 购买 |
---|---|---|---|---|---|---|---|---|
CN2 GT | 1核 | 1GB | 20GB | 1TB | 1Gbps | DC8等 | $49.99/年 | 购买 |
香港 | 2核 | 2GB | 40GB | 500GB | 1Gbps | 香港 | $89.99/月 | 购买 |
CN2 GIA | 2核 | 1GB | 20GB | 1TB | 2.5Gbps | DC6等 | $49.99/季 | 购买 |
CN2 GIA | 10核 | 32GB | 640GB | 10TB | 10Gbps | DC6等 | $289.99/月 | 购买 |
日本 | 2核 | 1GB | 20GB | 1TB | 2.5Gbps | DC6等 | $49.99/季 | 购买 |
本文结束。
未经允许不得转载:搬瓦工评测网 » iON Cloud教程 iON Cloud VPS调整硬盘分区大小