Koozali.org: home of the SME Server

Increase lvm disk space (risolto)

Offline MicSme

  • ****
  • 243
  • +0/-0
Increase lvm disk space (risolto)
« on: May 03, 2023, 05:45:48 PM »
Ciao a tutti,
Per incrementare lo spazio su uno sme10 con hypervisor proxmox ho seguito questi step:
1-ho incrementato lo spazio disco (+250gb)
2-ho fatto il boot sulla vm con gparted ed ho esteso lo spazio da 500 a 750 gb
Questa la situazione dischi da console prima e dopo:
VGDISPLAY prima:
[root@sme10 ~]# vgdisplay
  --- Volume group ---
  VG Name               main
  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               <499,51 GiB
  PE Size               4,00 MiB
  Total PE              127874
  Alloc PE / Size       127873 / 499,50 GiB
  Free  PE / Size       1 / 4,00 MiB
  VG UUID               f81o8w-Gztf-uDDf-D5go-UZ7b-oJO6-5PjqGY

VGDISPLAY dopo:
[root@sme10 ~]# vgdisplay
  --- Volume group ---
  VG Name               main
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  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               <749,51 GiB
  PE Size               4,00 MiB
  Total PE              191874
  Alloc PE / Size       127873 / 499,50 GiB
  Free  PE / Size       64001 / 250,00 GiB
  VG UUID               f81o8w-Gztf-uDDf-D5go-UZ7b-oJO6-5PjqGY

parametro PE / Size 250 gb sembra tutto ok

situazione dischi:
[root@sme10 ~]# fdisk -l

Disk /dev/sda: 805.3 GB, 805306368000 bytes, 1572864000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Identificativo disco: 0x000b7d68

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048  1572863999   785918976   8e  Linux LVM

Disk /dev/mapper/main-root: 802.6 GB, 802630402048 bytes, 1567637504 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/main-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

anche qui sembra tutto ok ma purtroppo non è cosi se lancio il comando df
non è cambiato niente...

[root@sme10 ~]# df
File system           1K-blocchi     Usati Disponib. Uso% Montato su
devtmpfs                 2013620         0   2013620   0% /dev
tmpfs                    2022484         0   2022484   0% /dev/shm
tmpfs                    2022484       616   2021868   1% /run
tmpfs                    2022484         0   2022484   0% /sys/fs/cgroup
/dev/mapper/main-root  521415936 229206428 292209508  44% /
/dev/sda1                 508580     87792    420788  18% /boot
tmpfs                     404500         0    404500   0% /run/user/0

Grazie in anticipo per qualsiasi suggerimento.

-------------------
risolto con comando

lvresize --extents +100%FREE --resizefs /dev/mapper/main-root
--------------------

[root@sme10 ~]# df -h
File system            Dim. Usati Dispon. Uso% Montato su
devtmpfs               2,0G     0    2,0G   0% /dev
tmpfs                  2,0G     0    2,0G   0% /dev/shm
tmpfs                  2,0G  616K    2,0G   1% /run
tmpfs                  2,0G     0    2,0G   0% /sys/fs/cgroup
/dev/mapper/main-root  748G  219G    529G  30% /
/dev/sda1              497M   86M    411M  18% /boot
tmpfs                  396M     0    396M   0% /run/user/0





 
« Last Edit: May 03, 2023, 06:21:03 PM by MicSme »

Offline ReetP

  • *
  • 3,804
  • +5/-0
Re: Increase lvm disk space (risolto)
« Reply #1 on: May 04, 2023, 05:46:18 PM »
https://wiki.koozali.org/Raid:Growing#LVM:_Growing_the_PV

Sarebbe molto più semplice se avessi installato SME senza LVM.

Non ne hai bisogno quando Proxmox ha già LVM. È solo più sovraccarico e complessità.

Personalmente guarderei alla creazione di un nuovo server senza LVM e al backup/ripristino.

È quindi facile ridimensionare i dischi con gparted.

==================================

It would be much easier if you had installed SME without LVM.

You do not need it when Proxmox already has LVM. It is just more overhead and complexity.

Personally I would look at setting up a new server with without LVM and backup/restore to that.

It is then easy to resize disks with gparted.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline MicSme

  • ****
  • 243
  • +0/-0
Re: Increase lvm disk space (risolto)
« Reply #2 on: May 04, 2023, 06:19:51 PM »
correct observation thanks!


https://wiki.koozali.org/Raid:Growing#LVM:_Growing_the_PV

Sarebbe molto più semplice se avessi installato SME senza LVM.

Non ne hai bisogno quando Proxmox ha già LVM. È solo più sovraccarico e complessità.

Personalmente guarderei alla creazione di un nuovo server senza LVM e al backup/ripristino.

È quindi facile ridimensionare i dischi con gparted.

==================================

It would be much easier if you had installed SME without LVM.

You do not need it when Proxmox already has LVM. It is just more overhead and complexity.

Personally I would look at setting up a new server with without LVM and backup/restore to that.

It is then easy to resize disks with gparted.

Offline Jean-Philippe Pialasse

  • *
  • 2,818
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Increase lvm disk space (risolto)
« Reply #3 on: May 04, 2023, 07:53:10 PM »
all installations type have their drawbacks.

this point the fact that we have documented clearly raid+lvm with ext4 but not other variants, and need to update with xfs.