Hyper-V上のUbuntuのディスク容量拡張

更新日 2022-02-19 19:04:11
ubuntu

Hyper-Vマネージャーの設定

[ディスクの編集] - [次へ]
[仮想ハードディスクの場所] - [参照] - 該当するavxdxファイルを選択
ハードディスク容量を設定する

ubuntu側設定


parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print

Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 37748736 blocks) or continue with the
current setting? 
Fix/Ignore? fix 

Number  Start   End     Size    File system  Name  Flags
14      1049kB  5243kB  4194kB                     bios_grub
15      5243kB  116MB   111MB   fat32              boot, esp
 1      116MB   12.9GB   12.9GB  ext4
(parted) resizepart 1
Warning: Partition /dev/sda1 is being used. Are you sure you want to continue?
Yes/No?  
yes
End?  [12.9GB]? 
100GB
resize2fs でファイルシステムのサイズを変更

sudo resize2fs /dev/sda1