Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2003 14:21:55 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>, Dru <dlavigne6@sympatico.ca>, questions@freebsd.org
Subject:   Re: dd of mounted filesystem
Message-ID:  <20031211202155.GK2435@dan.emsphone.com>
In-Reply-To: <20031211201144.GD75256@happy-idiot-talk.infracaninophile.co.uk>
References:  <20031211145245.D637@genisis> <20031211201144.GD75256@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Dec 11), Matthew Seaman said:
> On Thu, Dec 11, 2003 at 02:54:12PM -0500, Dru wrote:
> > Can anyone describe or point me to resources explaining why it is
> > dangerous to dd a filesystem while it is mounted? Is it still
> > considered to be dangerous if the system is first dropped down to
> > single-user mode?
> 
> Remember that dd(1) traverses the block device sequentially, but that
> most FS accesses are random, so any particular change can span either
> side of dd(1)'s offset.  Also that dd'ing from the block device
> bypasses the usual machinery for doing file IO -- machinery that is
> designed under the premise that it will have sole control over what
> gets read or written where and when.

On current you can get around the consistency problem by dd'ing a
snapshot of the filesystem, just like dump's -L flag does.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031211202155.GK2435>