Backups completely filling root drive.

Larry Alkoff labradley at mindspring.com
Tue Sep 26 23:04:11 UTC 2006


Tony Arnold wrote:
> 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.


First I want to thank you Tony for helping find out just what was going on.

Before Kubuntu I used Slackware for many years and developed a script 
called mirror which ran every night.  Mirror would update an identical 
hard disk that was originally prepared with dd.  The update would be by 
rsync on two passes.  It ends up kind of like a raid 1 with the added 
advantage that I have until 4am each day to undo anything I did wrong 
instead of having mistakes written to both drives immediately.

The first pass would rsync (for selected dirs in list) --exclude /home 
to mnt/kinda1/ and the second would rsync /home to /mnt/kinda1/home.

I'm going to update this script for Kubuntu which will separate out 
/home from the / update but still allow me to mount the target disk as 
/mnt/kinda1 and /mnt/kinda1/home.

What do you think of this idea?  Would you comment on the script when I 
get it done?

Larry

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




More information about the ubuntu-users mailing list