LMV Snapshots
klussier at comcast.net
klussier at comcast.net
Fri Nov 17 06:35:37 EST 2006
-------------- Original message ----------------------
From: "Ben Scott" <dragonhawk at gmail.com>
> So, ext3 maintains a list of all anonymous files. If the filesystem
> is remounted "dirty", it goes through the list and frees all the
> inodes used by the anonymous files. That's the message you're seeing.
This makes more sense.
> > I don't have a whole lot of experience with LVM or snapshots. Does anyone have
> any thoughts on this?
>
> An LVM snapshot occurs at the device level, not the filesystem
> level. As far as ext3 is concerned, an LVM snapshot is identical to
> powering the computer off at the moment of the snapshot. Likewise,
> most software is unaware of the LVM snapshot process, and may be in
> the middle of writing to files, or have anonymous files open for
> whatever reason.
>
> In short, anything that was busy at the moment of the snapshot is
> left in an inconsistent state.
That makes sense. This isn't, afterall, snapshotting a-la NetApp. If a file is in an inconsistent state when the snapshot runs, it writes the changeset, including the fact that the file is not complete.
> ext3 thus has to do recovery of those anonymous files. That's not
> such a bad thing. The bigger worry is that some data file somewhere
> is in an inconsistent state, and no good for data recovery purposes.
That I'm not overly concened about. This is a mail server, and just prior to the the snapshot, I suspend writing to the mail store and sync the disks. I have verified that my backups are good on several occasions. And, for complete disaster recovery, it's a RAID 10 system ;-)
> In the ideal world, software using the filesystem(s) in question
> will be told to make their files consistent and hold new writes while
> the LVM snapshot is created.
In a truely ideal world, LVM would prevent writes to the FS when it is doing a snapshot. That would avoid needing every piece of software out there to be "snapshot aware". Why suspend the software when you could cache the writes in memory, and commit them to disk after the snapshot. Or, better yet, prevent new wites, allow pending operations to complete, make the snapshot, then commit cached writes to disk.
At least I now know 1) a little more about LVM snapshots and 2) this isn't a sign of impending doom. That means I don't have to spend yet another weeked researching something for work. Always a good thing..
Thanks,
Kenny
More information about the gnhlug-discuss
mailing list