
Ich weiß, dass diese Frage vielleicht sehr elementarer Natur ist. Wenn mir also jemand eine Anleitung dazu zeigen kann und der Meinung ist, dass sich dieser Thread wiederholt, bearbeiten Sie ihn bitte nach Belieben. Ich habe herausgefunden, dass auf meinem Redhat-System auf /home
einem LVM mit einem xfs-Dateisystem auf /dev/mapper/rhel_home/
einer Partition gemountet ist, die etwa 200 GB groß ist. Das Problem ist nun, dass ich diese Partition in 4 50 GB große Partitionen aufteilen und /home
auf einer davon mounten und auf den anderen Partitionen ein anderes Verzeichnis mounten möchte. Wie mache ich das? Ich kann nicht verwenden gparted
, also würde ich es lieber über die Shell machen.
hier ist das Ergebnis des Befehls:
[root@localhost ~]# vgdisplay -v
Using volume group(s) on command line.
--- Volume group ---
VG Name rhel
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 232.34 GiB
PE Size 4.00 MiB
Total PE 59479
Alloc PE / Size 59463 / 232.28 GiB
Free PE / Size 16 / 64.00 MiB
VG UUID 400oqQ-ClvP-Vdmi-D8Nh-ib4t-Knhs-fAhPjP
--- Logical volume ---
LV Path /dev/rhel/swap
LV Name swap
VG Name rhel
LV UUID b9IZNi-zMmG-angt-slI7-WYIg-0pJZ-bOARHT
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2016-09-21 09:58:47 -0700
LV Status available
# open 2
LV Size 15.75 GiB
Current LE 4032
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1
--- Logical volume ---
LV Path /dev/rhel/home
LV Name home
VG Name rhel
LV UUID LoxHKf-atFU-Q246-cfMq-3ToY-o0jX-POnZg0
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2016-09-21 09:58:48 -0700
LV Status available
# open 1
LV Size 166.53 GiB
Current LE 42631
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:2
--- Logical volume ---
LV Path /dev/rhel/root
LV Name root
VG Name rhel
LV UUID eQdCo3-fPr0-Nh0y-8HAy-VBEE-uZyr-3qBsSs
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2016-09-21 09:58:50 -0700
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0
--- Physical volumes ---
PV Name /dev/sda2
PV UUID JGq039-2zfz-RJms-UI20-xVM9-R0xZ-LfRQ7S
PV Status allocatable
Total PE / Free PE 59479 / 16
Antwort1
Es gibt keine Möglichkeit,Teiltdas logische Volume (LV) /dev/mapper/rhel_home
. Sie könnten es auf 50 G verkleinern und dann drei weitere LVs (jeweils 50 G) erstellen.
Aber bevor Sie das ursprüngliche LV verkleinern, müssen Sie sein Dateisystem verkleinern. Dies istnicht möglich mit XFSWenn Sie noch ungenutzten Speicherplatz auf Ihrer Volume-Gruppe (VG) haben, können Sie einfach ein neues LV hinzufügen, Dateien auf das neue LV kopieren und das ursprüngliche LV entfernen.
Überprüfen Sie die Ausgabe vgdisplay
auf ungenutzten Speicherplatz (Free PE). Wenn nicht, müssen Sie vorübergehend eine weitere Festplatte hinzufügen, um Ihre Aufgabe zu erledigen.