Proxmox

From PostgreSQL_wiki
Revision as of 19:46, 31 May 2023 by Martin (talk | contribs) (Technische oplossingen)
Jump to: navigation, search

Technische oplossingen

Resize disk LVM

Dit zijn de stappen:

  • Vergroot de disk via de GUI, bijvoorbeeld van 12Gb naar 24Gb
  • parted /dev/vda
  • (parted) print
(parted) print                                                            
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 25.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  256MB   255MB   primary   ext2         boot
 2      257MB   12.9GB  12.6GB  extended
 5      257MB   12.9GB  12.6GB  logical                lvm
  • (parted) resizepart 2 100%
  • (parted) print
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 25.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  256MB   255MB   primary   ext2         boot
 2      257MB   25.8GB  25.5GB  extended
 5      257MB   12.9GB  12.6GB  logical                lvm
  • (parted) resizepart 5 100%
  • (parted) print
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 25.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  256MB   255MB   primary   ext2         boot
 2      257MB   25.8GB  25.5GB  extended
 5      257MB   25.8GB  25.5GB  logical                lvm
  • (parted) quit
  • Bepaal het physical volume
root@pdnswhpdcsw1:~# pvs
  PV         VG              Fmt  Attr PSize   PFree
  /dev/sda5  vg-root-install lvm2 a--  <11.76g    0 
  • Resize het logical volume
root@pdnswhpdcsw1:~# pvresize /dev/sda5
  Physical volume "/dev/sda5" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized
  • Bekijk het vogical volume
root@pdnswhpdcsw1:~# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/vg-root-install/root
  LV Name                root
  VG Name                vg-root-install
  LV UUID                Ew6hJI-33MH-30nU-ZCAv-bLu2-CZNO-NKiYLm
  LV Write Access        read/write
  LV Creation host, time pdnswhpdcsw1, 2020-08-28 22:03:43 +0000
  LV Status              available
  # open                 1
  LV Size                11.55 GiB
  Current LE             2957
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0
  • Resize het logical volume met de resizefs optie
root@pdnswhpdcsw1:~# lvresize --extents +100%FREE --resizefs /dev/vg-root-install/root
  Size of logical volume vg-root-install/root changed from 11.55 GiB (2957 extents) to 23.55 GiB (6029 extents).
  Logical volume vg-root-install/root successfully resized.
resize2fs 1.44.5 (15-Dec-2018)
Filesystem at /dev/mapper/vg--root--install-root is mounted on /; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 3
The filesystem on /dev/mapper/vg--root--install-root is now 6173696 (4k) blocks long.
  • Doe hierna de controle met df -h van het volume.
root@pdnswhpdcsw1:~# df -h .
Filesystem                          Size  Used Avail Use% Mounted on
/dev/mapper/vg--root--install-root   24G   12G   12G  51% /

Bron: https://pve.proxmox.com/wiki/Resize_disks

Ethernet configuratie

Probleem: Connectie gaat verloren Oplossing: ethtool -K eth0 tx off rx off


Terug naar: Main Page