Difference between revisions of "Proxmox"

From PostgreSQL_wiki
Jump to: navigation, search
(Resize disk LVM)
Line 2: Line 2:
 
=== Resize disk LVM ===
 
=== Resize disk LVM ===
 
Dit zijn de stappen:
 
Dit zijn de stappen:
# Vergroot de disk via de GUI, bijvoorbeeld van 12Gb naar 24Gb
+
* Vergroot de disk via de GUI, bijvoorbeeld van 12Gb naar 24Gb
# parted /dev/vda
+
* parted /dev/vda
# (parted) print
+
* (parted) print
 
<pre>
 
<pre>
 
(parted) print
 
(parted) print
Line 18: Line 18:
 
5 257MB 12.9GB 12.6GB logical lvm
 
5 257MB 12.9GB 12.6GB logical lvm
 
</pre>
 
</pre>
# (parted) resizepart 2 100%
+
* (parted) resizepart 2 100%
# (parted) print
+
* (parted) print
 
<pre>
 
<pre>
 
Model: QEMU QEMU HARDDISK (scsi)
 
Model: QEMU QEMU HARDDISK (scsi)
Line 32: Line 32:
 
5 257MB 12.9GB 12.6GB logical lvm
 
5 257MB 12.9GB 12.6GB logical lvm
 
</pre>
 
</pre>
# (parted) resizepart 5 100%
+
* (parted) resizepart 5 100%
# (parted) print
+
* (parted) print
 
<pre>
 
<pre>
 
Model: QEMU QEMU HARDDISK (scsi)
 
Model: QEMU QEMU HARDDISK (scsi)
Line 46: Line 46:
 
5 257MB 25.8GB 25.5GB logical lvm
 
5 257MB 25.8GB 25.5GB logical lvm
 
</pre>
 
</pre>
# (parted) quit
+
* (parted) quit
# Bepaal het physical volume
+
* Bepaal het physical volume
 
<pre>
 
<pre>
 
root@pdnswhpdcsw1:~# pvs
 
root@pdnswhpdcsw1:~# pvs
Line 53: Line 53:
 
/dev/sda5 vg-root-install lvm2 a-- <11.76g 0
 
/dev/sda5 vg-root-install lvm2 a-- <11.76g 0
 
</pre>
 
</pre>
# Resize het logical volume
+
* Resize het logical volume
 
<pre>
 
<pre>
 
root@pdnswhpdcsw1:~# pvresize /dev/sda5
 
root@pdnswhpdcsw1:~# pvresize /dev/sda5
Line 59: Line 59:
 
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
 
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
 
</pre>
 
</pre>
# Bekijk het vogical volume
+
* Bekijk het vogical volume
 
<pre>
 
<pre>
 
root@pdnswhpdcsw1:~# lvdisplay
 
root@pdnswhpdcsw1:~# lvdisplay
Line 79: Line 79:
 
Block device 254:0
 
Block device 254:0
 
</pre>
 
</pre>
# Resize het logical volume met de resizefs optie
+
* Resize het logical volume met de resizefs optie
 
<pre>
 
<pre>
 
root@pdnswhpdcsw1:~# lvresize --extents +100%FREE --resizefs /dev/vg-root-install/root
 
root@pdnswhpdcsw1:~# lvresize --extents +100%FREE --resizefs /dev/vg-root-install/root
Line 89: Line 89:
 
The filesystem on /dev/mapper/vg--root--install-root is now 6173696 (4k) blocks long.
 
The filesystem on /dev/mapper/vg--root--install-root is now 6173696 (4k) blocks long.
 
</pre>
 
</pre>
# Doe hierna de controle met df -h van het volume.
+
* Doe hierna de controle met df -h van het volume.
 
<pre>
 
<pre>
 
root@pdnswhpdcsw1:~# df -h .
 
root@pdnswhpdcsw1:~# df -h .
Line 95: Line 95:
 
/dev/mapper/vg--root--install-root 24G 12G 12G 51% /
 
/dev/mapper/vg--root--install-root 24G 12G 12G 51% /
 
</pre>
 
</pre>
  +
 
=== Ethernet configuratie ===
 
=== Ethernet configuratie ===
 
Probleem: Connectie gaat verloren
 
Probleem: Connectie gaat verloren

Revision as of 19:45, 31 May 2023

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% /

Ethernet configuratie

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


Terug naar: Main Page