Results 1 to 3 of 3

Thread: Mount multiple directories from two archive drives in one folder

  1. #1
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,987

    Default Mount multiple directories from two archive drives in one folder

    Hi,

    I have two non-system drives with archive files. Each drive is formatted with one primary partition only, occupying all the drive space.
    In each drive there will be a number of directories with files in them, like this:

    Drive 1:
    /directory1/directoryXXX/files
    /directory2/directoryXXX/files
    /directory3/directoryXXX/files

    Drive 2:
    /directory4/directoryXXX/files
    /directory5/directoryXXX/files
    ...
    /directory11/directoryXXX/files

    Each high-level directory (directory1 to directory11) has a unique name, and directoryXXX represent any number of folders and files.

    I'd like to mount these in a third HD with the system/home installed, under /home/<username>/archives/ so that they would show like this:

    directory1/directoryXXX/files
    directory2/directoryXXX/files
    directory3/directoryXXX/files
    directory4/directoryXXX/files
    directory5/directoryXXX/files
    ...
    directory11/directoryXXX/files

    Its straightforward to do this if all partitions (but one, optionally) hold the content of just one directory, but that's not my case.

    From Yast partitioner I can only mount a hole partition, not individual folders in the partition.

    Is this possible at all?

    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Mount multiple directories from two archive drives in one folder

    You could mount the 2 partitions elsewhere and then use bind mount to mount the subdirectories under /home/*/archives. Another way is with symlinks.

  3. #3
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,987

    Default Re: Mount multiple directories from two archive drives in one folder

    Thanks, ken_yap, mount --bind seems the way to go. Symlinks require that the original folder/file is also shared, or the client will only see a 0-byte file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •