Você já alocou todos os PE no VG 0 para o volume lógico.
Faça lvs
para descobrir qual LV que está associado ao VG 0 e encontre o tamanho de LV comparado.
Eu tenho um servidor dedicado usando o LVM. Estou seguindo um guia no Ubuntu docs que diz:
sudo lvcreate -L 10G -n lv_vm_ubuntu / dev / [VGNAME]
Como meu nome do grupo de volumes lógicos é 0
, tentei criar um novo volume lógico usando:
sudo lvcreate -L 20G -n lv_vm_ubuntu /dev/0
Mas o seguinte erro foi enviado:
Volume group "0" has insufficient free space (0 extents): 5120 required.
Aqui estão informações sobre meus discos:
sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
Saída:
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 223.6G
└─sda1 LVM2_member 223.6G
├─0-swap (dm-0) swap 7.5G [SWAP]
└─0-root (dm-1) ext4 216.1G /
sdb 931.5G
└─sdb1 linux_raid_member 931.5G ubuntu:0
└─md0 ext4 931.4G /mnt/md0
sdc 931.5G
└─sdc1 linux_raid_member 931.5G ubuntu:0
└─md0 ext4 931.4G /mnt/md0
cat /etc/fstab
Saída
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/0-root / ext4 errors=remount-ro 0 1
# /mnt/md0 was on /dev/md0 during installation
UUID=bc5a499c-af64-467c-b9af-bc84af26e23c /mnt/md0 ext4 defaults 0 2
/dev/mapper/0-swap none swap sw 0 0
vgs
Saída:
VG #PV #LV #SN Attr VSize VFree
0 1 2 0 wz--n- 223.57g 0
vgdisplay
Saída:
--- Volume group ---
VG Name 0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 223.57 GiB
PE Size 4.00 MiB
Total PE 57233
Alloc PE / Size 57233 / 223.57 GiB
Free PE / Size 0 / 0
VG UUID RC1AXq-ev6F-ll0T-6COG-9yPU-OaSV-hjeSKB
O que estou fazendo de maneira incorreta?
ATUALIZAÇÃO:
lvs
Saída:
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
root 0 -wi-ao--- 216.12g
swap 0 -wi-ao--- 7.45g
Você já alocou todos os PE no VG 0 para o volume lógico.
Faça lvs
para descobrir qual LV que está associado ao VG 0 e encontre o tamanho de LV comparado.