大网数据广告活动
服务器运维问答

Ubuntu server only uses a part of the available disk space

· 52CE 我爱测

So i have a 240 GB ssd in my server, but i notized when i login it always shows me Usage of /: 56.6% of 108.79GB So i started to look a bit deeper when i use lsblk the following is printed out: NAME MAJ:MIN RM SIZE RO TYPE MOUNTP…

问题原文

原帖链接 · Pascal Heßler · CC BY-SA 4.0

So i have a 240 GB ssd in my server, but i notized when i login it always shows me
Usage of /: 56.6% of 108.79GB

So i started to look a bit deeper when i use lsblk the following is printed out:

NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0  52.4M  1 loop /snap/certbot/579
loop1                       7:1    0  96.6M  1 loop /snap/core/9804
loop2                       7:2    0  97.1M  1 loop /snap/core/9993
loop3                       7:3    0  29.9M  1 loop /snap/snapd/8790
loop4                       7:4    0  30.3M  1 loop /snap/snapd/9279
loop5                       7:5    0    61M  1 loop /snap/core20/634
loop6                       7:6    0  55.3M  1 loop /snap/core18/1885
sda                         8:0    0 223.6G  0 disk
├─sda1                      8:1    0   512M  0 part /boot/efi
├─sda2                      8:2    0     1G  0 part /boot
└─sda3                      8:3    0 222.1G  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0   111G  0 lvm  /

with sudo parted /dev/sda print im getting this

Model: ATA CT240BX200SSD1 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  538MB   537MB   fat32              boot, esp
 2      538MB   1612MB  1074MB  ext4
 3      1612MB  240GB   238GB

So im no expert at all but for me it looks like that the partition (sda3) has the correct size, but ubuntu only uses half of the space? Additionaly i noticed that parted shows no file system for sda3, thats strange, isnt it?

So is there somebody who can explain what is happening here and how to fix it. To be clear i want that the system can use all of the space not only half of it.

Update info

pvs

PV         VG        Fmt  Attr PSize    PFree
/dev/sda3  ubuntu-vg lvm2 a--  <222.07g 111.03g

vgs

VG        #PV #LV #SN Attr   VSize    VFree
ubuntu-vg   1   1   0 wz--n- <222.07g 111.03g

lvs

LV        VG        Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- <111.04g

已采纳解答

原帖链接 · Bob · CC BY-SA 4.0

It looks like the disk was split in three partitions:

The fist partition is labeled and formatted as fat32 and mounted on /boot/efi

The second partition is labeled and formatted as ext4 and mounted on /boot

The remainder of the disks makes up sda3 and is not labeled as a specific file system.
It is managed by the linux logical volume manager. Check with pvdisplay. Physical storage managed by Linux LVM gets managed in a volume group and can be assigned to none or more (what’s in a name) logical volumes. Those logical volumes can in turn be formatted with file systems and mounted.

Possibly not all physical storage is assigned to logical volumes. Check for “free PE” in for instance the pvdisplay and vgdisplay output

Unassigned storage can be used to grow existing logical volumes and file systems or be used for new volumes and file systems , depending on your needs and preferences

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-09-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。