Disk partition and size problem

caplam

Active Member
Nov 14, 2018
19
0
41
Hello,

I have a vm with a boot disk on lvm-local.
I have attached a second disk to the host (by uuid)
On the disk i created a lv in which i created a second disk for my guest.
The physical disk is a 937Gb
The guest disk was 282Gb
I resized it to 350Gb.
Code:
 --- Logical volume ---
  LV Name                lvdocker
  VG Name                vgdocker
  LV UUID                1CY4KS-7dZr-0C7i-QApW-Zuli-jXJd-75eKW9
  LV Write Access        read/write
  LV Creation host, time pve, 2018-11-15 09:31:20 +0100
  LV Pool metadata       lvdocker_tmeta
  LV Pool data           lvdocker_tdata
  LV Status              available
  # open                 2
  LV Size                498.00 GiB
  Allocated pool data    49.25%
  Allocated metadata     0.60%
  Current LE             127488
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4
 
  --- Logical volume ---
  LV Path                /dev/vgdocker/vm-106-disk-0
  LV Name                vm-106-disk-0
  VG Name                vgdocker
  LV UUID                FZLZZP-UdCU-9gn0-Zmhx-QPGr-GcfH-2qohpk
  LV Write Access        read/write
  LV Creation host, time pve, 2018-11-15 09:56:11 +0100
  LV Pool name           lvdocker
  LV Status              available
  # open                 1
  LV Size                350.00 GiB
  Mapped size            70.08%
  Current LE             89600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:6

In my guest i see that:
Code:
fdisk -l

Disque /dev/sdb : 350 GiB, 375809638400 octets, 734003200 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : gpt
Identifiant de disque : BFBD7680-147B-448F-A223-D3F9E9B86358
Périphérique Début       Fin  Secteurs Taille Type
/dev/sdb1     2048 591394815 591392768   282G Système de fichiers Linux

but when i want to resize the partition with parted i have that:
Code:
(parted) print free                                                      

Model: QEMU QEMU HARDDISK (scsi)

Disk /dev/sdb: 376GB

Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number  Start   End     Size    File system  Name  Flags
        17,4kB  1049kB  1031kB  Free Space
1      1049kB  303GB   303GB   ext4
         303GB   376GB   73,0GB  Free Space
what do i need to do ?
If i resize the part 1 to occupy free space i will have problems?
 
Last edited:
il faut peut etre mettre le format de ta partition dans le montage exemple: -t ext3
 
Finally i umounted my partition and with fdisk i destroyed and recreated it at 349G (wasn't possible at 350G).
Then i resized the fs.
the only weird thing is that parted doesn't see the right size (375G).