HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Site folder mounted? (http://www.howtoforge.com/forums/showthread.php?t=60237)

sercba 16th January 2013 17:59

Site folder mounted?
 
1 Attachment(s)
Hi, somebody can explain to me this (attached)?

Thanks!

till 16th January 2013 18:15

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.

sercba 17th January 2013 01:06

Ahhhh!!! Thank you!!

florian030 17th January 2013 18:08

Hi Till,

Quote:

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.
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;) ).

till 18th January 2013 10:33

Quote:

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

Quote:

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.
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.

Quote:

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.
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.

florian030 18th January 2013 11:04

Quote:

Originally Posted by till (Post 290872)
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.

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.

till 18th January 2013 11:23

Quote:

This doesnīt work with ocfs2 on a drbd-volume.
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.


All times are GMT +2. The time now is 04:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.