1. 程式人生 > >【Azure】 Linux VM擴大操作系統磁盤空間

【Azure】 Linux VM擴大操作系統磁盤空間

lock syn led IT you rem inf 依然 img

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擴大操作系統磁盤空間