Azure Linux VM扩大操作系统磁盘空间
Posted small_fox
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Azure Linux VM扩大操作系统磁盘空间相关的知识,希望对你有一定的参考价值。
Azure Linux VM扩大操作系统磁盘空间
目前Azure 针对Linux VM提供了增加操作系统磁盘空间的新功能,目前支持的虚拟机主要包括DS, DSV2和FS系列虚拟机。这样有助于帮助客户应用日志保持在SDA文件增加磁盘空间。
1. 创建虚拟机的时候选择
2. 进入操作系统可以看到磁盘空间已经增加到对应大小。
3. 重新分区
[root@osdiskvm ~]# fdisk /dev/sda
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
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): p
Disk /dev/sda: 549.8 GB, 549755813888 bytes, 1073741824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x000cb2fd
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2): 2
First sector (1026048-1073741823, default 1026048):
Using default value 1026048
Last sector, +sectors or +size{K,M,G} (1026048-1073741823, default 1073741823):
Using default value 1073741823
Partition 2 of type Linux and of size 511.5 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.
4. 完成分区后依然没有看到变化,需要重启以便重读分区表后,再进行拉伸
以上是关于Azure Linux VM扩大操作系统磁盘空间的主要内容,如果未能解决你的问题,请参考以下文章