1

I am trying to merge two folders that contain the same tree and bring them together in a third folder that contains a link to the contents of two different folders, it is possible with auFS? If this is not possible, is there another solution?

Thank you !

dd1
└── 1
    ├── a
    │   └── 1
    ├── b
    ├── c
    │   ├── 1
    │   ├── 2
    │   └── 3
    └── d
        └── 1
dd2   
└── 1
    ├── a
    │   └── 2
    ├── b
    │   └── 1
    ├── c
    │   ├── 4
    │   └── 5
    └── d
        └── 2

transform the upper block into the under block

www
└── 3
    ├── a
    │   ├── 1
    │   └── 2
    ├── b
    │   └── 1
    ├── c
    │   ├── 1
    │   ├── 2
    │   ├── 3
    │   ├── 4
    │   └── 5
    └── d
        ├── 1
        └── 2

dd1 and dd2 are using NTFS filesystem, and are external drives connected by usb and already auto-mounted in fstab by default at startup.

I have actually this configuration:

sudo mount -t aufs -o br=/mnt/dd1/1/:/mnt/dd2/1/ none /var/www/3/
2
  • 1
    Welcome to unix.stackexchange.com. To improve your question, please remove the introdutory paragraph and directly state your question. Also, please remove the French translation, as English is the language of this site. Sep 20, 2016 at 2:48
  • @DanielSerodio Thank you for the correction. Sep 20, 2016 at 2:59

1 Answer 1

5

Aufs is very old, the today's variant is overlayfs.

mount -t overlay overlay -o lowerdir=/mnt/dd1/1/:/mnt/dd2/1/ /var/www/3/

It will be read only.

1
  • Thank you for the answer, it works perfectly as I wanted !! Sep 20, 2016 at 11:12

You must log in to answer this question.

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