Site folder mounted?

Discussion in 'Installation/Configuration' started by sercba, Jan 16, 2013.

  1. sercba

    sercba New Member

    Hi, somebody can explain to me this (attached)?

    Thanks!
     

    Attached Files:

  2. till

    till Super Moderator

    The log folders of sites (not the sites folders) are mounted with "mount --bind" from /var/log/httpd/domain.tld to /var/www/clients/client[ID]/web[ID]/log. Seems as if munun is not recognizing this correctly as a mount with --bind does not use any additional space, its just a way to make a directory available in a second place in such a way that it works in chroot enviroments.
     
  3. sercba

    sercba New Member

    Ahhhh!!! Thank you!!
     
  4. florian030

    florian030 HowtoForge Supporter

    Hi Till,

    Is there any way to prevent that ISPConfig uses the bind options for mounting logdirs beside changing the source?

    I`m not verry happy with so many bind-mounted entrys and I can´t see any reason for using bind-mounts since I´m able to get the logs by ftp.

    And - much more important for me - i`m running the websites on a drbd-resource with ocfs2. As long as any mount is active under the resource (like mount --bind), the umount of the resource is not possible.

    So I first have to unmount the log-folders. At the moment I´ve no idea how to fix the umount of a ocfs2-volume in such a case (of course, unmount it by hand works as aspected;) ).
     
  5. till

    till Super Moderator

    No.

    Most users access logs by SSH e.g. with tail or grep. If you have sites with gigabytes of log files and want to see the current entries that get added in realtime, you cant do that with ftp at all.

    All mounts are in the fstab file so the linux system mounts and unmounts them automatically at boot time and shutdow. If you need to unmount your /var/www filesystem maually, you can e.g. create a script to unmount your volume.
     
  6. florian030

    florian030 HowtoForge Supporter

    This doesn´t work with ocfs2 on a drbd-volume.

    Currently one logfolder is mounted:

    Code:
    /dev/drbd5            150G   25G  126G  17% /srv/www
    /dev/sda8              10G  1.4G  8.1G  15% /srv/www/clients/client2/web323/log
    
    If I run umount /srv/www with the --bind-mount active, i get:

    Code:
    umount: /srv/www: device is busy.
            (In some cases useful info about processes that use
             the device is found by lsof(8) or fuser(1))
    
    Neither "lsof|grep www" nor "fuser -km /srv/www" show anything.

    I must first unmount the log-dir by hand before "umount /srv/www" could be executed.

    I`m not sure if this is related to drbd or to ocfs.
     
  7. till

    till Super Moderator

    Unmounting volumes with arecursive script works with any filesystem incl. ocfs2. Your unmount script has to unmount the log dirs first before you unmount the ocfs of course.

    Btw. How often do you unmount the /var/www volume (as this would stop all hosting services anyway). I havent done this on my servers within the past 10 years or so.
     

Share This Page