Google cloud compute engine: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 21: | Line 21: | ||
old_desc_blocks = 2, new_desc_blocks = 9 | old_desc_blocks = 2, new_desc_blocks = 9 | ||
The filesystem on /dev/sda1 is now 18349563 (4k) blocks long. | The filesystem on /dev/sda1 is now 18349563 (4k) blocks long. | ||
df -h | |||
Filesystem Size Used Avail Use% Mounted on | |||
udev 13G 0 13G 0% /dev | |||
tmpfs 2.6G 43M 2.6G 2% /run | |||
/dev/sda1 69G 3.1G 63G 5% / | |||
tmpfs 13G 0 13G 0% /dev/shm | |||
tmpfs 5.0M 0 5.0M 0% /run/lock | |||
tmpfs 13G 0 13G 0% /sys/fs/cgroup | |||
</pre> | </pre> | ||
Revision as of 11:09, 4 July 2019
Overview
Google cloud compute engine 내용 정리
Re-sizing
Compute engine 이용시, 동적으로 디스크 용량을 변경할 수 있다. Instance details 및 Disks 에서 변경하고자 하는 disk 의 용량을 변경하면 된다. 하지만, 이미 동작중인 Compute engine(VM)의 Disk 용량을 변경한다면, 용량 변경 후, 변경된 용량을 인식시켜주어야 한다.
아래는 동작중인 Compute engine 에서 10G 용량의 disk 를 70로 변경하는 예제이다.
$ sudo lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 70G 0 disk `-sda1 8:1 0 10G 0 part / $ sudo growpart /dev/sda 1 CHANGED: partition=1 start=4096 old: size=20967424 end=20971520 new: size=146796511,end=146800607 $ sudo resize2fs /dev/sda1 resize2fs 1.43.4 (31-Jan-2017) Filesystem at /dev/sda1 is mounted on /; on-line resizing required old_desc_blocks = 2, new_desc_blocks = 9 The filesystem on /dev/sda1 is now 18349563 (4k) blocks long. df -h Filesystem Size Used Avail Use% Mounted on udev 13G 0 13G 0% /dev tmpfs 2.6G 43M 2.6G 2% /run /dev/sda1 69G 3.1G 63G 5% / tmpfs 13G 0 13G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 13G 0 13G 0% /sys/fs/cgroup
- refernece: https://medium.com/google-cloud/resize-your-persist-disk-on-google-cloud-on-the-fly-b3491277b718 - Resize your persist disk on Google Cloud on the fly