zfs loader: allow access to any filesystem in a pool

Olivier Smedts olivier at gid0.org
Sun Jul 25 16:51:35 UTC 2010


2010/7/25 Andriy Gapon <avg at icyb.net.ua>:
>
> This is a ZFS boot patch that I would like to present you for review and testing:
> http://people.freebsd.org/~avg/zfsboot.diff
>
> Currently in zfsloader you can only switch between pools, but you can only
> access one predetermined filesystem within a pool - wither root dataset of a
> pool or a filesystem pointed to by bootfs pool property.
> With this patch it is possible to access any filesystem in a pool and, thus, to
> boot kernel and modules from an alternative filesystem.  This is another
> stepping stone in so called Boot Environments support.
>
> An example.
> You can boot kernel from a different filesystem by doing the following at the
> loader prompt:
> set currdev=zfs:tank/some/fs:

Can you specify a snapshot ? For example
set currdev=zfs:tank/rootfs at 20100722:

I never tried this, but it would be really great in case of a broken
kernel/world.

Cheers

> (note the trailing colon).
> This is a breakdown of device name format:
> "zfs" - is type of a device
> "tank" - is a sample pool name
> "some/fs" - is a sample name of a filesystem within the pool
>
> You can access an individual file e.g. like this:
> load zfs:tank/some/fs:boot/kernel/module.ko
> "boot/kernel/module.ko" is a path within the specified filesystem (from its root).
>
> As an additional feature, default filesystem (either root dataset or the one
> pointed to by bootfs) is resolved to its name, so currdev and loaddev will be in
> the format shown above.
>
> Thank you in advance for any feedback!
> --
> Andriy Gapon
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>



-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: olivier at gid0.org        - against HTML email & vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  "Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas."


More information about the freebsd-fs mailing list