LoginSignup
2
2

More than 5 years have passed since last update.

GCE環境でのVM初期構築時 /パーティションサイズ拡張手順

Last updated at Posted at 2015-04-29

以前は色々手順を踏まないとダメだったが、2015年2月くらいから
ワンコマンドでサクッとできるようになったようなのでまとめた。

コマンド

200GBのDiskサイズで構築コマンド例。

gcloud compute instances create <VMインスタンス名> \
--zone asia-east1-a \
--machine-type n1-standard-1 \
--network default \
--boot-disk-device-name <ディスク(VMインスタンス)名> \
--boot-disk-size 200GB \
--image debian-7 \

結果

/が200GBになっていることが確認できた。

$ df
Filesystem                                             1K-blocks   Used Available Use% Mounted on
rootfs                                                 206422712 583996 195355596   1% /
udev                                                       10240      0     10240   0% /dev
tmpfs                                                     380364    140    380224   1% /run
/dev/disk/by-uuid/abe15085-81af-4533-9c6e-b8ffd6779b91 206422712 583996 195355596   1% /
tmpfs                                                       5120      0      5120   0% /run/lock
tmpfs                                                     760720      0    760720   0% /run/shm

補足

200GB以下でディスクを掘ると「I/Oのパフォーマンス良くないよ」とのこと。
ディスクサイズでread/writeのパフォーマンス変わるみたい。(未検証)

WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#pdperformance.
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2