<br><br><div class="gmail_quote">On Mon, Aug 22, 2011 at 3:15 PM, James Hogarth <span dir="ltr"><<a href="mailto:james.hogarth@gmail.com">james.hogarth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 22 August 2011 20:48, Dennis Jacobfeuerborn <<a href="mailto:dennisml@conversis.de">dennisml@conversis.de</a>> wrote:<br>
> On 08/22/2011 07:01 PM, Trey Dockendorf wrote:<br>
>> I have a shared web server that users can SSH / SFTP into to access their<br>
>> web content.  Each users home directory is in a change root, and I use<br>
>> "mount -o bind" to put their respective webpage's document root into their<br>
>> home directory.  Recently I was made aware that the contents of the mount's<br>
>> source are not the same as the mount point's, which I don't see how that is<br>
>> possible.<br>
>><br>
>> The file system is 3 virtual disks...each part of the same volume group.  I<br>
>> have three LVMs, "/" , "/chroot" , and "/var".<br>
>><br>
>> Here's the entry in /etc/fstab...<br>
>><br>
>> /var/www/<a href="http://example.com" target="_blank">example.com</a> <<a href="http://example.com" target="_blank">http://example.com</a>>   /chroot/home/user1/<a href="http://example.com" target="_blank">example.com</a><br>

>> <<a href="http://example.com" target="_blank">http://example.com</a>>   none    defaults,bind   0   0<br>
>><br>
>> The mount is active, yet running a recursive diff between<br>
>> "/var/www/<a href="http://example.com" target="_blank">example.com</a> <<a href="http://example.com" target="_blank">http://example.com</a>>" and<br>
>> "/chroot/home/user1/<a href="http://example.com" target="_blank">example.com</a> <<a href="http://example.com" target="_blank">http://example.com</a>>" shows numerous<br>
>> differences.<br>
>><br>
<br>
<br>
</div>This is a bit of a shot in the dark perhaps but in which order was the<br>
bind mount and httpd restarted last happen? Is it possible that httpd<br>
has a file handle to the inode where the underlying directory for the<br>
place being mounted too rather than the directory that is being bound?<br>
If you unmount the binding do you see any files there? Which location<br>
has the most recent files? These are the questions that first time to<br>
my mind for troubleshooting purposes.<br>
<div><div></div><div class="h5">_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br><div>@Dennis,</div><div><br></div><div>The differences were basically any changes made by the user , but for how long I'm unsure.  It was reported today but that could be that he wasn't using the files until today.  The differences between the the mount point and source were a wide range of things from small file changes or entire directories...nothing corrupt, but it seemed like there was a point in which changes made to the mount point (within the chroot) no longer appeared at the mount source.</div>
<div><br></div><div>@James</div><div><br></div><div>When I unmounted the directory there were indeed files in the mount point's folder.  It seemed that the mount point (in chroot) was the only thing effected by changes, not the source (out of chroot).  I don't understand the question about httpd and the file handle inode.  Could you explain?</div>
<div><br></div><div>What was strange (and maybe this is expected while still mounted), rsync did not have an effect when run in an attempt to update the source with the mount point.  I ended up having to restore from last night's backup to resolve this, but am extremely puzzled as to why this happened, and a bit worried as this was going to be my new method for allowing access to hosted web services via SSH / SFTP.</div>
<div><br></div><div>Thanks</div><div>- Trey</div>