Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Bug 228174] [dump] dump(8) can read garbage and loop forever

3 views
Skip to first unread message

bugzilla...@freebsd.org

unread,
May 12, 2018, 1:10:21 AM5/12/18
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228174

--- Comment #1 from Kirk McKusick <mcku...@FreeBSD.org> ---
Are you are dumping on a live filesystem? If so, is it possible that the file
causing the problem is being written at the time that dump is trying to dump
it? If so, then dump may read it in an inconsistent state (e.g., it has
allocated, but not yet initialised one of its indirect blocks (hence the
garbage value to see when it reads the not-yet initialised block. The reason
for dumping a snapshot is to ensure that you get a consistent view of the
filesystem.

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
freeb...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-...@freebsd.org"

bugzilla...@freebsd.org

unread,
May 14, 2018, 1:09:42 AM5/14/18
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228174

--- Comment #3 from Kirk McKusick <mcku...@FreeBSD.org> ---
Taking a snapshot is the same as if you unmounted the filesystem and dumped it.
When you take a snapshot, the following steps are taken:
1) Any new system calls that want to write to the filesystem are suspended.
2) All system calls currently writing to the filesystem are allowed to finish.
3) All dirty blocks are flushed to the filesystem.
4) A snapshot of the fully flushed filesystem is taken.
5) The suspended system calls are awaken, but none of their changes appear in
the snapshot.

The dump of the snapshot therefore gets a consistent view of the filesystem.
The date of the snapshot is recorded, so that when you later take a level-1
dump (using another snapshot) you get exactlty the changes between the two
snapshots.

Putting in error checking for every possible inconsistency is a massive
undertaking. And the resulting dumps are inconsistent and prone to all sort of
errors when you attempt to restore from them. That is why snapshots were added
as they allow consistent and correct dumps to be made on a live system.
0 new messages