wiki:technical:ds:zfs_raid1
no way to compare when less than two revisions
Различия
Показаны различия между двумя версиями страницы.
Предыдущая версияСледующая версия | |||
— | wiki:technical:ds:zfs_raid1 [2017/04/07 22:51] – внешнее изменение 127.0.0.1 | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | ====== Замена диска в RAID1 под FreeBSD ====== | ||
+ | Смотрим состояние массива: | ||
+ | < | ||
+ | # zpool status | ||
+ | pool: tank | ||
+ | | ||
+ | status: One or more devices could not be opened. | ||
+ | the pool to continue functioning in a degraded state. | ||
+ | action: Attach the missing device and online it using 'zpool online' | ||
+ | see: http:// | ||
+ | scan: resilvered 10.5G in 0h9m with 0 errors on Mon Feb 1 09:49:38 2016 | ||
+ | config: | ||
+ | |||
+ | NAME | ||
+ | tank | ||
+ | mirror-0 | ||
+ | ada1p3 | ||
+ | 9066085129501579450 | ||
+ | |||
+ | errors: No known data errors | ||
+ | </ | ||
+ | Копируем разметку с рабочего диска: | ||
+ | < | ||
+ | # gpart backup ada1 | gpart restore -F /dev/ada0 | ||
+ | </ | ||
+ | Монтируем: | ||
+ | < | ||
+ | # zpool import -o altroot=/ | ||
+ | </ | ||
+ | Добавляем: | ||
+ | < | ||
+ | # zpool replace tank 9066085129501579450 ada0p3 | ||
+ | Make sure to wait until resilver is done before rebooting. | ||
+ | |||
+ | If you boot from pool ' | ||
+ | boot code on newly attached disk ' | ||
+ | |||
+ | Assuming you use GPT partitioning and ' | ||
+ | you may use the following command: | ||
+ | |||
+ | gpart bootcode -b /boot/pmbr -p / | ||
+ | |||
+ | </ | ||
+ | Ставим загрузчик: | ||
+ | < | ||
+ | # gpart bootcode -b /boot/pmbr -p / | ||
+ | bootcode written to ada0 | ||
+ | </ | ||
+ | Проверяем: | ||
+ | < | ||
+ | # zpool status | ||
+ | pool: tank | ||
+ | | ||
+ | status: One or more devices is currently being resilvered. | ||
+ | continue to function, possibly in a degraded state. | ||
+ | action: Wait for the resilver to complete. | ||
+ | scan: resilver in progress since Tue May 10 22:34:44 2016 | ||
+ | 1.08G scanned out of 196G at 8.42M/s, 6h35m to go | ||
+ | 1.07G resilvered, 0.55% done | ||
+ | config: | ||
+ | |||
+ | NAME | ||
+ | tank | ||
+ | mirror-0 | ||
+ | ada1p3 | ||
+ | replacing-1 | ||
+ | 9066085129501579450 | ||
+ | ada0p3 | ||
+ | |||
+ | errors: No known data errors | ||
+ | </ | ||
wiki/technical/ds/zfs_raid1.txt · Последнее изменение: 2022/12/08 15:38 — Diman