[wplug] fsck on mounted fs?

Bill Moran wmoran at potentialtech.com
Wed May 18 08:18:24 EDT 2005


Rob Prowel <tempest766 at yahoo.com> wrote:
> --- Zachary Uram <netrek at gmail.com> wrote:
> > On 5/17/05, Rob Prowel <tempest766 at yahoo.com> wrote:
> > > 
> > > That is also the reason why you should never copy
> > an
> > > active filesystem's raw device with dd to clone a
> > disk
> > > drive.  I used to get sooo angry with other SAs
> > who
> > > believed this was an acceptable way to clone
> > disks.
> > 
> > So what is the safe canonical way to clone a disk?
> > :)

Boy, someones MUA is making a mess of these emails ...

> The (safest) way is to make sure the filesystem is in
> r/o mode (maybe even single user mode) and use a file
> copy mechanism that honors the filesystem semantics.
> 
> piping thru tar, cpio, or some other file level
> program is the safest way.
> 
> I frequently use variations on 
> 
> find -xdev -depth | cpio -pd 
> 
> as a way of copying large groups of files, named
> pipes, and device nodes.  With the proper command line
> switches file attributes and access/modification times
> are preserved to the destination.

You _can_ use dd if the filesystem is mounted ro, just as you can use
fsck.

With more modern filesystems (such as Reiser or UFS2) you can take a
snapshot and dd the snapshot.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the wplug mailing list