10/28 Docs say I can't do dd from disk that is in use.
This seems (based on my bad memory) to be contrary to my experience.
Any opionions on duping an inuse disk (to a non-inuse one).
this is on solaris 8.
\_ live update, ufsdump, rsync, dd... you want your filesystem
as quiesced as possible though for all of the above
\_ what the above and others say about quiet drives and RO and then:
since you don't tell us what problem you're trying to solve, my
very generic advice is this: dd the drive so you get boot blocks
and other fun stuff you might want, then do an rsync after that just
for kicks in the hopes of catching a few of the files that might
have been in use while doing dd. no, this followup rsync will not
make a perfect mirror on an active disk but if you wanted to do a
real backup, you'd use real software for it or at least take the
source drive offline. you're well into kludge territory already,
anyway.
\_ You can dd from a disk that is in use. You will obviously not
get an exact duplicate and, as above, I would not try this
on a very busy filesystem. However, it works fine under Solaris
9/10 and Red Hat Linux. I've done this to make 'backup' disks
(successfully) many times.
\_ If you need to keep the filesystem mounted RW, I'd suggest
using rsync rather than dd. If the filesystem is mounted RO
it seems like dd would be fine.
\_ Rsync is slower and won't grab the boot blocks (if you want
them).
\_ rsync is NOT slower than DD unless the filesystems are
basically full. -top
\_ Yes, it is. Best case scenario (using the right
rsync options) they are about equal. "dd" can use
the raw device and bypass the filesystem entirely.
Amended: You are right that if the filesystem/disk is
not very full then "dd" will be slower merely because it
is copying "empty" space but not because "dd" is
intrinsically slower.
\_ What problem are you trying to solve?
What are your priorities?
\_ so it's not "intrinsically slower", it just takes
longer to run? Get a clue. -tom
\_ I think you need the clue, tom. "dd" is
faster. If you want to prune the list of files
you want to "dd" first it will kick the butt
of "rsync". You know that, too, but you just
like to argue. When copying the exact same
volume of data, "dd" is faster.
\_ While driving a car is faster than walking,
walking from Telegraph and Bancroft to
Telegraph and Durant is much faster than
driving. "dd is faster" is meaningless
unless the problem is well-defined. -tom
\_ Even your example is false.
\_ Alright, we're convinced: you're an idiot.
You don't have to try this hard just for
us.
\_ You may as well say that a plane
is slower than walking, too. The
statement about a 'well-defined'
problem is your own parameter but
doesn't change the fact that
planes are faster than walking.
\_ To put this in a way that even
an idiotic computer geek might
understand, if you have two
different sort algorithms,
one that's usually faster in
practice but O(N^2), and one
that's usually slower in practice
but O(N log N), it makes no sense
to say that one is intrinsically
faster than the other. It
depends on the problem you have
to solve. -tom
\_ HAMMER GOOD!
If you took a second to think, you'd realize
you're clueless. Or maybe not. It's dim.
\_ Do you know what the word 'intrinsic'
means?
\_ Yes. You seem to have trouble with the
word 'slower', though.
\_ "dd" is intrinsically faster.
\_ Not for the problem posed (ergo
"HAMMER GOOD"). If you want to
keep spouting your technically
correct and completely irrelevent
point, by all means... You will
still be wrong.
\_ You have come to know that which
is tom.
\_ hey moron: he's replying to
!tom.
\_ We don't even *know* what the
problem posed is yet. However,
we do know the guy wants to
use 'dd' to solve it. Rsync
may not even be a viable
solution in this particular case.
\_ What problem are you trying to solve? What are your priorities?
\_ try using solaris' Volume Manager (also known as disksuite).
create a one way mirror containing the current live FS as the
initial submirror, then attach the second empty FS as another
submirror. wait for the second submirror to sync up, then at
your leisure, detach the second submirror.
look at metadb, metainit, metattach, metadetach, metaclear,
and other "meta"commands. --Jon
look at metadb, metainit, metattach, metaoffline/online,
metadetach, metaclear, and other "meta"commands. --Jon
\- i have a solaris 10 sunblade 1500 which some colleages
wanted to clone to save time. i rebooted my machine and used
/usr/bin/dd if=/dev/dsk/c0t0d0s2 of=/dev/dsk/c0t1d0s2 bs=1000k
and thne fscked. all the machines work fine ( 5 clones). it
sounds like you know what the issues are so just take this an
a data point. 73gig disks ... i think it tok 40min or so.
oh i am sure i booted it su and killed off most of the
processes before running dd.
\_ The thing with the Solaris LVM method is that you don't
really need to have the filesystem quiescent. You get a
valid, consistent snapshot at the time of metaoffline or
metadetach. --Jon
\_ As long as you understand this isn't considered "production
quality", if that worked for you, great. I wouldn't do that
for something going into a data center 24x7, etc.
\- i bet lot of production operations were running on
less reliable windows installations (i dont know how
reliable windows OS is today). anyway, these are
cheep sun workstations with ide disks, so what do you
think. anyway, it seemed to be the OP was aware of the
"issues" and was just interested if it was "crazy talk"
[you'ld be lucky if it worked] vs. 99%chance it should
be fine. hence the "datapoint x5" comment.
\_ who said that just because you put a windows box in
production means its production quality? thanks for
pointing out they're workstations. that was so unclear.
i was pointing out that this isn't production quality.
sheesh.
\- are you a frequent visitor to Casino Troll?
\_ And what is "production quality"? This is essentially
what tools like "System Imager" do. What are you
afraid of? 'cksum' the OS if you want to. Bits
is bits.
\_ PQ: built correctly, not a hack job with dd
from another box. Something you'd bet your
career on. Workstation for the guys? Whatever.
Server in the colo running critical db? No way
is that getting built from a dd clone off a hot
drive. Building a few dozen/hundred/whatever
web/whatever servers? Jump/Kick Start. I've
done the clone thing for workstations. I'd
never do it for servers. If you want to discuss
it in detail, post your name and we'll take it
to email. |