LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I change /home to different drives on specific users? (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-change-home-to-different-drives-on-specific-users-4175428293/)

mmorton89 09-20-2012 07:09 PM

Can I change /home to different drives on specific users?
 
Hello, so this is the first time I have ever had a secondary hard drive on a linux machine.

I have a 64 GB SSD and a 500 GB HDD.
Here is how it is setup.
Code:

[root@localhost ~]# df
Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      51606140  1612392  47372308  4% /
tmpfs                  8152380      100  8152280  1% /dev/shm
/dev/sda1              495844    37092    433152  8% /boot
/dev/mapper/VolGroup-lv_home
                    543580864    203008 515765492  1% /home
[root@localhost ~]#

I am not really positive but, this tells me that the /home directory is stored on the HDD which is what I wanted but, I wanted to know if it was possible to change the /home directory of 1 special user to the SSD.

I am running a game server, and my goal here is to have the files for the game server (that 1 special user) to be written and read on the SSD while backups and everything else gets put on the HDD.

Thank you in advance for any help :D

suicidaleggroll 09-20-2012 07:37 PM

A user's home directory doesn't have to be in /home, that's just the default. When you create the user you can put their home directory anywhere you want, like /home2/user, which would live on the SSD. Alternatively, you could keep their home directory at /home/user, but make /home/user a symlink to a directory elsewhere on the filesystem, somewhere on the SSD.

chrism01 09-20-2012 07:41 PM

You should be able to double check the physical devices
Code:

lvs  --devices
https://access.redhat.com/knowledge/...selection.html

There's no reason why you can't mount the SSD at eg /ssd and create eg /ssd/home/games and point the /etc/passwd entry of 'games' to there ie /ssd/home/games.


All times are GMT -5. The time now is 06:11 PM.