Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

some files from /home mounted somewhere else

Discussion in 'General Discussion' started by never2far, Dec 20, 2012.

  1. never2far

    never2far Active Member

    Joined:
    May 6, 2008
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    56
    Hello,
    Here is a situation:
    /home partition is on SSD and some directories have big files that can be served from a normal HDD... so I've created a new partition (/extra) on a HDD and mounted (initially with bind) some directories from /home like this:
    Code:
    mount -o bind /extra/home/user/public_html/pic /home/user/public_html/pic
    After this step cPanel started to create the new accounts in the new location(/extra/home/...)

    So the solution I have found was to mount using --no-mtab and then new accounts were created again in /home partition. The complete line was like that:

    Code:
     mount -o bind --no-mtab /extra/home/user/public_html/pic /home/user/public_html/pic 
    So now the questions :)

    1. Why cPanel on the first situation (mount without --no-mtab) started to create the new accounts under /extra/home/xxx?
    2. How good is the second solution (mount with --no-mtab) and if you think there is another way to to the same thing please explain.
    3. Let's suppose that there are partitions mounted using --no-mtab ...how can I detect those? From what I have searched there is no file that can identify /extra/home/xxx as being mounted with --bind option.

    Thank you
     
  2. never2far

    never2far Active Member

    Joined:
    May 6, 2008
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    56
    anyone has an answer ?
     
  3. Jeff Shotnik

    Jeff Shotnik Well-Known Member

    Joined:
    Oct 10, 2012
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Denver, Colorado, United States
    cPanel Access Level:
    DataCenter Provider
    1. cPanel likely was looking for a match to the home directory setting within WHM. If there are multiple matches, it probably uses the last match, which would have been the bind mount in /etc/mtab.
    2. -no-mtab sounds like a good solution to me.
    3. How are you mounting them in the first place - manually, or via fstab? If via fstab, you'll see the bind mounts in /etc/fstab. If mounting manually with -no-mtab, you'll see the mount in /proc/mounts
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice