Link to home
Start Free TrialLog in
Avatar of clicker666
clicker666

asked on

Rsync - no space left on device when there is.

I’m trying to backup my VMs to external HDD for offsite backup.  I’m using a 1 TB drive, and seem to only have 932 GB of data.  I clear the drive with an rm  -rf * beforehand then run the following:

[root@openfiler external]#  rsync --progress -va /mnt/storage/nfs/ocl_nfs_1/backups /mnt/external --exclude=ESXi-2-VCSA/ --exclude=ESXi-2-VCSA_1 --delete | mail -s "RSync Job Log" tony@oceancontractors.ca

It runs for a while, then….

rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32)
rsync: write failed on "/mnt/external/backups/Antivirus/Antivirus-2013-01-17_04-00-03/Antivirus-flat.vmdk": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(298) [receiver=3.0.3]
rsync: connection unexpectedly closed (179 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(635) [sender=3.0.3]

Running df –h against the USB drive shows me

/dev/sdc1             932G  289G  643G  31% /media/external

Running du -h against the source directory shows: 729G    /mnt/storage/nfs/ocl_nfs_1/backups

Am I missing some obvious RSYNC mystery, or is this a USB device too slow or something similar failure?
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Could it be that you hit your ulimit?

ulimit -f

to check.
Avatar of Member_2_6515809
Member_2_6515809

Hard drive manufacturers count drive capacity in decimal bytes rather than binary bytes :(

http://en.wikipedia.org/wiki/Binary_prefix#Deviation_between_powers_of_1024_and_powers_of_1000

https://www.google.co.uk/search?q=1000000000000+bytes+in+Gigabytes

EDIT: sorry, misread the question...
Avatar of clicker666

ASKER

ulimited -f =unlimited. Darn, I was hoping it would be an easy thing.
According to the rsync command you posted the target is "/mnt/external ", but the
drive /dev/sdc whose "df -h" you posted shows up as being mounted under "/media/external".

A typo? A mistake?
No, I think you're on to something.  I'm not sure which one is the real external HDD.  I saw different files on each.
How can I help you finding it out?
It appears I have both a /media/external and a mnt/external. Both are in different spots. I believe that /media/external is correct because I used the following command to setup the drive:  mount -type ntfs-3g /dev/sdc1 /media/external.  So, I'm not really sure where /mnt/external comes from.  To make matters more confusing I created a file inside of each and they're NOT the same place.  They're not subfolders.. I don't know where they are.
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cd /mnt/external
df .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda3             48860624   1939328  44315152   5% /


cd /media/external
[root@openfiler external]# df .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdc1            976760032    417412 976342620   1% /media/external

So it seems that the first one is on my big array and I have no idea why it's even there.  So /media/external is the real one.
Just a quick follow up. I didn't have enough space on my USB hard drive to copy all my files.  I ended up writing a script that only selected the previous night's full backup.

My mount command turned out to be: mount -t ntfs-3g /dev/sdc1 /media/external.  This was initially quite confusing to me, as I accidentally kept writing /mnt/external in my backup command, which pointed to the wrong location.  I now understand how to mount and umount my external drives.  Thanks!