From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: "Семён Шепилов" <hasculdr@mail.ru>
Cc: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] поддержка zfs
Date: Sun, 23 Oct 2022 20:47:50 +0200
Message-ID: <Y1WMVjyhr0JgETTG@example.org> (raw)
In-Reply-To: <1666452262.650181596@f452.i.mail.ru>
On Sat, Oct 22, 2022 at 06:24:22PM +0300, Семён Шепилов wrote:
>
> https://github.com/openzfs/zfs/blob/master/contrib/dracut/90zfs/mount-zfs.sh.in
>
> начало с попытки делегировать монтирование маунт-генератору, как понял
> только для systemd (
> https://zfsonlinux.org/manpages/0.8.5/man8/zfs-mount-generator.8.html )
>
> дальше строки 23-56 что-то про ввод пароля, возможно это для
> зашифрованных разделов, никогда таких не использовал
>
> далее строки 59-79 поиск загрузочных атрибутов у пулов
> 66 if [ " ${root} " = " zfs:AUTO " ] ; then # похоже на содержимое грубовского CMDLINE
> 67 if ! ZFS_DATASET= " $( zpool get -Ho value bootfs | grep -m1 -vFx - ) " ; then # в chroot результат выполнения этого у меня - пустая строка, без грепа — два прочерка, т.е. оба пула у меня не загрузочные.
> Из оракловой справки:
> bootfs=pool/dataset
> Identifies the default bootable dataset for the root pool. This property is expected to be set mainly by the installation and upgrade programs.
> Я ни в одной инструкции на openzfs.github.io/openzfs-docs/Getting
> Started не видел никаких действий с этим свойством…
>
> 69 zpool import -N -a ${ZPOOL_IMPORT_OPTS} # импорт без монтирования (-N) всех пулов (-a)
> # после импорта повторно эта же проверка, если не прошли — return 1 досрочно завершает весь блок if?
>
> строки 80-93 так-же делают импорт пула как и выше, но уже не всех, а
> только того, где нашлись загрузочные атрибуты; я теперь еще больше не
> понимаю как это должно работать)
Не знаю насколько код рабочий, но мне кажется более понятным код
initramfs:
https://github.com/openzfs/zfs/blob/master/contrib/initramfs/scripts/zfs
хотя, признаюсь, по сравнению с btrfs процесс инициализации рута на zfs
выглядит дико.
--
Rgrds, legion
next prev parent reply other threads:[~2022-10-23 18:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 7:24 ` Konstantin Lepikhov
2022-10-21 17:04 ` Konstantin Lepikhov
2022-10-22 0:10 ` Alexey Gladkov
2022-10-23 18:47 ` Alexey Gladkov [this message]
2022-10-21 10:50 ` Alexey Gladkov
2022-11-19 16:09 ` Alexey Gladkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1WMVjyhr0JgETTG@example.org \
--to=gladkov.alexey@gmail.com \
--cc=hasculdr@mail.ru \
--cc=make-initrd@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Make-initrd development discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
public-inbox-index make-initrd
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.make-initrd
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git