[buildd-tools-devel] Bug#492316: [Buildd-tools-devel] Bug#492316: Bug#492316: setup.d script to do fsck -a

Roger Leigh rleigh at codelibre.net
Sun Jun 6 22:40:40 UTC 2010


tags 492316 + fixed-upstream pending
thanks

On Tue, Jul 29, 2008 at 09:06:36PM +0200, martin f krafft wrote:
> also sprach Roger Leigh <rleigh at whinlatter.ukfsn.org> [2008.07.25.1241 +0200]:
> > This turned out to be a problem with fscking LVM snapshots of live
> > ext3 filesystems.  They would occasionally fail to fsck due to being
> > in an inconsistent state (because the snapshot is of the block dev,
> > the filesystem metadata isn't necessarily synched on snapshot).  With
> > other filesystems, e.g. block devices, we can't be sure they aren't
> > already mounted somewhere else, where fsck would be dangerous (though
> > fsck should pick that up).
> 
> It turns out that I can't use my chroots anymore and this might be
> related:
> 
> Build started at 20080729-2057
> ******************************************************************************
> + [ -f /etc/schroot/script-defaults ]
> + . /etc/schroot/script-defaults
> + FSTAB=/etc/schroot/mount-defaults
> + COPYFILES=/etc/schroot/copyfiles-defaults
> + [ -x /usr/bin/sbuild ]
> + SBUILD=true
> + [ normal = verbose ]
> + [ lvm-snapshot = block-device ]
> + [ lvm-snapshot = lvm-snapshot ]
> + [ setup-start = setup-start ]
> + ret=0
> + /sbin/fsck -a /dev/chroots/sid-amd64-ea06953d-9a19-4a47-b242-5cee56be00b1
> + :
> + exit 0
> E: fsck 1.40-WIP (14-Nov-2006)
> /dev/chroots/sid-amd64-ea06953d-9a19-4a47-b242-5cee56be00b1: clean, 17383/524288 files, 159534/1048576 blocks
> sid-amd64-ea06953d-9a19-4a47-b242-5cee56be00b1: Chroot not found
> Can't close schroot pipe getting chroot data at /usr/share/perl5/Sbuild/Chroot.pm line 81.
> 
> If I exit 0 before the fsck, then it works. If the fsck gets to run,
> it doesn't. Might this be related?

Hi Martin,

Just FYI, I've included your 09fsck script in schroot.git (as
contrib/setup.d/fsck).  It can be moved into etc/setup.d once
it's more widely tested.

WRT the error above, I think this was due to the fact that schroot
didn't used to redirect stdout/stderr from scripts.  This meant
that stdout output from e.g. fsck would end up on schroot stdout.
All setup script output is now redirected to stderr so as to not
interfere with things.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100606/2405b247/attachment.pgp>


More information about the Buildd-tools-devel mailing list