Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using External Drive as Backup causing error in Disk Usage Reporting

Status
Not open for further replies.

walkingseed

Technical User
Jan 1, 2006
12
US
I have an External 2TB GreenDrive that I am using for nightly backups of my home and etc directories. Each time the backup script runs it reduces the available disk space reported on the root filesystem by the amount of data backed up to the external drive.
Right now the only way I know of to recover the space is to rm -rf /media/usbdisk/* this frees up space on my root filesystem. The /home directory tree is mounted to root and is /dev/sdb1 through /dev/mapper/system-home using LVM. I am running Suse 11.3. Even with the drive unmounted and turned off I can still browse the directory tree and open files. Yes the data is actually being backed on to the external drive.

Following is the script that I use to backup the data:

# Backup the home and etc directory trees
mount -t ext2 -o mount,rw,users,suid,exec,dev,user_xattr /dev/sdc1 /media/usbdisk/
cp -R -p -u /home/* /media/usbdisk/
cp -R -p -u /etc/* /media/usbdisk/etc
umount /dev/sdc1

Anybody have any ideas on how I can keep this from happening? Where on my hard drive are these files being stored?
 
I fixed it by chmod'ing the /media/usbdisk permissions to 000.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top