Latest Post

🚨 BẢO MẬT WEB THỜI ĐẠI AI: HACKER DÙNG AI, BẠN VẪN BẢO VỆ WEBSITE THEO CÁCH CŨ? 🚨 CẢNH BÁO BẢO MẬT: HACKER CÓ THỂ ĐANG NHẮM ĐẾN FILE config.php CHỨA MẬT KHẨU DATABASE! UEFI Package sử dụng thư viện xử lý hình ảnh có rất nhiều lỗ hỏng bảo mật. Wireless LAN Router của ELECOM có lỗ hỏng bảo mật OS Command injection Note: setting days for Crontab Launching AWS EC2 Instance using Python Tự động phát hành SSL Certificate hết hạn Let’s Encrypt Verify if crontab works Cách xem thời hạn của Let’s Encrypt SSL Certificate AWS EC2 Instance: jum update failure: repodata/repomd.xml from rpmforge: [Errno 256] No more mirrors to try. Nhập môn Python: Chương 2 Hello World thử viết chương trình python đơn giản. Python – Anaconda: Cài đặt Anaconda môi trường lập trình python Nhập môn Python: Chương 1 Python là gì? MySQL – GRANT: Tạo user, set lại password, xem và cấp quyền cho user. Python – Multithread – Queue – File: Xử lý đa luồng dùng chung dữ liệu trên cùng một file dùng hàng đợi(Queue) ⑤Ubuntu – Postfix – Dovecot : Mail server setting, một phát ăn ngay . ④Ubuntu – Postfix – Dovecot : SSL/TSL security mail server setting, một phát ăn ngay. ③Ubuntu – Postfix – Dovecot : Mail server setting, một phát ăn ngay. ②Ubuntu – Postfix – Dovecot : Mail server setting, một phát ăn ngay. ① Ubuntu – Postfix – Dovecot : Mail server setting, một phát ăn ngay. Python – Pandas: lấy data từ file csv. Newbie – Python – Selenium: Tự động login Facebook với trình duyệt Chrome Newbie – Python – Skype: Gửi Message tới Skype chat group hoặc user bằng ngôn ngữ Python. Newbie – Python – PostgreSQL: Kết nối với cơ sở dữ liêu PostgreSQL bằng ngôn ngữ Python. Newbie – Python – SQL Server: Kết nối với cơ sở dữ liệu SQL Server bằng ngôn ngữ Python. Newbie – Python – Mysql: Kết nối với cơ sở dữ liêu MySQL bằng ngôn ngữ Python. Basic Authentication Setting How to setup AWS VPN Client 【GCP】Compute Engine’s Disk Expansion Linux Commands WordPress 404 Page Error (Post)
3 0
Read Time:1 Minute, 47 Second

1. Expand disk from GCP platform screen.

Select Platform Screen > [Compute Engine] > [Disks] > [Disk Detail]

When disk’s detail information was showed then click on [EDIT] button.

 

Change size and click on [SAVE] button

2. Execute Linux command Via Putty

Use SSH client to login to virtual machine, and execute command to setting.

The first check the file system.

Use SSH client (Putty) to connect to Compute Engine.

Root directory is mounting at [/dev/sda1]’s size is 10G.
Type of file system is importance to use which command to expand. In this time is ext4.

$ df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  286M     0  286M   0% /dev
tmpfs          tmpfs      60M  7.6M   52M  13% /run
/dev/sda1      xfs        20G  1.7G   27G   6% /
tmpfs          tmpfs     297M     0  297M   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     297M     0  297M   0% /sys/fs/cgroup

 

2-1. Expand Partition

Confirm current partition.

$ lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda      8:0    0  30G  0 disk
└─sda1   8:1    0  20G  0 part /

sda1 is 20G.

$ sudo growpart /dev/sda 1
OR
$ sudo growpart /dev/nvme0n1 1

If CHANGED: 〜 been showed then OK.
Elif sudo: growpart: command not found

$ yum install epel-release
$ yum install --enablerepo=epel cloud-utils-growpart
$ yum install --enablerepo=epel dracut-modules-growroot
$ sudo growpart /dev/sda 1

 

2-2. Expand File system

If Linux’s File system are ext2/ext3/ext4/vfat then use resize2fs command, else XFS then use xfs_growfs command.

Expand File System: vfat

$ sudo resize2fs /dev/xvda1
$ sudo resize2fs /dev/nvme0n1p1

Expand File System: xfs

$ sudo xfs_growfs /dev/sda1

Check:

$ df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  286M     0  286M   0% /dev
tmpfs          tmpfs      60M  7.6M   52M  13% /run
/dev/sda1      xfs        30G  1.7G   27G   6% /
tmpfs          tmpfs     297M     0  297M   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     297M     0  297M   0% /sys/fs/cgroup

 

Check that [/dev/sda1」has been changed to 30G.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *