From owner-freebsd-fs@FreeBSD.ORG Sun Jul 25 16:51:34 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED68C106566B for ; Sun, 25 Jul 2010 16:51:34 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B64F28FC17 for ; Sun, 25 Jul 2010 16:51:34 +0000 (UTC) Received: by bwz12 with SMTP id 12so2811327bwz.13 for ; Sun, 25 Jul 2010 09:51:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.6.75 with SMTP id 11mr4645279bky.95.1280076692027; Sun, 25 Jul 2010 09:51:32 -0700 (PDT) Received: by 10.204.126.5 with HTTP; Sun, 25 Jul 2010 09:51:31 -0700 (PDT) In-Reply-To: <4C4C15DE.1030802@icyb.net.ua> References: <4C4C15DE.1030802@icyb.net.ua> Date: Sun, 25 Jul 2010 18:51:31 +0200 Message-ID: From: Olivier Smedts To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: zfs loader: allow access to any filesystem in a pool X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 16:51:35 -0000 2010/7/25 Andriy Gapon : > > 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 onl= y > access one predetermined filesystem within a pool - wither root dataset o= f 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, th= us, to > boot kernel and modules from an alternative filesystem. =A0This is anothe= r > 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=3Dzfs:tank/some/fs: Can you specify a snapshot ? For example set currdev=3Dzfs:tank/rootfs@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 i= ts 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 wil= l be in > the format shown above. > > Thank you in advance for any feedback! > -- > Andriy Gapon > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > --=20 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 ASCII ribbon campaign ( ) e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \ =A0 "Il y a seulement 10 sortes de gens dans le monde : =A0 ceux qui comprennent le binaire, =A0 et ceux qui ne le comprennent pas."