Go2reg

Active Member
Apr 30, 2003
25
0
151
I have been having alot of issues with my server. So now i think that it could be the harddrive. I have added another drive to the server and need to know.

How do I move users domains from one drive to another without loosing data and permissions.
 

Go2reg

Active Member
Apr 30, 2003
25
0
151
Thank you one more question will i need to sim link these user accounts if i have the main /home re-imaged.
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
ON, Canada
I'm not certain about that because I use my own method of putting some accounts on the 2nd drive. I think when WHM moves an account, it updates the location of it in the httpd.conf file. If that is how it does it, then you can do whatever you want to the home directory.

Move one account and see if it changes the location in the httpd.conf file.

Someone else can probably answer more accurately than I can for that.
 

perlchild

Well-Known Member
Sep 1, 2002
279
0
166
Originally posted by Go2reg
Thank you one more question will i need to sim link these user accounts if i have the main /home re-imaged.
You will want them symlinked, mostly because going over every email alias/filter that may or may not have been retored to make sure they all point to /home2 would be an expensive proposition.
httpd.conf and /etc/passwd(and in general all global system files) usually update immediately. But per-user configs may be restored by users, so having the symlinks(or symlinking /home to /home2 might be a valid investment of time)
 

big

Well-Known Member
Aug 12, 2001
224
0
316
Earth
Originally posted by squirrel
Under "Account Functions" in WHM you will see "Rearrange Accounts". That allows you to move them.
i was wondering is it possible to have multiple arrange accounts by one click ?

i have around 200 accounts need to move them from /home to /home2 its a long task if i need to go to every account and do it.
 

nat

Well-Known Member
Jan 16, 2003
209
0
166
Originally posted by big
i was wondering is it possible to have multiple arrange accounts by one click ?

i have around 200 accounts need to move them from /home to /home2 its a long task if i need to go to every account and do it.

I'm wanting this too. The point of rearranging accounts is to free space on one drive. I would like to see Rearrange Accounts page chagned to list all accounts on one page with a check mark box beside each domain and the disk space usage of that domain.

That way i can place a check mark on the ones I want to rearange, choose the drive to move all of the checked accounts to, and then click submit.
 

big

Well-Known Member
Aug 12, 2001
224
0
316
Earth
i did it using the following
cd /home2
mv * /home
cd /
umount /home2
ln -s /home /home2

edit ur /etc/fstab and mount the other disk to another mount point.
 

ddeans

Well-Known Member
Feb 13, 2004
296
0
166
Maryland
Has anyone figured out if you can delete the sym link of /home2 and if everything will still work for that domain thats now on /home?
 

big

Well-Known Member
Aug 12, 2001
224
0
316
Earth
it wont work, so many files need to edit.

most of them are done automatically, but some in ~user/etc/passwd doesn't get changed and still points to the old dir.
 

ddeans

Well-Known Member
Feb 13, 2004
296
0
166
Maryland
Does anyone know if this would work: Transfer the accounts that are symlinked to another server, then delete the accounts off of /home2(on server 1) on the current server, and then reformat /home2 and copy the accounts back to /home? Will that work?
 

calvinphanctt

Active Member
Mar 27, 2007
44
0
156
After move?

Hello,

I move 1 account from /home (1st hard drive) to /home3 (2nd hard drive) using "Rearrange" of WHM.

It worked but them I was not able to surf my web site (the one I just moved).

Then I edit the file /etc/httpd/httpd.conf and edit the location of this account to /home3. I was able to surf my web site!

Next, I can't log in FTP, then I change the path of file /etc/passwd , I was able to log in.

However, in the WHM, when I click on "List accounts" I still see the domain (account) which I just moved still listed as it is in /home and not /home3/

Do you know why? and how to fix this?

Is there anything else I should do after I make a move of account from /home to /home3 ?Please help!

Thank you.

Regards,
Calvin
 

kevinm

Member
Feb 22, 2006
19
0
151
Off topic , however should be pointed out , if you move the physical paths of the users home folders , any users scripts that have hard coded paths in will most likley start to complain about things not being found ..

My preference would be to install a new hdd , shut down ftp services , then run a mv to the new hdd , then mount the new hdd onto the old folder that had the homes . That way no scripts will fail , the change will be transparent(ish) to the users , and httpd changes are not required.

something like this could do the move / remount on an account by account basis (DONT USE THE BELOW ITS NOT TESTED , IVE JUST BASHED THIS TOGETHER TO GIVE A STARTER ! )

cd /home
ls --format=single-column |awk {'print "mv "$1 " /tmp_home/ ; mount -o bind /tmp_home/"$1" /home/"$1"'} && mount |grep bind |grep home | awk {'print " umount $3 -l"} && mount /dev/newhdd /home

then as each account is moved, the home will be remounted to the new location meaning minimal disruption, then once all the moves / individual bind mounts are done / complete , all those binds are removed , and the new drive mounted to the /home folder.

good luck !
 
Last edited: