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% /
相关推荐
云空18 小时前
《XUbuntu 终端完整命令大全》
linux·前端·chrome·ubuntu·xubuntu
北城笑笑20 小时前
Server 18 ,Nginx + Vite 前端部署排错实战:从 `/api/gpt/chat` 404 到 9012 后端服务的完整定位过程
linux·运维·前端·nginx·ubuntu·vue
小小的木头人21 小时前
Ubuntu 20.04 离线安装最新版 Firefox 浏览器
ubuntu·firefox
时空无限1 天前
ubuntu dpkg -l 输出第一列解释
linux·运维·ubuntu
叮咚侠2 天前
Ubuntu 24.04 安装zabbix-agent 5.0 服务
linux·ubuntu·zabbix·zabbix-agent
bosins2 天前
将 Hyper-V 上的 Ubuntu 虚拟机内容迁移到 WSL (Windows Subsystem for Linux) 中
linux·windows·ubuntu
Matt今年18岁2 天前
自动检测校园网状态,自动联网并恢复 Ubuntu 下的 ToDesk 连接
运维·服务器·开发语言·pytorch·python·ubuntu
王坊兴2 天前
Ubuntu 部署产品原型静态服务器:SFTP + Nginx
服务器·nginx·ubuntu
breeze jiang2 天前
TypeScript 工具类型怎么记:从 Pick、Omit 到 keyof 与 Exclude 推导
linux·ubuntu·typescript
运维全栈笔记2 天前
Ubuntu 24.04 Certbot 自动化SSL证书配置指南
linux·运维·服务器·nginx·ubuntu·自动化·ssl