Hi, I want to backup Lustre by getting a filelist from e2scan. Does e2scan require that I take down the MDT before scanning or could I do this on top of a LVM snapshot ? I can''t find references to e2scan it in the manual - is it considered experimental? Thanks /Jakob
On Wed, Mar 12, 2008 at 10:31 AM, Jakob Goldbach <jakob at goldbach.dk> wrote:> Does e2scan require that I take down the MDT before scanning or could I > do this on top of a LVM snapshot ?You don''t need to stop the MDS. We just take a snapshot of the MDS device and run e2scan against the snapshot.> I can''t find references to e2scan it in the manual - is it considered > experimental?It seems to work well enough but I don''t think it''s really documented anywhere. There''s a few bugs in bugzilla that have some useful information in them.
How do you do the snapshot?> -----Original Message----- > From: lustre-discuss-bounces at lists.lustre.org [mailto:lustre-discuss- > bounces at lists.lustre.org] On Behalf Of James Braid > Sent: Wednesday, March 12, 2008 2:37 PM > To: Jakob Goldbach > Cc: Lustre User Discussion Mailing List > Subject: Re: [Lustre-discuss] e2scan for backup > > On Wed, Mar 12, 2008 at 10:31 AM, Jakob Goldbach <jakob at goldbach.dk> > wrote: > > Does e2scan require that I take down the MDT before scanning or could I > > do this on top of a LVM snapshot ? > > You don''t need to stop the MDS. We just take a snapshot of the MDS > device and run e2scan against the snapshot. > > > I can''t find references to e2scan it in the manual - is it considered > > experimental? > > It seems to work well enough but I don''t think it''s really documented > anywhere. There''s a few bugs in bugzilla that have some useful > information in them. > _______________________________________________ > Lustre-discuss mailing list > Lustre-discuss at lists.lustre.org > http://lists.lustre.org/mailman/listinfo/lustre-discuss
On Wed, 2008-03-12 at 14:50 -0600, Lundgren, Andrew wrote:> How do you do the snapshot?lvcreate -s But based on the premise that your underlying Lustre block device is already an LVM logical volume. Using LVM for Lustre devices solves a number of backup problems that usually require one to stop Lustre and unmount the device to otherwise solve. b.
On Wed, 2008-03-12 at 23:12 +0100, Brian J. Murrell wrote:> On Wed, 2008-03-12 at 14:50 -0600, Lundgren, Andrew wrote: > > How do you do the snapshot? > > lvcreate -sNo need to freeze the filesystem while creating the snapshot to ensure a consistent filesystem on the snapshot ? (xfs has a xfs_freeze function that does just this) /Jakob
On Thu, 2008-03-13 at 12:59 +0100, Jakob Goldbach wrote:> > No need to freeze the filesystem while creating the snapshot to ensure a > consistent filesystem on the snapshot ?I''ve been corrected about this before and maybe it will happen again, but a) there is no need to freeze the filesystem and b) probably when you mount the snapshot, the journal (which may contain transactions when the snapshot is taken) will be replayed and then everything should be good.> (xfs has a xfs_freeze function that does just this)Yeah. I don''t know enough about xfs to understand why this is needed, but probably the inconsistency of an "open" xfs filesystem is more disastrous than an ext3 filesystem. b.
On Thu, 2008-03-13 at 13:48 +0100, Brian J. Murrell wrote:> On Thu, 2008-03-13 at 12:59 +0100, Jakob Goldbach wrote: > > > > No need to freeze the filesystem while creating the snapshot to ensure a > > consistent filesystem on the snapshot ? > > I''ve been corrected about this before and maybe it will happen again, > but a) there is no need to freeze the filesystem and b) probably when > you mount the snapshot, the journal (which may contain transactions when > the snapshot is taken) will be replayed and then everything should be > good.For taking snapshots the filesystem(or block device) must be frozen or the snapshots will not be consistent. LVM calls freeze_bdev() to lock a filesystem and bring it into a consistent state. It is not exported to userspace though and is currently uses only by device-mapper AFAIK. Thanks, Kalpak.> > > (xfs has a xfs_freeze function that does just this) > > Yeah. I don''t know enough about xfs to understand why this is needed, > but probably the inconsistency of an "open" xfs filesystem is more > disastrous than an ext3 filesystem. > > b. > > > _______________________________________________ > Lustre-discuss mailing list > Lustre-discuss at lists.lustre.org > http://lists.lustre.org/mailman/listinfo/lustre-discuss
On Mar 13, 2008 12:59 +0100, Jakob Goldbach wrote:> On Wed, 2008-03-12 at 23:12 +0100, Brian J. Murrell wrote: > > On Wed, 2008-03-12 at 14:50 -0600, Lundgren, Andrew wrote: > > > How do you do the snapshot? > > > > lvcreate -s > > No need to freeze the filesystem while creating the snapshot to ensure a > consistent filesystem on the snapshot ?Yes, but this is handled internally by LVM and ext3 when the snapshot is created.> (xfs has a xfs_freeze function that does just this)In fact I was just discussing this with an XFS developer and this is a source of problems for them because if you do xfs_freeze before doing the LVM snapshot it will deadlock. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.