Solved

Rsync - no space left on device when there is.

Posted on 2013-01-17
11
1,797 Views
Last Modified: 2013-01-28
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?
0
Comment
Question by:clicker666
  • 5
  • 5
11 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38787724
Could it be that you hit your ulimit?

ulimit -f

to check.
0
 
LVL 14

Expert Comment

by:BlueCompute
ID: 38788487
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...
0
 
LVL 1

Author Comment

by:clicker666
ID: 38788776
ulimited -f =unlimited. Darn, I was hoping it would be an easy thing.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38788976
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?
0
 
LVL 1

Author Comment

by:clicker666
ID: 38789023
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.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 38789052
How can I help you finding it out?
0
 
LVL 1

Author Comment

by:clicker666
ID: 38789120
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.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 38789166
Seems that /mnt/external is just part of the root ( / ) filesystem and not on a volume of its own?
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 38789183
cd /mnt/external
df .

What's in the last column?
0
 
LVL 1

Author Comment

by:clicker666
ID: 38789199
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.
0
 
LVL 1

Author Comment

by:clicker666
ID: 38827718
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!
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now