Find the answer to your Linux question:
Results 1 to 4 of 4
Hi - I've got a big ol media server with multiple drives and because the machine has grown with me, each hard drive has a similar mix of content. Is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! aphxtwn's Avatar
    Join Date
    Jul 2006
    Location
    Mesa, AZ
    Posts
    3

    Combining Directories across Multiple Drives


    Hi - I've got a big ol media server with multiple drives and because the machine has grown with me, each hard drive has a similar mix of content. Is there a way I can have something like a virtual directory whose contents is a combination of the contents of multiple directories across multiple drives?

    So basically getting the contents of /mnt/bravo/music and /mnt/charlie/music and having the files listed in /music while letting the files reside in their original locations.

    I was thinking maybe if there was a symbolic link tool out there that would let me massively create/update symbolic links... I don't think file/directory name collisions would be an issue for me. Does anyone have any ideas or know about any tools I could use? Thanks in advance.

  2. #2
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    You could try logical volume management (LVM).
    I haven't used it so I don't know if it's the perfect fit for you, but thumbing through the HOWTO, it looks like a solution.
    Stand up and be counted as a Linux user!

  3. #3
    Just Joined! aphxtwn's Avatar
    Join Date
    Jul 2006
    Location
    Mesa, AZ
    Posts
    3

    Lvm

    Thanks - I think I just might go that route. I'm a little uncertain how LVM handles hard drive failure and if a single file could potentially be split between two hard drives in the same volume group. It might be a big nightmare trying to do damage control in the case of a catastrophic drive failure, if I understand it correctly. However, I really like the idea of being able to grow a volume just by adding drives to the group.

    -P

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! aphxtwn's Avatar
    Join Date
    Jul 2006
    Location
    Mesa, AZ
    Posts
    3
    hehe... I started pricing some raid equipment and got discouraged. Then I got really lazy and instead of going LVM, I created a perl script (i'm not a big fan of perl, but it was already installed) that goes through a source directory and creates symbolic links in the destination directory. If a symlink with the same name already exists, it shows a warning so the user can reconcile the file names afterwards. For my purposes, I have a batch file where I delete all symbolic links out of the destination directory and then start generating the links from all my source directories into one destination directory so I can run this batch file over and over again to bring the master directory up to date. I'm lazy and this saves me the time of having to move things around and reformat. So now I have this directory mapped as a samba share so all the content from the various drives is now unified.

Posting Permissions

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