Dariusz Żbik
Transkrypt
Dariusz Żbik
LVM Dariusz Żbik LVM – motywacja Połączenie dostępnej przestrzeni dyskowej w jedną logiczną całość LVM – grupa wolumenów złożona z wolumenów fizycznych “ extendy” fizyczne grupa wolumenów wolumeny fizyczne LVM – tworzenie wolumenu logicznego LVM – powiększenie wolumenu logicznego (z wolnych extendów) LVM – rozbudowa grupy wolumenu logicznego LVM – usunięcie PV przez przeniesienie odp. extendów LVM – tworzenie kopii lustrzanej (mirror) LVM – dodanie kopii lustrzanej do istniejącego wolumenu log. LVM – lvdisplay – wyświetlenie własności wolumenu log. [root@host root]# lvdisplay m /dev/vg00/tmp Logical volume LV Name /dev/vg00/tmp VG Name vg00 LV UUID 1VasLjg0Waoav0XAQ5s9neeW73n1LOR8 LV Write Access read/write LV Status available # open 1 LV Size 516.00 MB Current LE 129 Segments 2 Allocation next free (default) Read ahead sectors 0 Block device 253:3 Segments Logical extent 0 to 127: Type linear Physical volume /dev/hda4 Physical extents 1984 to 2111 Logical extent 128 to 128: Type linear Physical volume /dev/hda4 Physical extents 6887 to 6887 podkatalog /dev/vgXX [root@host root]# ls l /dev/vg00/ total 0 lrwxrwxrwx 1 root root 21 Oct 6 17:41 home > /dev/mapper/vg00home lrwxrwxrwx 1 root root 20 Oct 6 17:41 opt > /dev/mapper/vg00opt lrwxrwxrwx 1 root root 21 Oct 18 23:23 swap > /dev/mapper/vg00swap lrwxrwxrwx 1 root root 20 Oct 18 23:24 tmp > /dev/mapper/vg00tmp lrwxrwxrwx 1 root root 20 Oct 6 17:41 usr > /dev/mapper/vg00usr lrwxrwxrwx 1 root root 20 Oct 6 17:41 var > /dev/mapper/vg00var [root@host root]# ls l /dev/mapper/ total 0 crw 1 root root 10, 63 Oct 6 17:41 control brw 1 root root 253, 4 May 20 23:51 vg00home brw 1 root root 253, 2 May 20 23:51 vg00opt brw 1 root root 253, 9 May 20 23:51 vg00swap brw 1 root root 253, 3 May 20 23:51 vg00tmp brw 1 root root 253, 0 May 20 23:51 vg00usr brw 1 root root 253, 1 May 20 23:51 vg00var Device mapper - tablice [root@host root]# dmsetup table vg00home: 0 10485760 linear 3:4 17301888 vg00tmp: 0 1048576 linear 3:4 16253312 vg00tmp: 1048576 8192 linear 3:4 56418688 vg00usr: 0 13631488 linear 3:4 384 vg00swap: 0 516096 linear 3:4 55902592 vg00var: 0 2097152 linear 3:4 13631872 vg00opt: 0 524288 linear 3:4 15729024 Segments Logical extent 0 to 127: Type linear Physical volume /dev/hda4 Physical extents 1984 to 2111 Logical extent 128 to 128: Type linear Physical volume /dev/hda4 Physical extents 6887 to 6887 LVM – wady ● ● ● utrudniona operacja przenoszenia dysków między komputerami znaczenie utrudniona możliwość odratowania danych z uszkodzonych dysków utrudniony start systemu