Writing to an "unmounted partition" (was: "Writing" to an unmounted partition)

Greg 'groggy' Lehey grog at lemis.com
Thu Apr 12 15:25:55 CST 2007


On Thursday, 12 April 2007 at 14:05:42 +0930, Brian Astill wrote:
> You two are THE gurus in Adelaide, IMHO - Geoffrey in Linux, Greg
> in Unix.
> I got my system into trouble recently.  ("Where is my 2G?" thread)

I've been trying to avoid reading this.

> THE cause of all the trouble is Midnight Commander (from root)
> accepting my instructions to copy /home (on hda2) to an _unmounted_
> /dev/hdb7.

Can you copy to /dev/hdb7 without being root?  If you had done so, you
most certainly would have destroyed the file system.

> It's reports of progress were entirely normal, until it began to
> complain of lack of disk space - which was nonsense, as i was
> copying 3.7G onto a 12G partition.

My guess is that you were copying to a file on the existing partition.
I don't see any evidence that you followed up Andrew Pam's
observation.

> Obviously, MC was copying to "somewhere" on hda2,

Nothing is obvious to me until I know the name you specified for the
destination.  If it was a mount point for the file system where you
wanted to put the data, it'll be in the same directory on the file
system which owns the mount point.  If you then mount the file system
where it belongs, you'll hide the data.

> which is why that partition became totally full and unusable until I
> used a live CD to copy /home to a _mounted_ /dev/hdb7, then delete
> the original /home.

If you mounted on top of the directory where you were copying the
data, read Andrew Pam's message again.

> One respondent to my pleas for help said - and insisted upon:
>> That is NOT a problem with Midnight Commander. That's what mc
>> is SUPPOSED to do.
>
> ie pretend to write to an unmounted partition, while writing
> elsewhere?

Let's get our terminology straight.  When do you ever write to a
partition?  You write to a file system.

> I would value your opinion - and I guess so would members of the
> Ubuntu and LinuxSA lists.

I'm 100% sure this is not a Ubuntu bug.  I'm about 99.5% sure it's not
a bug at all.  But I'll take this as a request to copy LinuxSA on the
reply.

> If you can also help me find the location of the files mc copied, so
> I can delete them and free up another 2G or so, I'd be VERY
> grateful!

OK.  How about this:

1.  What file systems were mounted when you started your copy
    operation?

2.  What was the copy?  A recursive copy of one directory hierarchy to
    another?  What are the names of the source and destination
    directories?

3.  If you mounted something on the destination directory after
    running out of space, what do you find there when you umount it
    again?

Greg
--
Finger grog at lemis.com for PGP public key.
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://jessica.netcraft.com.au/pipermail/linuxsa/attachments/20070412/a917b572/attachment.bin


More information about the linuxsa mailing list