ubuntu 扩容逻辑卷

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

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

shell 复制代码
$ 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% /
相关推荐
缘友一世19 小时前
GLM5.3 CyberSec w4A16本地部署[6]:加载链路与磁盘规划
ubuntu·vllm·glm5.3 cybersec
张张123y1 天前
2026 Agent 框架怎么选?拆 3 层底层逻辑(运行循环 / 记忆 / 工具协议)+ 一张决策表
linux·ubuntu·microsoft·langgraph·mcp·crewai·agent 框架
longerxin20201 天前
Ubuntu 22.04 ARM64 云镜像开启 root 密钥登录(保留 ubuntu 密钥登录,禁止密码登录)
数据库·ubuntu·postgresql
skywalk81631 天前
FreeBSD仿真环境里的Ubuntu linux系统,安装软件的时候不支持snap怎么办?
linux·运维·ubuntu·系统·freebsd
Cry丶1 天前
ubuntu安装vsftpd
服务器·网络·ubuntu
程序员-King.2 天前
【ROS1】Noetic 开发工作流程与常用命令
c++·ubuntu·ros
承渊政道2 天前
Linux网络学习【传输层协议UDP】
linux·网络·网络协议·学习·ubuntu·udp
pirateeee2 天前
在ubuntu中通过 docker 搭建 yocto 开发环境
ubuntu·docker·eureka
缘友一世2 天前
GLM5.3 CyberSec w4A16本地部署[5]:卸载换显存的边界
ubuntu·vllm·glm5.3 cybersec
bjxiaxueliang3 天前
一文自建STUN:在Ubuntu上分步搭建STUN服务
linux·运维·ubuntu