Linux Systempartition erweitern/en: Unterschied zwischen den Versionen
(Übernehme Bearbeitung einer neuen Version der Quellseite) |
Keine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
<languages/> | <languages/> | ||
== Create partition == | == Create partition == | ||
Please first run the following command:<br> | Please first run the following command:<br> | ||
Zeile 28: | Zeile 27: | ||
== Expand existing LVM volume == | == Expand existing LVM volume == | ||
The existing volume is expanded to include the new free storage space:<br> | The existing volume is expanded to include the new free storage space:<br> | ||
''lvextend | ''lvextend /dev/ubuntu-vg/root –l +100%FREE''<br> | ||
<br> | <br> | ||
Finally, the file system must be expanded in order to be able to use the new storage space:<br> | Finally, the file system must be expanded in order to be able to use the new storage space:<br> | ||
Zeile 38: | Zeile 35: | ||
[[File:resize2fs.png|border|resize]]<br> | [[File:resize2fs.png|border|resize]]<br> | ||
<br> | <br> | ||
Aktuelle Version vom 21. Februar 2024, 12:15 Uhr
Create partition
Please first run the following command:
cfdisk
First, a new partition must be created. To do this, navigate to the empty memory and select “New” below.
The suggested size can be adopted. Next the type needs to be changed. To do this, select Type and select LVM (8e) as type.
Then complete the changes with Write and exit cfdisk with Quit.
Add partition to LVM
First perform a “rescan” with partprobe so that the previously created partition is found.
In this example sda3. This can of course vary.
In the next step we add the partition to the LVM with the following command:
vgextend ubuntu-vg /dev/sda3
Using the pvs command you should now see the following:
Expand existing LVM volume
The existing volume is expanded to include the new free storage space:
lvextend /dev/ubuntu-vg/root –l +100%FREE
Finally, the file system must be expanded in order to be able to use the new storage space:
df –h
resize2fs /dev/mapper/ubuntu—vg-root