[CentOS] A questiong about replacing my failing drive

Sun Jun 12 18:56:08 UTC 2005
Bryan J. Smith <b.j.smith at ieee.org>

On Sun, 2005-06-12 at 08:45 -0400, Mark Weaver wrote:
> And you long time Unix admins are one of the biggest reasons I read this 
> mailing list.

Good.  We aren't always right.  We don't always know best.  But we do
typically know what works best of us on UNIX/Linux, which may or may not
be the same for others.

> While I do like ghost I have to confess to a small amount of baiting
> because it tends to extract this kind of conversation a little
> quicker. well let me say it tends to provoke a much wider range 
> of knowledge with a single probe than just asking a question.
> Yeah...a little twisted, but its fun too.

I don't like it.  Long story short, I've had some really bad experiences
with a fellow technical author.  Like him giving near-sermons on why we
should use only [PK]Zip and Joliet ISO9660 extensions because they were
"ubiquitous" versus UNIX-centric ones like USTar format and RockRidge
ISO9660 extensions (let alone the fact you can use both extensions
simultaneously ;-).  He took a lot of his clients down paths that got
them into trouble, and I (among others) had to bail them out.

Now my apologies for responding a little more than "strongly."  But I've
got some really bad taste left in my mouth from people like that.  ;->

> Since a Unix/Linux guru/admin is what I want to be when I grow up, (my 
> wife tells me thats not likely to happen - me growing up), I would love 
> to hear about your process.

Well, understand there are major limitations to NT.  I've been deploying
NT since the original NT 3.1 beta (I was an admin/tech at the largely
end-user of the first native NT app in 1992-1995).  Solutions like
Ghost, Drive Copy/Image, etc... cater to such limitations.  Ironically,
OS/2 didn't have them, but Gates decided to forgo many OS/2 capabilities
in NT (although he did introduce some others -- long story).

In UNIX, typically there are different ways to deal with copying files.

As someone mentioned, the absolute best solution is to use the "raw"
filesystem "dump."  It basically gives you what Ghost does -- only
safer.  Instead of a generic sector-by-sector copy of used sectors, it
is a block-by-block copy of used blocks in the filesystem.  Better than
Ghost, some "dump" programs can run on _live_ filesystems (although
sometimes it's only recommended from a snapshot).

Another, more filesystem-agnostic approach is to use the streaming
archive utilities.  While some people use tar (10KB block USTAR archive
format) -- tar create (tar c) piped to tar extract (tar x), different
tar versions have different options on different platforms and may or
may not handle all special files correct.  But what I've _always_ had
work for me is [System-V] cpio (5KB block USTAR archive format) -- cpio
in "pass-thru" mode.

In a nutshell, you pipe in a list of files, and cpio automatically
copies them -- _raw_ -- to another location.  We typically use find from
the current directory, and pass the "don't cross filesystems" option (-
mount on almost all UNIX flavors, -xdev on newer ones).  "cpio -p"  does
the rest, although the "-md" options preserve all mode/modification
info, and "d" creates directories as necessary.  You can use "v" to
verbosely list the paths processed, and "u" for an unconditional
overwrite.

As someone else mentioned, _no_ form of "cp" should be trusted to do the
same.


-- 
Bryan J. Smith                                     b.j.smith at ieee.org 
--------------------------------------------------------------------- 
It is mathematically impossible for someone who makes more than you
to be anything but richer than you.  Any tax rate that penalizes them
will also penalize you similarly (to those below you, and then below
them).  Linear algebra, let alone differential calculus or even ele-
mentary concepts of limits, is mutually exclusive with US journalism.
So forget even attempting to explain how tax cuts work.  ;->