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% /
相关推荐
瓦瓦gogo1 天前
从一个 TypeScript 函数开始理解 MCP 协议
linux·ubuntu·typescript
鱼听禅1 天前
Ubuntu安装YOLOv8进行菌落识别训练
linux·python·yolo·ubuntu
Zucker n2 天前
文献发现、课题组织与证据可追溯的论文阅读。
论文阅读·windows·ubuntu
qq_371802115 天前
Ubuntu Linux中安装WorkBuddy
linux·运维·服务器·ubuntu
且从容.6 天前
Ubuntu安装flume
linux·ubuntu·flume
承渊政道6 天前
Linux网络学习【Reactor反应堆模式】
linux·网络·学习·ubuntu·reactor
且从容.6 天前
ubuntu安装flink
linux·ubuntu·flink
Linux-lucky7 天前
45-Linux学习之旅之防火墙与WEB加固
linux·前端·网络·学习·ubuntu
禁默7 天前
启元 Q1 二次开发实践:Ubuntu 部署与仿真验证,从 PrimeConsole 到 ROS 2 Humble + RViz
linux·运维·ubuntu
skywalk81637 天前
把 去也网站 从 Ubuntu 搬到 FreeBSD:一次 Service Jail + nginx 的部署实录
linux·运维·nginx·ubuntu·freebsd