From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1X8jO6-000188-AA for mharc-grub-devel@gnu.org; Sun, 20 Jul 2014 01:10:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8jNv-00013Q-PH for grub-devel@gnu.org; Sun, 20 Jul 2014 01:10:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X8jNm-0005I4-NS for grub-devel@gnu.org; Sun, 20 Jul 2014 01:10:07 -0400 Received: from mail-la0-x22e.google.com ([2a00:1450:4010:c03::22e]:35883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8jNm-0005Hv-EV for grub-devel@gnu.org; Sun, 20 Jul 2014 01:09:58 -0400 Received: by mail-la0-f46.google.com with SMTP id b8so3961196lan.33 for ; Sat, 19 Jul 2014 22:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=hCalmcInjuZFI7gjKVktTqolIt/6hfXyOUZmlAV9zwo=; b=CE+y5ax4NKPw9Jp5F09PXjytckAIvtSqsgxQVjCjAhbq8qalpkuNbcZWSqiQ8rGqSZ x9dXWoYEPDHb7TsTeMbSo6grRWeUIb7VN5LBcaMA//l28OaEurcTtUmh0xz6Lc3LQkqb bmEdZ+4Pm1oN4Y2PVbVrqPWdcvpvjxxpYmGzd3gHZEOU0plVhwOVlhydveXQJ1Sm0j0S zZGA3raSyNRE30mtIZB6rDJTf/MR+tPJCNu2YG+m6F+0xxsVERTOEI1sAtDZTL54RYk9 kH6xNVv5JBkPlMnm1Zz4fJeN3fNR/WcB+07uK3S14ZbnfraErav/s678DGI1qc2wamd/ uqyg== X-Received: by 10.152.185.104 with SMTP id fb8mr16470628lac.64.1405832996977; Sat, 19 Jul 2014 22:09:56 -0700 (PDT) Received: from opensuse.site (ppp94-29-76-101.pppoe.spdop.ru. [94.29.76.101]) by mx.google.com with ESMTPSA id uo5sm18021000lbb.6.2014.07.19.22.09.55 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 19 Jul 2014 22:09:55 -0700 (PDT) Date: Sun, 20 Jul 2014 09:09:54 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: Environment block and LVM Message-ID: <20140720090954.79866efd@opensuse.site> In-Reply-To: <53C588B3.8010706@gmail.com> References: <1144594563.117221.1405322508517.JavaMail.zimbra@opinsys.fi> <616962202.117314.1405325936382.JavaMail.zimbra@opinsys.fi> <20140714120353.GA32372@riva.ucam.org> <53C588B3.8010706@gmail.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/3f71KBD7Z1Q8B1we6VfX+By"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22e Cc: phcoder@gmail.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2014 05:10:16 -0000 --Sig_/3f71KBD7Z1Q8B1we6VfX+By Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =D0=92 Tue, 15 Jul 2014 22:01:55 +0200 Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > On 14.07.2014 14:03, Colin Watson wrote: > > On Mon, Jul 14, 2014 at 08:18:56AM +0000, Tuomas R=C3=A4s=C3=A4nen wrot= e: > >> The GRUB manual says: > >>> For safety reasons, this storage is only available when installed on a > >>> plain disk (no LVM or RAID), using a non-checksumming filesystem (no > >>> ZFS), and using BIOS or EFI functions (no ATA, USB or IEEE1275). > >> > >> However, in our systems, load_env seems to load the environment block > >> from LVM without any problems. On the other hand, save_env fails. > >> > >> Is load_env + LVM now supported or is there something weird going on a= nd > >> it works by accident? > >=20 > > This section of the manual is referring to the whole feature, including > > saving. It's true that load_env will work as long as GRUB is able to > > understand the device and filesystem; but save_env has the constraints > > above. > >=20 > > At least on checksumming filesystems and on RAID, the main reason for > > not supporting this is that we have to be rather conservative about what > > writes we do to avoid breaking things. save_env is a very useful > > feature, but it's not actually required to boot the system and so we > > should only support it where it's safe. > >=20 > > In some other environments, the main reason we don't support this is > > simply that it's a non-trivial amount of code that we haven't written > > yet and that isn't needed for anything else. > >=20 > LVM can have RAID inside of it. Or even worse: snapshots. If current > volume is snapshotted you shouldn't write to it. Only very small subset > of LVM features could be supported for writing. This would make it > confusing. I don't dismiss this possibility of writing to some LVM > subset but probably still not a good idea. I'd pretty much prefer using > LVM embedding zone for this. It's not limited to LVM, we have pretty much the same problem with btrfs, zfs or /boot on RAID, including fake RAID. Some common solution is needed, but the main problem is how user space (grub-editenv) should know where environment block is located. > > I suspect that LVM falls into the second category rather than the first, > > but Vladimir might overrule me. If we did implement this, we would need > > to be careful to ensure that the code is structured to make it very > > difficult to make the mistake of writing to the wrong part of the disk > > and to put suitable automatic tests in place, since we can't expect the > > writing paths in GRUB to be exercised as frequently as the reading > > paths. > >=20 >=20 >=20 --Sig_/3f71KBD7Z1Q8B1we6VfX+By Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlPLTyIACgkQR6LMutpd94wbcQCffX59QRsNvphP55NH0JijZTpC j5oAnRAfWlA9+Lh8tH8i+DpEL663sHPr =IMad -----END PGP SIGNATURE----- --Sig_/3f71KBD7Z1Q8B1we6VfX+By--