Debian Bug report logs - #372207
lvm2: lvm may put archive and backup under /var

version graph

Package: lvm2; Maintainer for lvm2 is Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>; Source for lvm2 is src:lvm2.

Reported by: Daniel 'NebuchadnezzaR' Dehennin <nebuchadnezzar@asgardr.info>

Date: Thu, 8 Jun 2006 21:03:30 UTC

Severity: minor

Merged with 612739

Found in versions lvm2/2.02.05-3, lvm2/2.02.66-4

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#372207; Package lvm2. Full text and rfc822 format available.

Acknowledgement sent to Daniel 'NebuchadnezzaR' Dehennin <nebuchadnezzar@asgardr.info>:
New Bug report received and forwarded. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Daniel 'NebuchadnezzaR' Dehennin <nebuchadnezzar@asgardr.info>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: lvm2: lvm may put archive and backup under /var
Date: Thu, 08 Jun 2006 23:01:41 +0200
Package: lvm2
Version: 2.02.05-3
Severity: wishlist

Hello,

I use a readonly / and I notice that backups and archives are under
/etc.

The backups may go under /var/backup/, archives under /var/cache ?

Regards.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.2-vs2.1.1-rc15+thorr.1
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages lvm2 depends on:
ii  debconf [debconf-2.0]      1.5.1         Debian configuration management sy
ii  libc6                      2.3.6-13      GNU C Library: Shared libraries
ii  libdevmapper1.02           2:1.02.05-2.1 The Linux Kernel Device Mapper use
ii  libncurses5                5.5-2         Shared libraries for terminal hand
ii  libreadline5               5.1-7         GNU readline and history libraries
ii  libselinux1                1.30-1        SELinux shared libraries
ii  libsepol1                  1.12-1        Security Enhanced Linux policy lib
ii  lvm-common                 1.5.20        The Logical Volume Manager for Lin

lvm2 recommends no packages.

-- debconf information:
  lvm2/kernel:
  lvm2/snapshots:



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#372207; Package lvm2. Full text and rfc822 format available.

Acknowledgement sent to Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #10 received at 372207@bugs.debian.org (full text, mbox):

From: Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>
To: 372207@bugs.debian.org
Subject: FHS commentary on this bug
Date: Mon, 4 Sep 2006 16:36:10 -0400
according to FHS 2.3 [0]:

   The contents of the root filesystem must be adequate to boot,
   restore, recover, and/or repair the system.

if LVM is needed in the boot, /var is a separate partition, and LVM
cannot operate without its cache, archives, and backups, it would seem
that LVM must store the data in /etc.

However, if any of those predicates are untrue (i don't know lvm well
enough to know if this is the case), the unneeded data should probably
be stored in /var so that lvm can be used with a ro root filesystem,
as you suggest.  If this is the case, then the data is basically just
"variable state information".  This would mean that the severity of
this bug should be elevated to serious, because it's probably a policy
violation to store data of this type in /etc instead of /var/lib.

I'd like to point out one other situation where storing this data in
/var would be much better than the current configuration:

The root filesystem is often configured errors=remount-ro.  In the
event of root filesystem errors, this effectively disables lvm
operations which change the state of the lvm information stored in
/etc.  However, this circumstance is one in which a sysadmin would
*really* want to be able to make use of lvm (e.g. setting up a
recovery volume, snapshotting existing volumes, etc).

Someone who understands lvm in more detail, in particular which of
these files are truly necessary for boot, should probably comment on
this bug.  i note that i can boot with the root filesystem on an lvm
device (using a modern initramfs setup), so i don't think that the
data stored in /etc/lvm/ is necessarily crucial to the boot process.

If it's decided that the decision should be left to the sysadmin, is
there a way that this could be made clearer?  the sysadmin could
always choose to symlink /etc/lvm to /var/lib/lvm (or something
similar), but it would be nice to help them make that decision.

	--dkg

[0] http://www.debian.org/doc/packaging-manuals/fhs/fhs-2.3.html



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#372207; Package lvm2. Full text and rfc822 format available.

Acknowledgement sent to Alasdair G Kergon <agk@redhat.com>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #15 received at 372207@bugs.debian.org (full text, mbox):

From: Alasdair G Kergon <agk@redhat.com>
To: Daniel Kahn Gillmor <dkg-debian.org@fifthhorseman.net>, 372207@bugs.debian.org
Subject: Re: Bug#372207: FHS commentary on this bug
Date: Tue, 5 Sep 2006 01:38:12 +0100
On Mon, Sep 04, 2006 at 04:36:10PM -0400, Daniel Kahn Gillmor wrote:
> However, if any of those predicates are untrue (i don't know lvm well
> enough to know if this is the case), 

Cache is required for speed - tools can be very slow without it.
Backup/archive are for recovery purposes - if you lose access to
a separate /var partition you might need the files in those 
directories to regain access to it.
Similarly if you have your root filesystem on lvm2, you really
ought to place a copy of the metadata backups for the volume
group holding your root filesystem in /boot.
This doesn't happen automatically yet, but I expect it'll get
added after the first disaster report that could have been averted
with this...

You can specify the file locations in lvm.conf (or by patching
at compile time of course).

Alasdair
-- 
agk@redhat.com



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#372207; Package lvm2. (Mon, 01 Feb 2010 00:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Wade Richards <wade@wabyn.net>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Mon, 01 Feb 2010 00:27:03 GMT) Full text and rfc822 format available.

Message #20 received at 372207@bugs.debian.org (full text, mbox):

From: Wade Richards <wade@wabyn.net>
To: 372207@bugs.debian.org
Subject: Agree that the FHS violation is serious
Date: Sun, 31 Jan 2010 16:25:22 -0800
I also keep a read-only root (including /etc) partition, to minimize the 
chances of accidental file corruption.  I also want to use LVM snapshots 
for my backups, to ensure that they are internally consistent.  Both of 
these seem like reasonable and sensible things.

However, in order to create the snapshots I'm going to use in my 
backup,  I need to re-mount my root partition as writable.  It doesn't 
seem reasonable to me that I need to write to my root partition merely 
to back it up.

I'm not an expert on LVM, but shouldn't tools like pvscan, vgscan, 
vgdisplay, lvscan, lvdisplay, etc. be enough to regain access to your 
/var directory if it is lost?  The metadata is also stored directly in 
the disk structures, is it not?   It will probably be slow, but if I'm 
recovering from a disaster, I don't mind waiting for a while.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#372207; Package lvm2. (Mon, 01 Feb 2010 01:12:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alasdair G Kergon <agk@redhat.com>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Mon, 01 Feb 2010 01:12:10 GMT) Full text and rfc822 format available.

Message #25 received at 372207@bugs.debian.org (full text, mbox):

From: Alasdair G Kergon <agk@redhat.com>
To: Wade Richards <wade@wabyn.net>
Cc: 372207@bugs.debian.org
Subject: Re: Bug#372207: Agree that the FHS violation is serious
Date: Mon, 1 Feb 2010 01:06:26 +0000
The FHS does not cover the general situation adequately IMHO, so you have to
choose your own compromise.

If your root is read-only, then change your lvm.conf to place the default
backup location somewhere else that is writeable.

What you *should* do is backup those backups to a location independent of
this LVM instance each time you change them.  E.g. change the backup location
to some /var subdir and have your 'create snapshot' script rsync that dir
over to another system after creating the snapshot.

Alasdair





Forcibly Merged 372207 612739. Request was from Luca Capello <luca@pca.it> to control@bugs.debian.org. (Mon, 21 Mar 2011 15:39:10 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'wishlist' Request was from Luca Capello <luca@pca.it> to control@bugs.debian.org. (Mon, 21 Mar 2011 15:39:11 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 02:55:56 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.