Backups completely filling root drive.

Larry Alkoff labradley at mindspring.com
Tue Sep 26 17:56:16 UTC 2006


Larry Alkoff wrote:
> Tony Arnold wrote:
>> Larry,
>>
>> On Tue, 2006-09-26 at 09:37 -0500, Larry Alkoff wrote:
>>> I have effectively destroyed two Kubuntu 6.0.6 installations while 
>>> attempting to copy to a mounted backup drive using cp -a.  When the copy 
>>> finishes, df says there is 0 space left in my / partition and I don't 
>>> know why.  The / partition is normally 10 gig with 3.5 gig used.
>>>
>>> Now that I'm working with my 3rd install, I'd like to try and find out 
>>> what happened.
>>>
>>> I have a feeling it has to do with the fact that the target drive is 
>>> mounted under /mnt/name but I don't see why that should have anything to 
>>> do with the space on the source partition.
>> Have you looked to see where all the space on the root partition has
>> gone? You can use du for this, e.g.,
>>
>> 	cd /
>> 	du -sh *
>>
>> will give you a summary of each top directory in /. You can drill down
>> to find further information.
>>
>> Does the copy complete successfully and are all the files you expect
>> in /mnt/name?
>>
>> Output from a mount command or df plus the exact command you used might
>> be helpful.
>>
>> Regards,
>> Tony.
> 
> 
> Thanks for your reply Tony.
> 
> First I used df and realized there was a big problem.  That threw me for 
> a loop.
> 
> I also used du but of course it included the /mnt drives.  Only found 
> the -x parameter today.  Since I suspect the /mnt/name files (they were 
> the target) I can check with du -x.
> 
> The copy did not complete sucessfully because the target ran out of space.
> 
> I'll shut down, re-install the old target drive and give you the info 
> you need later today.
> 
> Larry
> 


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.

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.


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.

Larry


-- 
Larry Alkoff N2LA - Austin TX
Using Thunderbird on Linux




More information about the ubuntu-users mailing list