0

I have the following disks lsblk

  lsblk
  lsblk
  NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
  loop0                       7:0    0  63,9M  1 loop /snap/core20/2182
  loop1                       7:1    0  63,9M  1 loop /snap/core20/2264
  loop2                       7:2    0    87M  1 loop /snap/lxd/27948
  loop3                       7:3    0    87M  1 loop /snap/lxd/27428
  loop4                       7:4    0  39,1M  1 loop /snap/snapd/21184
  loop5                       7:5    0  38,7M  1 loop /snap/snapd/21465
  sda                         8:0    1   931G  0 disk
  ├─sda1                      8:1    1     1G  0 part /boot/efi
  ├─sda2                      8:2    1     2G  0 part /boot
  └─sda3                      8:3    1 927,9G  0 part
    └─ubuntu--vg-ubuntu--lv 253:0    0   100G  0 lvm  /
  sr0                        11:0    1  1024M  0 rom

Why does it say I have an LV with only 100GB when the sum of sda1-3 is more than 100GB?

lspci -knn | grep 'RAID bus controller'
01:00.0 RAID bus controller [0104]: Adaptec Series 8 12G SAS/PCIe 3 [9005:028d] (rev 01)

lsscsi
[0:0:0:0]    disk    ASR8405  Raid1 Mirror     V1.0  /dev/sda
[0:1:0:0]    disk    ATA      PNY 1TB SATA SSD 215a  -
[0:1:1:0]    disk    ATA      PNY 1TB SATA SSD 215a  -
[2:0:0:0]    cd/dvd  ASUS     DRW-24D5MT       2.00  /dev/sr0

Hope you can help me I have no clue about this stuff, unfortunately :-(

I tried parted

(parted) print all
Model: ASR8405 Raid1 Mirror (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1128MB  1127MB  fat32              boot, esp
 2      1128MB  3276MB  2147MB  ext4
 3      3276MB  1000GB  996GB


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End    Size   File system  Flags
 1      0,00B  107GB  107GB  ext4


(parted) resizepart 3 996G
Warning: Shrinking a partition can cause data loss, are you sure you want to continue?
Yes/No? No
(parted)

But in order to not lose data I fear to proceed also because I do not know if this is the problem I'm facing.

OK now I tried

lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/ubuntu-lv
  LV Name                ubuntu-lv
  VG Name                ubuntu-vg
  LV UUID                1lveHV-7kL0-UcbK-3AoX-Oczm-3l1t-rFVpY3
  LV Write Access        read/write
  LV Creation host, time ubuntu-server, 2024-02-12 19:05:57 +0100
  LV Status              available
  # open                 1
  LV Size                100,00 GiB
  Current LE             25600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

lvextend -L +996G /dev/ubuntu-vg/ubuntu-lv
  Insufficient free space: 254976 extents needed, but only 211951 available

lvextend -L +211951 /dev/ubuntu-vg/ubuntu-lv
  Rounding size to boundary between physical extents: 206,98 GiB.
  Size of logical volume ubuntu-vg/ubuntu-lv changed from 100,00 GiB (25600 extents) to 306,98 GiB (78588 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.

OK this has worked for me

lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
  Size of logical volume ubuntu-vg/ubuntu-lv changed from 306,98 GiB (78588 extents) to 927,93 GiB (237551 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.

but df -h hasn't changed at all

Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              6,3G  3,2M  6,3G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   59G   35G  63% /
tmpfs                               32G     0   32G   0% /dev/shm
tmpfs                              5,0M     0  5,0M   0% /run/lock
/dev/sda2                          2,0G  253M  1,6G  14% /boot
/dev/sda1                          1,1G  6,1M  1,1G   1% /boot/efi
tmpfs                              6,3G  4,0K  6,3G   1% /run/user/1000

So I still can not use the Disk space (even after rebooting)

6
  • You probably just need to extend the logical volume and filesystem to use the more (or all) of the physical volume - see for example Resize the root partition of Ubuntu 20.04 with an lvm partition Commented Apr 22 at 13:12
  • Hi steeldriver I tried it but I'm not sure what happens to the data Commented Apr 22 at 13:35
  • @karel partly it helped now and added the remaining GBs but still df finds only ~100 GB :-( Commented Apr 22 at 14:21
  • 2
    Since you didn't add -r or --resizefs to the successful lvresize command, you will need to run resize2fs separately (step 4 of the linked answer) Commented Apr 22 at 14:59
  • @steeldriver you are right now it works - I guess you can mark the question now as a duplicate then. Thank you for helping! Commented Apr 23 at 6:55

0

You must log in to answer this question.

Browse other questions tagged .