惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

Gary' Blog

Migrate pip to uv - Gary' Blog Terminal autocomplete (only macOS and Linux) Authentication FastAPI with Keycloak - Gary' Blog Keycloak configuration problems and solutions Careers and LinkedIn Jobs Page of Fortune 500 American Companies How to connect Windows desktop remotely using RDP and cloudflare ZeroTrust tunnel ESXi 8 issue solved: This PC can’t run Windows 11 How to download and license ESXi 8? Get clicked word using pure Javascript
How to expand the hard disk capacity of Debian/Ubuntu in ESXi
Gary · 2025-03-06 · via Gary' Blog

1 Go to ESXi dashboard, expand the hard disk to expected size. Here I will resize my disk from 203G to 1100G.

2 show current disk capacity

➜  ~ df -h
Filesystem             Size  Used Avail Use% Mounted on
...
/dev/sda1              203G  161G   32G  84% /
...

3 use parted to show and resize disk. You may need to install parted if it was not installed.

➜  ~ sudo parted
GNU Parted 3.5
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 1100GB <------------- LOOK HERE
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  222GB  222GB   primary   ext4            boot
 2      222GB   223GB  1022MB  extended
 5      222GB   223GB  1022MB  logical   linux-swap(v1)  swap

 (parted) resizepart  1                                                    
Warning: Partition /dev/sda1 is being used. Are you sure you want to continue?
Yes/No? Yes
End?  [222GB]? 1100GB
Error: Can't have overlapping partitions.
(parted)  

Here we can see Disk of /dev/sda is totally: 1100GB.

And I want to resize part 1 with command resizepart <part number>. But failed because there are 2 partition after it.

4 Backup your data and remove the following partition.

 # delete swap partition
sudo swapoff -a
sudo parted /dev/sda rm 5

# delete the extended partition
sudo parted /dev/sda rm 2

5 Resize

 # Resize /dev/sda1
 sudo parted /dev/sda resizepart 1 1100GB

 # Resize the Filesystem
 sudo resize2fs /dev/sda1

6 Then you can see:

➜  ~ df -h
Filesystem             Size  Used Avail Use% Mounted on
...
/dev/sda1             1007G  194G  771G  21% /
...