удаление volume group на хосте

Ответить
molik
Постоялец
Сообщения: 64
Зарегистрирован: 18 май 2017 05:19

удаление volume group на хосте

Сообщение molik »

Как правильно удалить volume group на хосте ?
Есть два сервера, к которым подключен volume с хранилища.
На первом сервере сторедж, который был на этом volume, удалён в Овирте(remove).
На втором сервере этот volume активный и используется.

Т.е. мне нужно сначало удалить на сервере1 все связи с хранилищем, чтобы потом отключить volume от этого сервера на хранилище, а не отрывать его и не получать потом ошибки Input/output error.

На сервере1 удаляю volume group:
# vgremove ddf13f1d-8f1d-42d3-9888-495048e78ce8
Do you really want to remove volume group "ddf13f1d-8f1d-42d3-9888-495048e78ce8" containing 103 logical volumes? [y/n]: y
Do you really want to remove active logical volume metadata? [y/n]:

Если удалить дальше logical volum-ы, то это уничтожит все данные расположенные на этом разделе?


Сервер1
=======

# pvscan

PV /dev/mapper/3600000e00d1100000011362900090000 VG ddf13f1d-8f1d-42d3-9888-495048e78ce8 lvm2 [2.34 TiB / 877.38 GiB free]

# vgscan

ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/metadata' [512.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/outbox' [128.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/leases' [2.00 GiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/ids' [128.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/inbox' [128.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/master' [1.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/c188643b-3512-4d16-b16b-442a94e50162' [128.00 MiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/7d7d8d1c-1c87-4012-a540-2416d1d9e9b4' [128.00 MiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/b0d4d411-ff54-4e15-941c-573f3fbcc820' [40.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/5afe6b57-dd62-4a6c-b604-e5b327011141' [25.38 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/5b27a055-455e-494f-9589-4979e496ad26' [1.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/7eaabc77-a430-489c-b77d-d205a8fd3f60' [59.38 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/7bafd95e-d948-4cce-bcaf-120114d56c56' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/9859a62d-2551-4c29-bb65-c69c3a08c310' [30.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/d5dd5061-eab5-411f-a2b2-a7dd27d0445e' [9.00 GiB] inherit
...
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/f333c933-f923-466a-9c5a-d29bddeace84' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/61b821e8-dd52-4f2f-ae1f-3ef257a33229' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/fc7c4b08-be8d-4ed2-b27f-8623fe94ce9d' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/d79550a5-92a5-4000-aaf0-ced24344b918' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/de9234ad-3a17-42cc-a5de-60045674ef76' [11.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/840713f2-715b-4dfa-8893-f2db90d0f100' [4.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/a249b930-2628-4a83-ad1d-b73f7cc03746' [80.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/4593aa17-6121-45e1-a3db-dd17cf02a5bf' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/395f6291-4f14-47d5-92f9-d2fdb37e1791' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/a799d61a-42e5-4b4b-b300-c800a1ffcb18' [21.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/07c0871c-c24c-400e-b19c-0d8ce6007be5' [5.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/0d19666e-8e68-4e01-bf0c-7cbe5c0fbad0' [2.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/0e8d342e-e31d-4e7b-8170-9ff935a1ce52' [7.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/xleases' [1.00 GiB] inherit

Сервер2
=======

# pvscan

PV /dev/mapper/3600000e00d1100000011362900090000 VG ddf13f1d-8f1d-42d3-9888-495048e78ce8 lvm2 [2.34 TiB / 877.38 GiB free]

# vgscan

ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/metadata' [512.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/outbox' [128.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/leases' [2.00 GiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/ids' [128.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/inbox' [128.00 MiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/master' [1.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/c188643b-3512-4d16-b16b-442a94e50162' [128.00 MiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/7d7d8d1c-1c87-4012-a540-2416d1d9e9b4' [128.00 MiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/b0d4d411-ff54-4e15-941c-573f3fbcc820' [40.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/5afe6b57-dd62-4a6c-b604-e5b327011141' [<25.38 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/5b27a055-455e-494f-9589-4979e496ad26' [1.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/7eaabc77-a430-489c-b77d-d205a8fd3f60' [<59.38 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/7bafd95e-d948-4cce-bcaf-120114d56c56' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/9859a62d-2551-4c29-bb65-c69c3a08c310' [30.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/d5dd5061-eab5-411f-a2b2-a7dd27d0445e' [9.00 GiB] inherit
...
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/f333c933-f923-466a-9c5a-d29bddeace84' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/61b821e8-dd52-4f2f-ae1f-3ef257a33229' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/fc7c4b08-be8d-4ed2-b27f-8623fe94ce9d' [20.00 GiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/d79550a5-92a5-4000-aaf0-ced24344b918' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/de9234ad-3a17-42cc-a5de-60045674ef76' [11.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/840713f2-715b-4dfa-8893-f2db90d0f100' [4.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/a249b930-2628-4a83-ad1d-b73f7cc03746' [80.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/4593aa17-6121-45e1-a3db-dd17cf02a5bf' [20.00 GiB] inherit
ACTIVE '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/395f6291-4f14-47d5-92f9-d2fdb37e1791' [20.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/a799d61a-42e5-4b4b-b300-c800a1ffcb18' [21.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/07c0871c-c24c-400e-b19c-0d8ce6007be5' [5.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/0d19666e-8e68-4e01-bf0c-7cbe5c0fbad0' [2.00 GiB] inherit
inactive '/dev/ddf13f1d-8f1d-42d3-9888-495048e78ce8/0e8d342e-e31d-4e7b-8170-9ff935a1ce52' [7.00 GiB] inherit
Аватара пользователя
Dan Yasny
Гражданин
Сообщения: 93
Зарегистрирован: 07 окт 2016 14:17
Контактная информация:

Re: удаление volume group на хосте

Сообщение Dan Yasny »

Вообще не надо трогать LVM со стороны хостов.

С точки зрения oVirt, PV = LUN, VG = Storage Domain, LV = image.

Штатное удаление SD отключит на всех хостах общий VG и сотрет его.
molik
Постоялец
Сообщения: 64
Зарегистрирован: 18 май 2017 05:19

Re: удаление volume group на хосте

Сообщение molik »

Да, уже это понял )
parallax
Новичок
Сообщения: 6
Зарегистрирован: 16 апр 2020 11:04

Re: удаление volume group на хосте

Сообщение parallax »

приходилось удалять стореджи
так вот ovirt да на всех хостах удаляет VG,(но иногда в PV остаются блочные устройства, не знаю с чем это связано)
но после этого надо ещё руками удалить устройства из dmsetup, иначе после отрывания LUN от хостов на стороне СХД, в PV хостов сыпятся ошибки, листинг сторедж доменов может подвисать в ovirt, на SPM хосте может заглючить VDSM, и в следствии чего хосты со стореджами потеряются из вида.
Ответить

Вернуться в «oVirt»