0

I have a samba server running Armbian Buster (Debian 10) on BananaPi M1 with three disks connected to it.

Samba is configured to share all three disk (3 separate shares).

Disks contain folders an each of them has folderA and folderB containing files.

It looks like this:

Disk1 
  (Folder A - file1, file2, file3) 
  (Folder B - f1, f2, f3)
Disk2 
  (Folder A - file5, file6, file2) 
  (Folder B - f1, f4, f6)
Disk3 
  (Folder A - file2, file8, file9) 
  (Folder B - f5, f7, f8)

I want to be able to have a folder showing contents of folderA on both disk as one folder and same with folderB.

FolderA - file1,file2,file3,file5,file6,file2,file2,file8,file9

Why ? If I want to check if the file exists on any of folderA's I have to cd and ls all of them and look if the file exists or not. Also having this kind of folder would allow me to share it as whole and not separate folders (just like libraries worked in Windows7 - a single view of multiple folders).

For the moment I've created folders named A and B and created symlinks of all files in folderA & B on all three disks. But every time contentes of source folders change I will have to make all the changes in my "combined" folder manually - means every time I delete something from say folderA on disk1 I will have to delete the symlink in folderA.

I would like to have a single combined folder with symlinks that would automatically reflect the contents of source folders.

Is there a way to do this without scripting (any built in command I don't know) ?

Yasen
  • 224
Wojtek_B
  • 121

0 Answers0