I have a NAS box running in JBOD mode (two physical disks that act as one). Unfortunately I've had no end of problems with this configuration and wish to change it to two seperate disks. However all my files are spread between the two disks and I'd like to consolodate them onto one drive before proceeding.
I have a file structure like this (same on both drives) but there should be no file confilcts (files should only exist on one drive).
/mnt/disk1/home/ |-- a | |-- file1.txt | |-- file2.txt | |-- file3.txt | |-- file4.txt |-- b | |-- file5.txt | |-- file6.txt | `-- file7.txt `-- c |-- file8.txt |-- file9.txt `-- file10.txt /mnt/disk2/home/ |-- a | |-- file11.txt | |-- file12.txt | |-- file13.txt | `-- file14.txt |-- b | |-- file15.txt | |-- file16.txt | `-- file17.txt `-- c |-- file18.txt |-- file19.txt `-- file20.txt
How can I merge the files from one disk onto the other (either copy OR move - it doesn't matter, the disk being copied FROM is going to be formatted afterwards anyway).
I've tried variations of rsync, mv, cp etc but not finding the correct arguments to use. I've seen this question (Merge 2 directory trees in Linux without copying?) but this specifies that the files SHOULDN'T be copied. I'm looking for the opposite (specify that files need to be copied).