Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server running CentOS 6.3 installed on a 2TB HDD. I also have a 250GB SSD. My aim for this setup is to have low IO applications run in /home/username folder stored on the HDD but also allow each user to have their own individual folder on the SSD for high IO applications.

I have tried using the mount command which success however when the server restarts these mounts are dropped. I could use the fstab file but I need these mounts to be automated.

The reason I would like these applications to be in the same place is so users can access their files over FTP.

My solution was to mount the SSD in say /ssd and write this into the fstab file and inside /ssd I would have /ssd/username/ and then have the fast IO applications stored there. Then mount that folder inside the users home dir. Which is where I was stuck with the restart problem.

Thanks for the time.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Mount the SSD onto /ssd, and create /ssd/username/ directories, as you have done, and then create a symlink from /home/username/ssd into /ssd/username for each user.

The other option is to do a bind mount of /ssd/username into /home/username/ssd, but that doesn't really give you anything more than a symlink does, and it's a more complicated process (you'll need fstab entries for every user, unless you can persuade one of the various automount systems to do it for you).

I'd just use a symlink, myself.

share|improve this answer
    
As far as I know symlink don't work over FTP do they? Which was my main reason for going with the mounting. If it comes down to it I can always write a small script to remount all the drives on a restart. I was just hoping for a more elegant way to do it :) –  user2126881 Mar 4 '13 at 19:44
    
@user2126881 There is nothing inherent in an FTP server that would prevent it from using symlinks, but some can be configured to not follow them for security reasons. –  SvW Mar 4 '13 at 19:58
    
@SvenW If i'm mounting the drive outside of the home folder and not allowing users to venture beyond their home directory wouldn't the symlinks fail to work for FTP? –  user2126881 Mar 4 '13 at 20:51
    
@user2126881 that would be one of the security reasons that SvenW alluded to. If you can't relax that, then I think you'll have to look at bind mounts, either manually or via an automounter. –  Daniel Lawson Mar 5 '13 at 2:04
    
Ok great thanks. I think i'll have to go with an automounter then. –  user2126881 Mar 5 '13 at 23:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.