#1 (permalink)  
Old 10-14-2004, 05:44 PM
Registered User
 
Join Date: Feb 2004
Location: Chicago
Posts: 196
ThaMATRiX
Partitions

Hi. I currently have two 120gb hard drives in my server, part of the first is at /home, and the whole second hard drive is at /home2

If I transfer all the accounts from /home2 to /home , it makes a symlink on home2 to the home directory on /home

If I delete all the symlinks, can I unmount it as /home2 and remount it as /backup for a backup drive?

Will deleting the symlinks affect anything?
__________________
Paul B
President/CEO
OneReseller.net Webhosting Services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-14-2004, 06:33 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
Check your httpd.conf file for the path to the directories. If it says the accounts are in /home2/username, you will need to change all of those.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-14-2004, 07:00 PM
Registered User
 
Join Date: Feb 2004
Location: Chicago
Posts: 196
ThaMATRiX
What could I do to make something run through that file and change all /home2 to /home automatically?
__________________
Paul B
President/CEO
OneReseller.net Webhosting Services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-14-2004, 07:24 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
For myself, I just download the file and use any real text editor to search and replace, then upload and restart apache.

Make a backup copy first.

I'm not positive if that's the only file that needs to be changed, but I think it is. I don't recall any other files actually recording the path to the directory.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-14-2004, 07:30 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
Just remembered, the path is also in the /etc/proftpd/username files, so you will need to look and see if they also show home2. If so, just download all those files and search/replace "/home2/" with "/home/" in them and the httpd.conf file.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-14-2004, 07:31 PM
Registered User
 
Join Date: Feb 2004
Location: Chicago
Posts: 196
ThaMATRiX
Is there a command to look through all files for anything containing /home2
?
Thanks.
__________________
Paul B
President/CEO
OneReseller.net Webhosting Services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-14-2004, 07:42 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
Quote:
Originally Posted by ThaMATRiX
Is there a command to look through all files for anything containing /home2
?
Thanks.
There is but I don't remember how at the moment.
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-14-2004, 07:44 PM
PWSowner's Avatar
Registered User
 
Join Date: Nov 2001
Location: ON, Canada
Posts: 2,991
PWSowner is on a distinguished road
grep is what you want
__________________
Mike
WHM and cPanel Scripts (join our "Scripts Club")
D/A Photography
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-14-2004, 08:21 PM
Registered User
 
Join Date: Oct 2003
Posts: 1,020
SarcNBit is on a distinguished road
man sed

sed 's/home2/home/g' <filename>

should do it for you.

I would make a backup copy of whatever file you are going to process first
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 11-04-2004, 06:13 PM
Registered User
 
Join Date: Feb 2004
Location: Chicago
Posts: 196
ThaMATRiX
does anyone have the needed commands to remove /home2 and add /backups in its place? Thanks.
__________________
Paul B
President/CEO
OneReseller.net Webhosting Services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 11-05-2004, 10:34 AM
Registered User
 
Join Date: Feb 2004
Posts: 99
challii
things this will probably break:

1) any users who have php includes in the form /home/username/www/filename.php
2) horde / imap (last time we moved accounts from home2 to home it didnt update the /home/etc/passwd file with the new locations of various files

Just thought i would point that out
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 03-19-2005, 07:44 PM
Registered User
 
Join Date: Jan 2005
Posts: 7
webhostexpert is on a distinguished road
Backup the accounts with symlinks on /home2
mv backups to /home
terminate the accounts
rm remove the symlinks on /home2
restore the backups in /home

all set all the files should be changed for you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:13 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc