Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
lpi1:lvm [2019/07/02 15:42] ingo_wichmann [Logical Volume & Dateisystem vergrößern] |
lpi1:lvm [2020/09/08 09:06] ingo_wichmann [LV anlegen] |
||
---|---|---|---|
Zeile 13: | Zeile 13: | ||
/etc/init.d/boot.lvm start | /etc/init.d/boot.lvm start | ||
chkconfig boot.lvm on | chkconfig boot.lvm on | ||
- | |||
- | Boot-Initialisierung einrichten: ( Debian -6) | ||
- | service lvm2 start | ||
- | /etc/init.d/lvm2 start | ||
LVM-Partition anlegen: | LVM-Partition anlegen: | ||
Zeile 36: | Zeile 32: | ||
====== LV anlegen ====== | ====== LV anlegen ====== | ||
- | erstes Physical Volume anlegen: | + | erstes Physical Volume anlegen: (optional) |
pvcreate /dev/sda2 | pvcreate /dev/sda2 | ||
Zeile 47: | Zeile 43: | ||
vgcreate vg_system /dev/sda2 | vgcreate vg_system /dev/sda2 | ||
- | Volume Group aktivieren: | + | Volume Group aktivieren: (optional) |
vgchange -a y vg_system | vgchange -a y vg_system | ||
Zeile 108: | Zeile 104: | ||
mount -o ro,nouuid,norecovery /dev/vg_system/lv_snapshot /mnt/snapshot1 | mount -o ro,nouuid,norecovery /dev/vg_system/lv_snapshot /mnt/snapshot1 | ||
)) | )) | ||
- | (( <del>Vorsicht bei XFS, das Snapshot wird nicht lesbar sein. Generell eine gute Idee, das Volume vorher read-only zu mounten</del> Ich glaube das stimmt nicht mehr. Siehe ''man fsfreeze''. )) | ||
== Snapshot entfernen == | == Snapshot entfernen == | ||
Zeile 116: | Zeile 111: | ||
zweites Physical Volume anlegen: | zweites Physical Volume anlegen: | ||
pvcreate /dev/sda3 | pvcreate /dev/sda3 | ||
+ | vgextend vg_system /dev/sda3 | ||
pvmove /dev/sda2 | pvmove /dev/sda2 | ||
- | vgreduce myvg /dev/sda2 | + | vgreduce vg_system /dev/sda2 |
pvremove /dev/sda2 | pvremove /dev/sda2 | ||
====== Hinweise ====== | ====== Hinweise ====== |