klonirovanie_diska_dobavlennogo_v_lvm
Различия
Показаны различия между двумя версиями страницы.
| Следующая версия | Предыдущая версия | ||
| klonirovanie_diska_dobavlennogo_v_lvm [2016/12/04 22:08] – создано daniil | klonirovanie_diska_dobavlennogo_v_lvm [Дата неизвестна] (текущий) – внешнее изменение (Дата неизвестна) 127.0.0.1 | ||
|---|---|---|---|
| Строка 15: | Строка 15: | ||
| / | / | ||
| </ | </ | ||
| + | |||
| + | ---- | ||
| ===== Исходные данные ===== | ===== Исходные данные ===== | ||
| Строка 22: | Строка 24: | ||
| </ | </ | ||
| - | < | + | < |
| --- Physical volume --- | --- Physical volume --- | ||
| PV Name / | PV Name / | ||
| Строка 33: | Строка 35: | ||
| Allocated PE 255 | Allocated PE 255 | ||
| PV UUID | PV UUID | ||
| - | </ | + | </code></ |
| + | \\ | ||
| <code bash> | <code bash> | ||
| vgdisplay | vgdisplay | ||
| </ | </ | ||
| - | < | + | < |
| --- Volume group --- | --- Volume group --- | ||
| VG Name vg00 | VG Name vg00 | ||
| Строка 60: | Строка 62: | ||
| Free PE / Size 0 / 0 | Free PE / Size 0 / 0 | ||
| VG UUID | VG UUID | ||
| + | </ | ||
| + | \\ | ||
| + | <code bash> | ||
| + | lvdisplay | ||
| </ | </ | ||
| + | |||
| + | < | ||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name lv01 | ||
| + | VG Name vg00 | ||
| + | LV UUID ZZ29Ki-aPTh-62Ad-PWGu-jykB-PHxr-K7sm9l | ||
| + | LV Write Access | ||
| + | LV Creation host, time i-8745-35715-VM, | ||
| + | LV Status | ||
| + | # open 0 | ||
| + | LV Size 508,00 MiB | ||
| + | Current LE 127 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 8192 | ||
| + | Block device | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name lv02 | ||
| + | VG Name vg00 | ||
| + | LV UUID gVX1e2-cTOd-iwSj-iSXf-4NIi-pRBY-eYRXSS | ||
| + | LV Write Access | ||
| + | LV Creation host, time i-8745-35715-VM, | ||
| + | LV Status | ||
| + | # open 0 | ||
| + | LV Size 512,00 MiB | ||
| + | Current LE 128 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 8192 | ||
| + | Block device | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | \\ | ||
| + | ---- | ||
| + | |||
| + | ===== Решение ===== | ||
| + | Для решения такой проблемы имеется утилита **vgimportclone**: | ||
| + | |||
| + | < | ||
| + | vgimportclone -n old_vg_name new_pv | ||
| + | </ | ||
| + | |||
| + | * В контексте нашего примера выполняем: | ||
| <code bash> | <code bash> | ||
| - | lvdisplay | + | vgimportclone -n vg00 /dev/vdc |
| </ | </ | ||
| < | < | ||
| + | Found duplicate PV 7Xk2Paipbhbpk4z3QU0xpqtjeDC0Jf8b: | ||
| + | Using duplicate PV /dev/vdb without holders, replacing /dev/vdc | ||
| + | WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it! | ||
| + | WARNING: Activation disabled. No device-mapper interaction will be attempted. | ||
| + | WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it! | ||
| + | Physical volume "/ | ||
| + | 1 physical volume changed / 0 physical volumes not changed | ||
| + | WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it! | ||
| + | WARNING: Activation disabled. No device-mapper interaction will be attempted. | ||
| + | WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it! | ||
| + | Volume group " | ||
| + | WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it! | ||
| + | WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it! | ||
| + | Volume group " | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Результат ===== | ||
| + | |||
| + | <code bash> | ||
| + | pvdisplay | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | --- Physical volume --- | ||
| + | PV Name / | ||
| + | VG Name vg001 | ||
| + | PV Size 1,00 GiB / not usable 4,00 MiB | ||
| + | Allocatable | ||
| + | PE Size 4,00 MiB | ||
| + | Total PE 255 | ||
| + | Free PE 0 | ||
| + | Allocated PE 255 | ||
| + | PV UUID | ||
| + | |||
| + | --- Physical volume --- | ||
| + | PV Name / | ||
| + | VG Name vg00 | ||
| + | PV Size 1,00 GiB / not usable 4,00 MiB | ||
| + | Allocatable | ||
| + | PE Size 4,00 MiB | ||
| + | Total PE 255 | ||
| + | Free PE 0 | ||
| + | Allocated PE 255 | ||
| + | PV UUID | ||
| + | </ | ||
| + | \\ | ||
| + | <code bash> | ||
| + | vgdisplay | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | --- Volume group --- | ||
| + | VG Name vg001 | ||
| + | System ID | ||
| + | Format | ||
| + | Metadata Areas 1 | ||
| + | Metadata Sequence No 6 | ||
| + | VG Access | ||
| + | VG Status | ||
| + | MAX LV 0 | ||
| + | Cur LV 2 | ||
| + | Open LV 0 | ||
| + | Max PV 0 | ||
| + | Cur PV 1 | ||
| + | Act PV 1 | ||
| + | VG Size | ||
| + | PE Size 4,00 MiB | ||
| + | Total PE 255 | ||
| + | Alloc PE / Size 255 / 1020,00 MiB | ||
| + | Free PE / Size 0 / 0 | ||
| + | VG UUID | ||
| + | |||
| + | --- Volume group --- | ||
| + | VG Name vg00 | ||
| + | System ID | ||
| + | Format | ||
| + | Metadata Areas 1 | ||
| + | Metadata Sequence No 3 | ||
| + | VG Access | ||
| + | VG Status | ||
| + | MAX LV 0 | ||
| + | Cur LV 2 | ||
| + | Open LV 0 | ||
| + | Max PV 0 | ||
| + | Cur PV 1 | ||
| + | Act PV 1 | ||
| + | VG Size | ||
| + | PE Size 4,00 MiB | ||
| + | Total PE 255 | ||
| + | Alloc PE / Size 255 / 1020,00 MiB | ||
| + | Free PE / Size 0 / 0 | ||
| + | VG UUID | ||
| + | </ | ||
| + | \\ | ||
| + | <code bash> | ||
| + | lvdisplay | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name lv01 | ||
| + | VG Name vg001 | ||
| + | LV UUID ZZ29Ki-aPTh-62Ad-PWGu-jykB-PHxr-K7sm9l | ||
| + | LV Write Access | ||
| + | LV Creation host, time i-8745-35715-VM, | ||
| + | LV Status | ||
| + | LV Size 508,00 MiB | ||
| + | Current LE 127 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name lv02 | ||
| + | VG Name vg001 | ||
| + | LV UUID gVX1e2-cTOd-iwSj-iSXf-4NIi-pRBY-eYRXSS | ||
| + | LV Write Access | ||
| + | LV Creation host, time i-8745-35715-VM, | ||
| + | LV Status | ||
| + | LV Size 512,00 MiB | ||
| + | Current LE 128 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | |||
| --- Logical volume --- | --- Logical volume --- | ||
| LV Path / | LV Path / | ||
| Строка 100: | Строка 284: | ||
| - currently set to 8192 | - currently set to 8192 | ||
| Block device | Block device | ||
| + | </ | ||
| + | \\ | ||
| + | * Обращаем внимание на то, что логические тома нового устройства неактивны. | ||
| + | <code bash> | ||
| + | # lvs | ||
| + | LV | ||
| + | lv01 vg00 -wi-a----- 508, | ||
| + | lv02 vg00 -wi-a----- 512, | ||
| + | lv01 vg001 -wi------- 508, | ||
| + | lv02 vg001 -wi------- 512, | ||
| + | </ | ||
| + | |||
| + | * Для активации выполняем: | ||
| + | |||
| + | <code bash> | ||
| + | lvchange -ay / | ||
| + | lvchange -ay / | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | # lvs | ||
| + | LV | ||
| + | lv01 vg00 -wi-a----- 508, | ||
| + | lv02 vg00 -wi-a----- 512, | ||
| + | lv01 vg001 -wi-a----- 508, | ||
| + | lv02 vg001 -wi-a----- 512, | ||
| </ | </ | ||
klonirovanie_diska_dobavlennogo_v_lvm.1480878526.txt.gz · Последнее изменение: 2016/12/04 00:00 (внешнее изменение)
