[dundee] Image hard drive to file

Robert McWilliam rmcw at allmail.net
Mon Feb 25 02:53:20 GMT 2008


I'll try again to explain what I mean since this is more fun than the
coding I probably should be doing (or sleeping actually given the time). 

Whether or not the file system is mounted makes no difference to whether
or not you can use dd to image it. If it is mounted and writable then
you need to make sure that *nothing* writes to it while you are making
the image (that includes cron and any other daemons that I may or may
not have heard of) if you want the image to be consistent. This is very
hard to do for / in a complex system (unless all the volatile bits of
your system are actually on separate partitions from /) but is entirely
doable for some other partition that you might have mounted (Andrew's
example was using /boot which it is fairly easy to ensure nothing will
write to as very few things will write to it). 

I would agree that it is not generally a good idea to try and image a
partition mounted rw because if you miss something that writes to it you
get a corrupt image, but telling people that it can't be done annoyed
me. It can be done, but might cause errors that might not become
apparent until later, and that is more likely to cause loss of data
among the people who aren't willing to bow to your edict that it is
impossible but tried anyway.

We actually agree that it is best to unmount (or mount ro) before
imaging, I just preferred to explain that it was possible but dangerous. 

When I see someone claiming something to be impossible and I think they
are wrong I'm likely to try it, and in this case I would have found that
I can actually perform the image without getting any error messages from
dd, and I can probably mount and use the image created. I would then
come to the conclusion that your statement of a requirement to unmount
first was bogus and happily go on imaging mounted systems until at some
point in the future one changed during imaging and I get a corrupt
image. You probably had the best of intentions saying unmounting first
was required, but it isn't actually required and without more
explanation of the dangers of imaging an rw mounted filesystem that was
a dangerous statement. 

On Mon, 25 Feb 2008 01:49:52 +0000 (GMT), "Lee Hughes"
<toxicnaan at yahoo.co.uk> said:
> if you doctor said you had a illness where you couldn't parachute, would
> you jump out of a plane, just to prove him wrong?

I love the escalation of that analogy, a random person on a mailing list
has turned into my doctor, and a possible loss of data becomes death.
Still if I was sure the doctor was talking rubbish I just might jump out
of that plain as a very effective way of demonstrating the fact. 

Some more things that annoyed me:
On Mon, 25 Feb 2008 01:46:04 +0000 (GMT), "Lee Hughes"
<toxicnaan at yahoo.co.uk> said:
> If I say something can't be done, then I expect either, for them to go
> away and research it, and get the answer, or in fact ask why?....

If you say something can't be done, I'm not allowed to say it can even
if I've just done it? I have to go and do research or ask you why
something I've done can't be done? This is the crux of why I disagree
with you. You said something can't be done when it can (though is
generally inadvisable).

> okay, perhaps I'm wrong, perhaps you could directy me to somewhere
> either on the internets or in  book that says dd'ing file system while
> they are mounted is cool!!!

Nobody said it was cool to take images of mounted filesystems merely
that it was possible. It's certainly useful if you want to dd the
partition you have dd installed on, then you'd want to make sure the
partition wasn't going to change rather than unmounting it (I'd
recommend doing this by remounting ro - but that isn't the only way).  

> I await your html inks!!! 

Why do I have to provide links? Do you really think you get to assert
something is impossible and the onus is on other people to provide links
saying it is a good idea before it counts as possible? 


This discussion started with you saying "you cant image a filesystem
while it's mounted." and that is just wrong. You certainly can, though
it might not be a good idea depending on exactly how the filesystem in
question is mounted. I'm not sure how many more ways I can find to try
and say that.

   Robert
________________________________________________________
Robert McWilliam     rmcw at allmail.net    www.ormiret.com

Everything should be made as simple as possible - but no simpler.
	-- Albert Einstein




More information about the dundee mailing list