LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Distribute lots of files output by program across multiple locations (dirs, drives) (https://www.linuxquestions.org/questions/programming-9/distribute-lots-of-files-output-by-program-across-multiple-locations-dirs-drives-4175479331/)

muahahaha9001 10-02-2013 09:05 AM

Distribute lots of files output by program across multiple locations (dirs, drives)
 
Hey Everyone

I just ran into an interesting dillemma at work. We had 450 GB of data and two 250 GB hard drives. I know that archiving and compression software can take a directory containing the 450 GB of data and output it into a series of smaller compressed archive files which can later be reassembled to extract the whole 450 GB directory.


For example,

Archive & Split:
Code:

tar czpvf - /path/to/archive | split -d -b 100M - tardisk
Reassemble & Extract:
Code:

cat tardisk* | tar xzpvf -
Now how could a command like this be executed whilst also having the logic behind it to distribute the archive files across each hard drive?

If I find a way to do this on my own, I'll update here as necesssary.

dr_agon 10-02-2013 01:42 PM

See e.g. http://www.gnu.org/software/tar/manu...Multiple-Tapes for detailed description of creating multi-volume archives by tar.

If it is not what you want - describe what exactly you need.

unSpawn 10-02-2013 04:40 PM

...or merge the two disks into one LVM?


All times are GMT -5. The time now is 01:26 PM.