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% /
相关推荐
晚风吹长发2 小时前
Docker基础——Docker Network(网络详解)
linux·运维·网络·ubuntu·docker·容器
Sisphusssss5 小时前
香橙派5plus GPIO
linux·python·ubuntu
半句唐诗13 小时前
Ubuntu 离线安装 OpenSpec CLI、CodeGraph CLI 与相关工具实战笔记
ubuntu·arcgis
如若12313 小时前
Ubuntu 无 sudo 安装花生壳并实现 SSH 内网穿透:Conda 环境部署、冲突排查与自动启动
linux·运维·ubuntu·ssh·内网穿透
Better Bench1 天前
WSL2 Ubuntu 中 Claude CLI “command not found” 故障排查与修复
linux·ubuntu·claude·wsl·claudecode
LSG_Dawn1 天前
XBOX360 kinect + ROS2_humble
ubuntu·深度相机
jing.wang_20251 天前
NVIDIA CUDA C++编程环境搭建--Windows + Ubuntu 22.04
c++·windows·ubuntu·gpu算力
黑白园2 天前
个人台式机VMware 15及Ubuntu 16.04.5卸载以及VMware 16.2.3及Ubuntu 24.04.4安装
linux·ubuntu
想你依然心痛2 天前
从监控数据到告警管理:Prometheus与Alertmanager部署实战
ubuntu·prometheus·内网穿透·系统监控·cpolar·告警管理
黑白园3 天前
解决服务器拒绝连接导致ubuntu镜像无法下载问题 https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/
ubuntu