Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After tar.gz'ing a 25 GB folder, I copied the file from my local machine to a remote server via scp.

Once the file was transferred, I failed to extract the tar.gz due to:

$ tar -zxvf dump.tar.gz

tar: myFolder/myFile: Wrote only 9728 of 10240 bytes

tar: myFolder/myFile2: Cannot write: No space left on device
tar: Exiting with failure status due to previous errors

Then, I ran df -h to see that the disk is "100%" full:

Filesystem            Size  Used Avail Use% Mounted on
                       16G   15G   28M 100% /
tmpfs                 7.9G  136K  7.9G   1% /dev/shm
/dev/sda1             485M  131M  329M  29% /boot
                      7.3G  152M  6.8G   3% /opt
                      148G  6.4G  134G   5% /u01

Can I specify scp to write to the dev/mapper/vg_01-lv_u01 disk drive since it has enough space? How can I solve this issue?

share|improve this question
up vote 3 down vote accepted

You are asking about scp but the problem of writing to a full device appeared with tar.

I understand the question that you want to copy the file(s) to the filesystem on the dev/mapper/vg_01-lv_u01 volume. For this you must use the mount point /u01 as the destination.


scp dump.tar.gz user@machine:/u01/any/existing/path

This way you specify the destination path in the mount point of the volume you want to use.


tar allows you to specify the destination directory for extraction too.

tar -zxvf dump.tar.gz -C /u01/any/existing/path


If you use the tar file just for the transport you can use a more direct way to pipe it directly through ssh:

tar -cf - /source/directory | ssh user@machine "tar -xf - -C /u01/any/existing/path"

If you use compression with ssh, the compression with tar will not probably be needed. Anyway you can enable the compression anytime by putting the z option of tar back.

share|improve this answer
Thanks. Since I already have the tar.gz transferred, could I just mv it to /u01/...? – Kevin Meredith Oct 7 '13 at 9:43
@Kevin: You are welcome. Yes, of course, you can move the file to the other filesystem. If you do not need to keep the archive, you can directly extract and remove it: tar -zxvf dump.tar.gz -C /u01/any/existing/path && rm dump.tar.gz Edit: I have changed the commands here so that rm is executed only after successful extraction of the archive. – pabouk Oct 7 '13 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .