Community Forums
Connect with us on LinkedIn
Community Notice
  
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Feb 2004
    Location
    Chicago
    Posts
    196

    Default 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?

  2. #2
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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

  3. #3
    Member
    Join Date
    Feb 2004
    Location
    Chicago
    Posts
    196

    Default

    What could I do to make something run through that file and change all /home2 to /home automatically?

  4. #4
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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

  5. #5
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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

  6. #6
    Member
    Join Date
    Feb 2004
    Location
    Chicago
    Posts
    196

    Default

    Is there a command to look through all files for anything containing /home2
    ?
    Thanks.

  7. #7
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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

  8. #8
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    grep is what you want
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  9. #9
    Member
    Join Date
    Oct 2003
    Posts
    1,020

    Default

    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

  10. #10
    Member
    Join Date
    Feb 2004
    Location
    Chicago
    Posts
    196

    Default

    does anyone have the needed commands to remove /home2 and add /backups in its place? Thanks.

  11. #11
    Member
    Join Date
    Feb 2004
    Posts
    99

    Default

    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

  12. #12
    Member
    Join Date
    Jan 2005
    Posts
    7

    Default

    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.

Similar Threads & Tags
Similar threads

  1. How to use our partitions?
    By Alcedema in forum New User Questions
    Replies: 1
    Last Post: 03-17-2008, 10:52 AM
  2. partitions
    By George5 in forum New User Questions
    Replies: 1
    Last Post: 06-23-2005, 10:45 PM
  3. Two Home Partitions
    By jnetsurfer in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-21-2004, 08:01 PM
  4. New HDD and partitions
    By VIPsNET in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-03-2003, 10:41 PM
  5. partitions
    By newbee in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-31-2003, 03:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube