Backups completely filling root drive.

Tony Arnold tony.arnold at manchester.ac.uk
Tue Sep 26 18:30:22 UTC 2006


Larry,

On Tue, 2006-09-26 at 12:56 -0500, Larry Alkoff wrote:

> Tony I have now mounted the filled up drive and done du -x.
> It's very strange.
> 
> The setup on the old target drive contains two partitions / and /home.
> For some reason, when I mount / only and du -x, the entire /home 
> directories appear there.

I presume you mean the two partitions /dev/hdc1 and /dev/hdc5 which are
mount on /mnt/kinda1 and /mnt/kinda1/home and these are the destination
directories of two separate cp -ax commands?

> It's no wonder the partition filled up since / has only 9.2gig and /home 
> has 14 gig in use!
> 
> I now suspect that my cp -a was incorrect.
> Perhaps it should have been cp -ax /mnt/drive and cp -ax /mnt/drive/home.

If you / as the target of the cp -ax command, then the files will get
copied to /dev/hda1 and not /dev/hdc1. So your conclusion is correct,
you need to use the mounted path name.

And of course, cp -ax sth /mnt/drive will also copy sth/home
to /mnt/drive/home because home is just a subdirectory of /mnt/drive.

> This is my fstab - hdc is the filled up old drive:
> proc            /proc           proc    defaults        0       0
> /dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
> /dev/hda5       /home           ext3    defaults        0       2
> /dev/hda2       none            swap    sw              0       0
> /dev/hdd        /media/cdrom0   udf,iso9660 user,noauto     0       0
> 
> /dev/hdc1       /mnt/kinda1     ext3    defaults,errors=remount-ro 0       1
> /dev/hdc5       /mnt/kinda1/home ext3    defaults        0       2
> 
> -------------------------------------------------------------------
> /dev/hdc1             9.2G  9.2G     0 100% /mnt/kinda1
> /dev/hdc5              28G   14G   13G  53% /mnt/kinda1/home
> 
> -------------------------------------------------------------------
> 
> Root partition:
> root at kinda kinda1 # dut
> 3.9G
> 
> Home partition:
> root at kinda home # dut
> 15G
> 
> Alias for dut:
> root at kinda kinda1 # al dut
> alias dut='\du -x --si --summarize |cut -f 1'
> ---------------------------------------------------------------------
> 
> I don't understand why the df is reporting a full / partition but df -x
> is reporting something completely different.
> 
> Perhaps I'll have to think more about how to structure a cp -ax series 
> of commands.

You may also want to think about how you mount the target partitions.
You are mounting the second on a mount point that is a sub-directory of
the first mount point.

You could try mounting /dev/hdc1 on /mnt/kinda1-root and mount /dev/hdc5
on /mnt/kinda1-home and use the appropriate cp commands. Also, when you
cp -ax / to-somehwere, you will copy /home as well!

Regards,
Tony.
-- 
Tony Arnold, IT Security Coordinator, University of Manchester,
IT Services Division, Kilburn Building, Oxford Road, Manchester M13 9PL.
T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773 330 0039
E: tony.arnold at manchester.ac.uk, H: http://www.man.ac.uk/Tony.Arnold




More information about the ubuntu-users mailing list