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

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
L
LangChain Blog
I
InfoQ
D
Docker
F
Fortinet All Blogs
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
月光博客
月光博客
B
Blog
Engineering at Meta
Engineering at Meta
T
Tailwind CSS Blog
罗磊的独立博客
博客园_首页
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
IT之家
IT之家
V
V2EX

Lucien's Blog

Webhook 配置备忘 - Lucien's Blog zsh 配置备忘 - Lucien's Blog 从零开始实践大模型 - 模型推理 - Lucien's Blog 从零开始实践大模型 - 配置环境 - Lucien's Blog 从零开始实践大模型 - 安装系统 - Lucien's Blog 自建 Docker 镜像源 - Lucien's Blog 使用 300 元的显卡推理 Qwen1.5-14B - Lucien's Blog WireGuard 配置备忘 - Lucien's Blog 各种 mirror 备忘 - Lucien's Blog
ubuntu 扩容逻辑卷 - Lucien's Blog
博主: Lucien · 2023-10-14 · via Lucien's Blog

请注意,本文编写于 970 天前,最后修改于 970 天前,其中某些信息可能已经过时。

本文地址:blog.lucien.ink/archives/543

Ubuntu 22.04 LTS 在安装过程中默认只使用 100G 的硬盘,执行以下命令即可扩容:

$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  100G   11G  89G   11% /

$ lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/ubuntu-lv
  LV Name                ubuntu-lv
  VG Name                ubuntu-vg
  LV Write Access        read/write
  LV Creation host, time ubuntu-server, 2023-10-11 10:53:11 +0000
  LV Status              available
  # open                 1
  LV Size                100 GB
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     512
  Block device           253:0

$ lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv

$ resize2fs /dev/ubuntu-vg/ubuntu-lv

$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  3.5T   11G  3.3T   1% /

赞赏作者

谢谢老板!