AMH 社区首页
AMH社区 - 开放自由有价值的社区
[综合话题] 阿里云扩容后d-disk为何仍显示旧容量 |
|
---|---|
Shane |
Shane 发表于 2021-08-01 22:50:56
高效云盘 从原来的40G扩容到了60G
60GiB (2280 IOPS) 可是我发现d-disk仍显示只有40G,这是怎么回事儿? 附件文件 1. Snipaste_2021-08-01_22-48-58.jpg (31.70 KB) 2. Snipaste_2021-08-01_22-50-34.jpg (32.64 KB)
点赞,加油! (0分)
2021-08-01 22:50:56 1
日拱一卒 功不唐捐 |
yexiaohai |
挂载了吗?
回复
2021-08-01 23:44:24 2
amh忠实拥护者,amh稳定高效! |
amysql |
阿里云、腾讯云在官网购买磁盘扩容后,还要在ssh操作扩容相应的磁盘分区。
参考以下: 1、先停止网站环境软件。 amh nginx stop amh apache stop (有用apache用此命令) amh mysql stop 2、移除当前磁盘的挂载。 umount /dev/vdb1 vdb1改成你磁盘的实际名称。(在amh桌面磁盘管理可查看,通常是挂载在/home的磁盘) 3.删除原有分区并新建分区 使用 fdisk 管理你的磁盘/dev/vdb ,输入 d 来删除原用的第1号分区 (即vdb1) 然后依次输入 n,p,1 来新建分区(即又新建回vdb1),下步提示输入 sector 值时,直接回车保持默认值,最后输入 wq 保存退出。 命令过程如下: # fdisk /dev/vdb Command (m for help): d Selected partition 1 Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-146800639, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-146800639, default 146800639): Using default value 146800639 Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. 4.格式化磁盘 使用 resize2fs 指令扩大文件系统大小, 原有数据不会丢失。 e2fsck -f /dev/vdb1 resize2fs /dev/vdb1 5.扩容分区完成,挂载回磁盘、与重新启动软件。 mount /dev/vdb1 /home /etc/init.d/amh-start
回复
2021-08-02 09:16:57 3
AMH面板 - 好用高效低占用、安全可靠极稳定 |
陌涛 |
这边建议挂载~
回复
2021-08-02 15:15:00 4
|
Shane |
在扩容之初,我已经这样处理过了。但是好像重启之后,又失踪了
回复
2021-08-11 14:16:27 5
|
Shane |
目前磁盘的状况是这样的:
[root@iZbi544xZ ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/vda1 20G 7.0G 12G 38% / tmpfs 939M 0 939M 0% /dev/shm /dev/vdb1 40G 35G 2.7G 93% /home [root@iZbi544xZ ~]# fdisk -l Disk /dev/vda: 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: 0x00060953 Device Boot Start End Blocks Id System /dev/vda1 * 1 2611 20970496 83 Linux Disk /dev/vdb: 64.4 GB, 64424509440 bytes 255 heads, 63 sectors/track, 7832 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: 0x34999202 Device Boot Start End Blocks Id System /dev/vdb1 1 5221 41937651 83 Linux [root@iZbi544xZ ~]# resize2fs /dev/vdb1 resize2fs 1.41.12 (17-May-2010) The filesystem is already 10484412 blocks long. Nothing to do! [root@iZbi544xZ ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/vda1 20G 7.0G 12G 38% / tmpfs 939M 0 939M 0% /dev/shm /dev/vdb1 40G 35G 2.7G 93% /home
回复
2021-08-11 14:40:00 6
|
amysql |
没扩容成功。
按3楼的步骤操作一次,把操作的过程返回的信息都发这里。
回复
2021-08-11 16:01:57 7
|
Shane |
[root@iZbi544xZ ~]# amh nginx stop
============================================================= [Linux] AMH 6.1 http://amh.sh [nginx stop] ============================================================= ============================================================= [Linux] AMH 6.1 http://amh.sh [nginx-generic-1.12 stop] ============================================================= [OK] nginx-generic-1.12 is already installed. [OK] nginx-generic-1.12 stop ============================================================= [Linux] AMH 6.1 http://amh.sh [nginx-generic-1.6 stop] ============================================================= nginx-generic-1.6 [OK] nginx-generic-1.6 is already installed. [OK] nginx-generic-1.6 stop [root@iZbi544xZ ~]# amh mysql stop ============================================================= [Linux] AMH 6.1 http://amh.sh [mysql stop] ============================================================= ============================================================= [Linux] AMH 6.1 http://amh.sh [mysql-generic-5.5.40 stop] ============================================================= mysql-generic-5.5.40 [OK] mysql-generic-5.5.40 is already installed. Shutting down MySQL... SUCCESS! [root@iZbi544xZ ~]# umount /dev/vdb1 umount: /home: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) [root@iZbi544xZ ~]#
回复
2021-08-11 16:12:29 8
|
Shane |
似乎取消挂载失败了,被占用
回复
2021-08-11 16:15:47 9
|
amysql |
磁盘还有软件在占用,估计要停止所占用的软件,或是你取消fstab挂载项直接重启:
cp /etc/fstab /etc/fstab.bak sed -i '/vdb1/d' /etc/fstab reboot
回复
2021-08-11 16:27:15 10
|