Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-20-2012, 07:09 PM   #1
LQ Newbie
Registered: Jul 2012
Location: Columbus, OH
Distribution: Centos 6.3
Posts: 20

Rep: Reputation: Disabled
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.
[root@localhost ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
                      51606140   1612392  47372308   4% /
tmpfs                  8152380       100   8152280   1% /dev/shm
/dev/sda1               495844     37092    433152   8% /boot
                     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
Old 09-20-2012, 07:37 PM   #2
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,518

Rep: Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104Reputation: 2104
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.
Old 09-20-2012, 07:41 PM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,395

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
You should be able to double check the physical devices
lvs  --devices

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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] vsftpd chrooting users that have been jailed into /home/jail/home/$username. amonamarth Linux - Server 4 07-09-2011 06:29 PM
[SOLVED] change a specific characters to capital in a specific text ramzaher Linux - Newbie 12 12-03-2010 04:50 AM
touch file in every users home, then change permissions paul_mat Linux - Networking 1 05-01-2006 06:06 PM
Home drives for Samba Users Geoff57 Linux - Software 1 10-18-2005 10:50 AM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 05:22 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration