Re: Notes on support for multiple devices for a single filesystem

Bryan Henderson
2008-12-18T21:22:47Z

>> Features like the very nice and useful directory-based snapshots would
>> also not be possible with simple block-based multi-devices, right?

>Snapshotting via block device has always been an incredibly dumb hack,
>existing primarily because filesystem-based snapshots did not exist for
>the filesystem in question.

I can see that if the filesystem driver in question could already do
snapshots, nobody would have added snapshot function to the block device
driver under it, but this doesn't explain why someone at some time created
block device snapshot instead of creating it for the filesystem in
question.

>Snapshots are better at the filesystem level because the filesystem is
>the only entity that knows when the filesystem is quiescent and
>snapshot-able.

You can use the same logic to say that snapshots are better at the
application level because only the application knows when its database is
quiescent and snapshot-able. In fact, carrying it to the extreme, you
could say snapshots are better done manually by the human end user with
none of the computer knowing anything about it.

It probably minimizes engineering effort to have snapshot capability at
every level, with the implementation at each level exploiting the function
at the level below. E.g. when someone tells a filesystem driver to
snapshot a filesystem that resides on two block devices, the filesystem
driver quiesces the filesystem, then snapshots each device (implemented in
the block device driver), then resumes. The new snapshot filesystem lives
on the two new snapshot block devices.

Of course, if you want to do a form of snapshot that makes sense only in
the context of a filesystem, like the directory snapshot mentioned above,
then you can't get as much help from snapshot functions in the storage
devices.

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Storage Systems