From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Fast checksumming of whole partitions
Date: Sun, 6 Jun 2010 17:55:59 +0100 [thread overview]
Message-ID: <201006061756.12438.michaelkintzios@gmail.com> (raw)
In-Reply-To: <4C0B764D.5030008@alyf.net>
[-- Attachment #1: Type: Text/Plain, Size: 2490 bytes --]
On Sunday 06 June 2010 11:19:57 Andrea Conti wrote:
> > 1. boot up knoppix
> > 2. create a partition: mkdir /work
> > 3. mount /work to the root partition: mount /dev/sdc /work
> > 4. cd /work/usr/bin
> > 5. run dcfldd: ./dcfldd
>
> This is fine, provided that
>
> 1- if the root partition is [part of] what you're copying, you *must*
> mount it read-only (mount -o ro /dev/sdc /work)
>
> 2- the dcfldd executable is linked statically. If it uses dynamic
> linking, your "live" system -- knoppix in this case -- must have exactly
> the same library versions (especially glibc) as the gentoo system.
>
> >> Or is there a way to do such copies from a one disk to another while
> >> one disk is booted???
>
> The point is not with being "booted" (i.e., part of the running system)
> or not: you *cannot* reliably perform a sector-by-sector copy of any
> write-mounted partition without special support either at the FS or
> block device level (i.e. snapshots).
>
> > Sure, but the running disk/sector would have temporary files that would
> > not consistently hash when you did the hash check.
>
> That is only a minor part of the problem. The real issue is that if
> *anything* writes to the source partition while you are halfway through
> copy, you risk ending up with inconsistencies in the filesystem
> metadata. Doing a fsck on the copy will probably fix that, but you risk
> losing or corrupting data.
>
> And no, hashing as described in the previous post will *not* catch any
> differences in this case, as the "source" hash is computed from what is
> read during the copy (which, barring hardware problems, is what gets
> written on the target disk) and not from the whole contents of the
> source partition after the copy (or at any single point in time).
>
> > If you do this, try it in linux without bringing up X.
>
> That's definitely not enough: at the very least, boot up in single-user
> mode and remount all your partitions read-only (mount -o remount,ro).
> This will break things on a running system (e.g anything that writes to
> /var and /tmp will throw errors or stop working), but it will allow you
> to produce consistent partition images.
It may be worth trying 'apt-get install dcfldd' after you su to root with
Knoppix. As long as Knoppix does not need a lorry load of dependencies you
may be able to quickly install the .deb binary you need and move on with the
task in hand.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-06-06 16:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-05 6:39 [gentoo-user] Fast checksumming of whole partitions meino.cramer
2010-06-05 7:19 ` [gentoo-user] " Nikos Chantziaras
2010-06-07 15:48 ` meino.cramer
2010-06-07 17:10 ` walt
2010-06-07 18:47 ` meino.cramer
2010-06-07 17:31 ` Andrea Conti
2010-06-07 18:54 ` meino.cramer
2010-06-11 22:41 ` Mick
2010-06-05 7:32 ` [gentoo-user] " Andrea Conti
2010-06-05 17:39 ` [gentoo-user] " 7v5w7go9ub0o
2010-06-05 19:23 ` meino.cramer
2010-06-05 20:11 ` Manuel Klemenz
2010-06-06 19:02 ` 7v5w7go9ub0o
2010-06-06 19:47 ` Joerg Schilling
2010-06-06 22:43 ` 7v5w7go9ub0o
2010-06-06 23:12 ` Joerg Schilling
2010-06-06 22:46 ` Neil Bothwick
2010-06-07 1:04 ` 7v5w7go9ub0o
2010-06-05 23:44 ` 7v5w7go9ub0o
2010-06-06 10:19 ` Andrea Conti
2010-06-06 16:55 ` Mick [this message]
2010-06-06 18:55 ` 7v5w7go9ub0o
2010-06-06 20:00 ` Mick
2010-06-06 20:45 ` Andrea Conti
2010-06-06 23:06 ` 7v5w7go9ub0o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201006061756.12438.michaelkintzios@gmail.com \
--to=michaelkintzios@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox