Пытаюсь прикрутить журналирование к серверной системке, ибо весьма часто отключают свет, и проблема восстановления "на лету" очень критична.
Пока тренируюсь на вм-варях.
Дано: два жестких диска 10Гб ad0 и 4Гб ad1
Создаю на первом при установке:
Код: Выделить всё
ad0s1a \ 500m
ad0s1b swap 100m
ad0s1d \var 500m
ad0s1e \tmp 400m
ad0s1f \usr 500m
ad0s2b swap 1g
ad0s2d swap 1g
ad0s2e swap 1g
ad0s2f swap 1g
Код: Выделить всё
ad1s1a \ 500m
ad1s1b swap 100m
ad1s1d \var 500m
ad1s1e \tmp 400m
ad1s1f \usr 500m
Смысл двух систем: журнал будет прикручиваться к ad0, и чтобы размонтировать его / работаю из второй.
Итак. Загружаюсь с ad0. удаляю из его fstab все упоминание про свапы ad0s2. перегружаюсь в сингл
Код: Выделить всё
#umount /var /tmp /usr
#gjournal load
# gjournal label -f ad0s1d ad0s2d
GEOM_JOURNAL: Journal 2948326772: ad0s1d contains data.
GEOM_JOURNAL: Journal 2948326772: ad0s2d contains journal.
# gjournal label -f ad0s1d ad0s2e
GEOM_JOURNAL: Journal 2948326772: ad0s1e contains data.
GEOM_JOURNAL: Journal 2948326772: ad0s2e contains journal.
# gjournal label -f ad0s1f ad0sfe
GEOM_JOURNAL: Journal 2948326772: ad0s1f contains data.
GEOM_JOURNAL: Journal 2948326772: ad0s2f contains journal.
# tunefs -J enable -n disable ad0s1d.journal
tunefs: gjournal set
tunefs: soft updates cleared
# tunefs -J enable -n disable ad0s1e.journal
tunefs: gjournal set
tunefs: soft updates cleared
# tunefs -J enable -n disable ad0s1f.journal
tunefs: gjournal set
tunefs: soft updates cleared
# mount -o async /dev/ad0s1d.journal /var
# mount -o async /dev/ad0s1e.journal /tmp
# mount -o async /dev/ad0s1f.journal /usr
Код: Выделить всё
/dev/ad0s1d.journal /var ufs rw,async 2 2
/dev/ad0s1e.journal /tmp ufs rw,async 2 2
/dev/ad0s1f.journal /usr ufs rw,async 2 2
Код: Выделить всё
geom_gjournal_load="YES"
Ребут. Загружаюсь с ad1.
Код: Выделить всё
#gjournal load
#gjournal label -f ad0s1a ad0s2b
#tunefs -J enable ad0s1a.journal
#mount -o async ad0s1a.journal /
Код: Выделить всё
#mount -o rw /dev/ad0s1a /mnt/ad0s1a
Код: Выделить всё
/dev/ad0s1b.journal / ufs rw,async 1 1
Код: Выделить всё
Root mouting wainig for: GJOURNAL GJOURNAL GJOURNAL GJOURNAL
Root mouting wainig for: GJOURNAL GJOURNAL GJOURNAL GJOURNAL
Root mouting wainig for: GJOURNAL GJOURNAL GJOURNAL GJOURNAL
Root mouting wainig for: GJOURNAL GJOURNAL GJOURNAL GJOURNAL
GEOM_JOURNAL: Timeout. Journal gjournal 24237862 cannot be comleted.
GEOM_JOURNAL:ad0s1a contains data.
GEOM_JOURNAL: Timeout. Journal gjournal 23452345 cannot be comleted.
GEOM_JOURNAL:ad0s1d contains data.
GEOM_JOURNAL: Timeout. Journal gjournal 57855875 cannot be comleted.
GEOM_JOURNAL:ad0s1e contains data.
GEOM_JOURNAL: Timeout. Journal gjournal 45363456 cannot be comleted.
GEOM_JOURNAL:ad0s1f contains data.