1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�21.�Stackable VFS modules</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="The Official Samba-3 HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part�III.�Advanced Configuration"><link rel="prev" href="CUPS-printing.html" title="Chapter�20.�CUPS Printing Support"><link rel="next" href="winbind.html" title="Chapter�22.�Winbind: Use of Domain Accounts"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�21.�Stackable VFS modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="CUPS-printing.html">Prev</a>�</td><th width="60%" align="center">Part�III.�Advanced Configuration</th><td width="20%" align="right">�<a accesskey="n" href="winbind.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="VFS"></a>Chapter�21.�Stackable VFS modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><tt class="email"><<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email"><<a href="mailto:jht@samba.org">jht@samba.org</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="surname">Potter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email"><<a href="mailto:tpot@samba.org">tpot@samba.org</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Simo</span> <span class="surname">Sorce</span></h3><span class="contrib">original vfs_skel README</span></div></div><div><div class="author"><h3 class="author"><span class="firstname">Alexander</span> <span class="surname">Bokovoy</span></h3><span class="contrib">original vfs_netatalk docs</span></div></div><div><div class="author"><h3 class="author"><span class="firstname">Stefan</span> <span class="surname">Metzmacher</span></h3><span class="contrib">Update for multiple modules</span></div></div><div><div class="author"><h3 class="author"><span class="firstname">Ed</span> <span class="surname">Riddle</span></h3><span class="contrib">original shadow_copy docs</span></div></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="VFS.html#id2593943">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="VFS.html#id2593958">Discussion</a></span></dt><dt><span class="sect1"><a href="VFS.html#id2594291">Included Modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="VFS.html#id2594297">audit</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2594331">extd_audit</a></span></dt><dt><span class="sect2"><a href="VFS.html#fakeperms">fake_perms</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2594589">recycle</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2594780">netatalk</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2594816">shadow_copy</a></span></dt></dl></dd><dt><span class="sect1"><a href="VFS.html#id2595425">VFS Modules Available Elsewhere</a></span></dt><dd><dl><dt><span class="sect2"><a href="VFS.html#id2595444">DatabaseFS</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2595498">vscan</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2593943"></a>Features and Benefits</h2></div></div></div><p> 2Since Samba-3, there is support for stackable VFS (Virtual File System) modules. 3Samba passes each request to access the UNIX file system through the loaded VFS modules. 4This chapter covers all the modules that come with the Samba source and references to 5some external modules. 6</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2593958"></a>Discussion</h2></div></div></div><p> 7If not supplied with your platform distribution binary Samba package you may have problems 8compiling these modules, as shared libraries are compiled and linked in different ways 9on different systems. They currently have been tested against GNU/Linux and IRIX. 10</p><p> 11To use the VFS modules, create a share similar to the one below. The 12important parameter is the <a class="indexterm" name="id2593975"></a>vfs objects parameter where 13you can list one or more VFS modules by name. For example, to log all access 14to files and put deleted files in a recycle bin, see <a href="VFS.html#vfsrecyc" title="Example�21.1.�smb.conf with VFS modules">next configuration</a>: 15 16</p><div class="example"><a name="vfsrecyc"></a><p class="title"><b>Example�21.1.�smb.conf with VFS modules</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><i class="parameter"><tt>[audit]</tt></i></td></tr><tr><td><a class="indexterm" name="id2594013"></a><i class="parameter"><tt> 17 18 comment = Audited /data directory</tt></i></td></tr><tr><td><a class="indexterm" name="id2594030"></a><i class="parameter"><tt> 19 20 path = /data</tt></i></td></tr><tr><td><a class="indexterm" name="id2594045"></a><i class="parameter"><tt> 21 22 vfs objects = audit recycle</tt></i></td></tr><tr><td><a class="indexterm" name="id2594060"></a><i class="parameter"><tt> 23 24 writeable = yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2594075"></a><i class="parameter"><tt> 25 26 browseable = yes</tt></i></td></tr></table></div><p> 27</p><p> 28The modules are used in the order in which they are specified. 29Let's say that you want to both have a virus scanner module and a recycle 30bin module. It is wise to put the virus scanner module as the first one so 31that it is the first that get run an may detect a virus immediately, before 32any action is performed on that file. 33<a class="indexterm" name="id2594100"></a>vfs objects = vscan-clamav recycle 34</p><p> 35Samba will attempt to load modules from the <tt class="filename">/lib</tt> directory in the root directory of the 36Samba installation (usually <tt class="filename">/usr/lib/samba/vfs</tt> or <tt class="filename">/usr/local/samba/lib/vfs 37</tt>). 38</p><p> 39Some modules can be used twice for the same share. 40This can be done using a configuration similar to the one shown in <a href="VFS.html#multimodule" title="Example�21.2.�smb.conf with multiple VFS modules">the following example</a>. 41 42</p><div class="example"><a name="multimodule"></a><p class="title"><b>Example�21.2.�smb.conf with multiple VFS modules</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><i class="parameter"><tt>[test]</tt></i></td></tr><tr><td><a class="indexterm" name="id2594165"></a><i class="parameter"><tt> 43 44 comment = VFS TEST</tt></i></td></tr><tr><td><a class="indexterm" name="id2594180"></a><i class="parameter"><tt> 45 46 path = /data</tt></i></td></tr><tr><td><a class="indexterm" name="id2594196"></a><i class="parameter"><tt> 47 48 writeable = yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2594211"></a><i class="parameter"><tt> 49 50 browseable = yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2594227"></a><i class="parameter"><tt> 51 52 vfs objects = example:example1 example example:test</tt></i></td></tr><tr><td><a class="indexterm" name="id2594243"></a><i class="parameter"><tt> 53 54 example1: parameter = 1</tt></i></td></tr><tr><td><a class="indexterm" name="id2594258"></a><i class="parameter"><tt> 55 56 example: parameter = 5</tt></i></td></tr><tr><td><a class="indexterm" name="id2594274"></a><i class="parameter"><tt> 57 58 test: parameter = 7</tt></i></td></tr></table></div><p> 59</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2594291"></a>Included Modules</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2594297"></a>audit</h3></div></div></div><p> 60 A simple module to audit file access to the syslog 61 facility. The following operations are logged: 62 </p><div class="itemizedlist"><ul type="disc"><li><p>share</p></li><li><p>connect/disconnect</p></li><li><p>directory opens/create/remove</p></li><li><p>file open/close/rename/unlink/chmod</p></li></ul></div><p> 63 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2594331"></a>extd_audit</h3></div></div></div><p> 64 This module is identical with the <span><b class="command">audit</b></span> module above except 65 that it sends audit logs to both syslog as well as the <span><b class="command">smbd</b></span> log files. The 66 <a class="indexterm" name="id2594353"></a>log level for this module is set in the <tt class="filename">smb.conf</tt> file. 67 </p><p> 68 Valid settings and the information that will be recorded are shown in <a href="VFS.html#xtdaudit" title="Table�21.1.�Extended Auditing Log Information">the next table</a>. 69 </p><div class="table"><a name="xtdaudit"></a><p class="title"><b>Table�21.1.�Extended Auditing Log Information</b></p><table summary="Extended Auditing Log Information" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Log Level</th><th align="center">Log Details - File and Directory Operations</th></tr></thead><tbody><tr><td align="center">0</td><td align="left">Make Directory, Remove Directory, Unlink</td></tr><tr><td align="center">1</td><td align="left">Open Directory, Rename File, Change Permissions/ACLs</td></tr><tr><td align="center">2</td><td align="left">Open & Close File</td></tr><tr><td align="center">10</td><td align="left">Maximum Debug Level</td></tr></tbody></table></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2594464"></a>Configuration of Auditing</h4></div></div></div><p> 70 This auditing tool is more felxible than most people readily will recognize. There are a number of ways 71 by which useful logging information can be recorded. 72 </p><div class="itemizedlist"><ul type="disc"><li><p>Syslog can be used to record all transaction. This can be disabled by setting 73 in the <tt class="filename">smb.conf</tt> file <i class="parameter"><tt>syslog = 0</tt></i>.</p></li><li><p>Logging can take place to the default log file (<tt class="filename">log.smbd</tt>) 74 for all loaded VFS modules just by setting in the <tt class="filename">smb.conf</tt> file 75 <i class="parameter"><tt>log level = 0 vfs:x</tt></i>, where x is the log level. 76 This will disable general logging while activating all logging of VFS 77 module activity at the log level specified.</p></li><li><p>Detailed logging can be obtained per user, per client machine, etc. 78 This requires the above together with the creative use of the 79 <i class="parameter"><tt>log file</tt></i> settings.</p><p>An example of detailed per-user and per-machine logging can 80 be obtained by setting 81 <a class="indexterm" name="id2594538"></a>log level = /var/log/samba/%U.%m.log. 82 </p></li></ul></div><p> 83 Auditing information often must be preserved for a long time. So that the log files do not get rotated 84 it is essential that the <a class="indexterm" name="id2594553"></a>max log size = 0 be set 85 in the <tt class="filename">smb.conf</tt> file. 86 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="fakeperms"></a>fake_perms</h3></div></div></div><p> 87 This module was created to allow Roaming Profile files and directories to be set (on the Samba server 88 under UNIX) as read only. This module will, if installed on the Profiles share, report to the client 89 that the Profile files and directories are writeable. This satisfies the client even though the files 90 will never be overwritten as the client logs out or shuts down. 91 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2594589"></a>recycle</h3></div></div></div><p> 92 A Recycle Bin-like module. Where used, unlink calls will be intercepted and files moved 93 to the recycle directory instead of being deleted. This gives the same effect as the 94 <span class="guiicon">Recycle Bin</span> on Windows computers. 95 </p><p> 96 The <span class="guiicon">Recycle Bin</span> will not appear in <span class="application">Windows Explorer</span> views of the network file system 97 (share) nor on any mapped drive. Instead, a directory called <tt class="filename">.recycle</tt> will be 98 automatically created when the first file is deleted. Users can recover files from the 99 <tt class="filename">.recycle</tt> directory. If the <i class="parameter"><tt>recycle:keeptree</tt></i> has been 100 specified, deleted files will be found in a path identical with that from which the file was deleted. 101 </p><p>Supported options for the <span><b class="command">recycle</b></span> module are as follow: 102 </p><div class="variablelist"><dl><dt><span class="term">recycle:repository</span></dt><dd><p> 103 Relative path of the directory where deleted files should be moved. 104 </p></dd><dt><span class="term">recycle:keeptree</span></dt><dd><p> 105 Specifies whether the directory structure should be kept or if the files in the directory that is being 106 deleted should be kept separately in the recycle bin. 107 </p></dd><dt><span class="term">recycle:versions</span></dt><dd><p> 108 If this option is set, two files 109 with the same name that are deleted will both 110 be kept in the recycle bin. Newer deleted versions 111 of a file will be called “<span class="quote"><span class="emphasis"><em>Copy #x of <i class="replaceable"><tt>filename</tt></i></em></span></span>”. 112 </p></dd><dt><span class="term">recycle:touch</span></dt><dd><p> 113 Specifies whether a file's access date should be touched when the file is moved to the recycle bin. 114 </p></dd><dt><span class="term">recycle:maxsize</span></dt><dd><p> 115 Files that are larger than the number of bytes specified by this parameter will not be put into the recycle bin. 116 </p></dd><dt><span class="term">recycle:exclude</span></dt><dd><p> 117 List of files that should not be put into the recycle bin when deleted, but deleted in the regular way. 118 </p></dd><dt><span class="term">recycle:exclude_dir</span></dt><dd><p> 119 Contains a list of directories. When files from these directories are 120 deleted, they are not put into the 121 recycle bin but are deleted in the 122 regular way. 123 </p></dd><dt><span class="term">recycle:noversions</span></dt><dd><p> 124 Specifies a list of paths (wildcards such as * and ? are supported) for which no versioning should be used. Only useful when <span class="emphasis"><em>recycle:versions</em></span> is enabled. 125 </p></dd></dl></div><p> 126 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2594780"></a>netatalk</h3></div></div></div><p> 127 A netatalk module will ease co-existence of Samba and netatalk file sharing services. 128 </p><p>Advantages compared to the old netatalk module: 129 </p><div class="itemizedlist"><ul type="disc"><li><p>Does not care about creating .AppleDouble forks, just keeps them in sync.</p></li><li><p>If a share in <tt class="filename">smb.conf</tt> does not contain .AppleDouble item in hide or veto list, it will be added automatically.</p></li></ul></div><p> 130 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2594816"></a>shadow_copy</h3></div></div></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> 131 <span class="emphasis"><em>THIS IS NOT A BACKUP, ARCHIVAL, OR VERSION CONTROL 132 SOLUTION!</em></span></p><p> 133 With Samba or Windows servers, shadow copy is designed to be 134 an end-user tool only. It does not replace or enhance your 135 backup and archival solutions and should in no way be 136 considered as such. Additionally, if you need version 137 control, implement a version control system. You have been 138 warned.</p></div><p> 139 The shadow_copy module allows you to setup functionality that 140 is similar to MS shadow copy services. When setup properly, 141 this module allows Microsoft shadow copy clients to browse 142 "shadow copies" on samba shares. You will need to install the 143 shadow copy client. You can get the MS shadow copy client 144 <a href="http://www.microsoft.com/windowsserver2003/downloads/shadowcopyclient.mspx" target="_top">here.</a>. 145 Note the additional requirements for pre-Windows XP clients. 146 I did not test this functionality with any pre-Windows XP 147 clients. You should be able to get more information about MS 148 Shadow Copy <a href="http://www.microsoft.com/windowsserver2003/techinfo/overview/scr.mspx" target="_top">from 149 the Microsoft's site</a>.</p><p> 150 The shadow_copy VFS module requires some underlying file system 151 setup with some sort of Logical Volume Manager (LVM) such as 152 LVM1, LVM2, or EVMS. Setting up LVM is beyond the scope of 153 this document; however, we will outline the steps we took to 154 test this functionality for <span class="emphasis"><em>example purposes 155 only.</em></span> You need to make sure the LVM implementation 156 you choose to deploy is ready for production. Make sure you 157 do plenty of tests.</p><p> 158 Here are some common resources for LVM and EVMS: 159 </p><div class="itemizedlist"><ul type="disc"><li><p><a href="http://www.sistina.com/products_lvm_download.htm" target="_top">Sistina's 160 LVM1 and LVM2</a></p></li><li><p><a href="http://evms.sourceforge.net/" target="_top">Enterprise 161 Volume Management System (EVMS)</a></p></li><li><p><a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_top">The LVM HOWTO</a></p></li><li><p> 162 See <a href="http://www-106.ibm.com/developerworks/linux/library/l-lvm/" target="_top">Learning 163 Linux LVM, Part 1</a> and <a href="http://www-106.ibm.com/developerworks/library/l-lvm2.html" target="_top">Learning 164 Linux LWM, Part 2</a> for Daniel Robbins' well 165 written a two part tutorial on Linux and LVM using LVM 166 source code and reiserfs.</p></li></ul></div><p> 167 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2594944"></a>Shadow Copy Setup</h4></div></div></div><p> 168 At the time of this writing, not much testing has been done. 169 I tested the shadow copy VFS module with a specific scenario 170 which was not deployed in a production environment, but more 171 as a proof of concept. The scenario involved a Samba 3 file 172 server on Debian Sarge with an XFS file system and LVM1. I 173 do NOT recommend you use this as a solution without doing 174 your own due diligence with regard to all the components 175 presented here. That said, following is an basic outline of 176 how I got things going.</p><div class="orderedlist"><ol type="1"><li><p><b>Installed Operating System .�</b> 177 In my tests, I used <a href="http://www.debian.org/devel/debian-installer/" target="_top">Debian 178 Sarge</a> (i.e. testing) on an XFS file system. 179 Setting up the OS is a bit beyond the scope of this 180 document. It is assumed that you have a working OS 181 capable of running Samba.</p></li><li><p><b>Install & Configure Samba.�</b> 182 See the <a href="introduction.html" title="Part�I.�General Installation">installation 183 section</a> of this HOWTO for more detail on this. 184 It doesn't matter if it is a Domain Controller or 185 Member File Server, but it is assumed that you have a 186 working Samba 3.0.3 or newer server running.</p></li><li><p><b>Install & Configure LVM.�</b> 187 Before you can make shadow copies available to the 188 client, you have to create the shadow copies. This is 189 done by taking some sort of file system snapshot. 190 Snapshots are a typical feature of Logical Volume 191 Managers such as LVM, so we first need to have that 192 setup.</p><div class="itemizedlist"><p> 193 The following is provided as an example and will be 194 most helpful for Debian users. Again, this was tested 195 using the "testing" or "Sarge" distribution.</p><ul type="disc"><li><p> 196 Install lvm10 and devfsd packages if you have not 197 done so already. On Debian systems, you are warned 198 of the interaction of devfs and lvm1 which requires 199 the use of devfs filenames. Running 200 <span><b class="command">apt-get update && apt-get install 201 lvm10 devfsd xfsprogs</b></span> should do the trick 202 for this example.</p></li><li><p> 203 Now you need to create a volume. You will need to 204 create a partition (or partitions) to add to your 205 volume. Use your favorite partitioning tool 206 (e.g. Linux fdisk, cfdisk, etc.). The partition 207 type should be set to 0x8e for "Linux LVM." In this 208 example, we will use /dev/hdb1.</p><p> 209 Once you have the Linux LVM partition (type 0x8e), 210 you can run a series of commands to create the LVM 211 volume. You can use several disks and or 212 partitions, but we will use only one in this 213 example. You may also need to load the kernel 214 module with something like <span><b class="command">modprobe lvm-mod 215 </b></span> and set your system up to load it on 216 reboot by adding it to 217 (<tt class="filename">/etc/modules</tt>). </p></li><li><p> 218 Create the physical volume with <span><b class="command">pvcreate 219 /dev/hdb1</b></span></p></li><li><p> 220 Create the volume group with and add /dev/hda1 to it 221 with <span><b class="command">vgcreate shadowvol /dev/hdb1</b></span> 222 </p><p> 223 You can use <span><b class="command">vgdisplay</b></span> to review 224 information about the volume group.</p></li><li><p> 225 Now you can create the logical volume with something 226 like <span><b class="command">lvcreate -L400M -nsh_test 227 shadowvol</b></span></p><p> 228 This creates the logical volume of 400MB's named 229 "sh_test" in the volume group we created called 230 shadowvol. If everything is working so far, you 231 should see them in 232 <tt class="filename">/dev/shadowvol</tt>.</p></li><li><p> 233 Now we should be ready to format the logical volume 234 we named sh_test with <span><b class="command">mkfs.xfs 235 /dev/shadowvol/sh_test</b></span></p><p> 236 You can format the logical volume with any file 237 system you choose, but make sure to use one that 238 allows you to take advantage of the additional 239 features of LVM such as freezing, resizing and 240 growing your file systems.</p><p> 241 Now we have an LVM volume where we can play with the 242 shadow_copy VFS module.</p></li><li><p> 243 Now we need to prepare the directory with something 244 like <span><b class="command">mkdir -p /data/shadow_share</b></span> 245 or whatever you want to name your shadow copy 246 enabled Samba share. Make sure you set the 247 permissions such that you can use it. If in doubt, 248 use <span><b class="command">chmod 777 /data/shadow_share</b></span> 249 and tighten the permissions once you get things 250 working.</p></li><li><p> 251 Mount the LVM volume using something like 252 <span><b class="command">mount /dev/shadowvol/sh_test 253 /data/shadow_share</b></span></p><p> 254 You may also want to edit your 255 <tt class="filename">/etc/fstab</tt> so that this 256 partition mounts during the system boot.</p></li></ul></div></li><li><p><b>Install & Configure the shadow_copy VFS 257 Module.�</b> 258 Finally we get to the actual shadow_copy VFS module. 259 The shadow_copy VFS module should be available in 260 Samba 3.0.3 and higher. The smb.conf configuration is pretty 261 standard. Here is our example of a share configured 262 with the shadow_copy VFS module:</p><p> 263 </p><div class="example"><a name="vfsshadow"></a><p class="title"><b>Example�21.3.�Share With shadow_copy VFS</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><i class="parameter"><tt>[shadow_share]</tt></i></td></tr><tr><td><a class="indexterm" name="id2595274"></a><i class="parameter"><tt> 264 265 comment = Shadow Copy Enabled Share</tt></i></td></tr><tr><td><a class="indexterm" name="id2595290"></a><i class="parameter"><tt> 266 267 path = /data/shadow_share</tt></i></td></tr><tr><td><a class="indexterm" name="id2595305"></a><i class="parameter"><tt> 268 269 vfs objects = shadow_copy</tt></i></td></tr><tr><td><a class="indexterm" name="id2595320"></a><i class="parameter"><tt> 270 271 writeable = yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2595336"></a><i class="parameter"><tt> 272 273 browseable = yes</tt></i></td></tr></table></div><p> 274 </p></li><li><p><b>Create Snapshots and Make Them Available to shadow_copy.so.�</b> 275 Before you can browse the shadow copies, you must 276 create them and mount them. This will most likely be 277 done with a script that runs as a cron job. With this 278 particular solution, the shadow_copy VFS module is 279 used to browse LVM snapshots. Those snapshots are not 280 created by the module. They are not made available by 281 the module either. This module allows the shadow copy 282 enabled client to browse the snapshots you take and 283 make available.</p><p> 284 Here is a simple script used to create and mount the 285 snapshots: 286 </p><pre class="screen"> 287#!/bin/bash 288# This is a test, this is only a test 289SNAPNAME=`date +%Y.%m.%d-%H.%M.%S` 290xfs_freeze -f /data/shadow_share/ 291lvcreate -L10M -s -n $SNAPNAME /dev/shadowvol/sh_test 292xfs_freeze -u /data/shadow_share/ 293mkdir /data/shadow_share/@GMT-$SNAPNAME 294mount /dev/shadowvol/$SNAPNAME /data/shadow_share/@GMT-$SNAPNAME -onouuid,ro 295 </pre><p> 296 Note that the script does not handle other things like 297 remounting snapshots on reboot. 298 </p></li><li><p><b>Test From Client.�</b> 299 To test, you will need to install the shadow copy 300 client which you can obtain from the <a href="http://www.microsoft.com/windowsserver2003/downloads/shadowcopyclient.mspx" target="_top">Microsoft 301 web site.</a> I only tested this with an XP client 302 so your results may vary with other pre-XP clients. 303 Once installed, with your XP client you can 304 right-click on specific files or in the empty space of 305 the shadow_share and view the "properties". If 306 anything has changed, then you will see it on the 307 "Previous Versions" tab of the properties 308 window. </p></li></ol></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2595425"></a>VFS Modules Available Elsewhere</h2></div></div></div><p> 309This section contains a listing of various other VFS modules that 310have been posted but do not currently reside in the Samba CVS 311tree for one reason or another (e.g., it is easy for the maintainer 312to have his or her own CVS tree). 313</p><p> 314No statements about the stability or functionality of any module 315should be implied due to its presence here. 316</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2595444"></a>DatabaseFS</h3></div></div></div><p> 317 URL: <a href="http://www.css.tayloru.edu/~elorimer/databasefs/index.php" target="_top">http://www.css.tayloru.edu/~elorimer/databasefs/index.php</a> 318 </p><p>By <a href="mailto:elorimer@css.tayloru.edu" target="_top">Eric Lorimer.</a></p><p> 319 I have created a VFS module that implements a fairly complete read-only 320 filesystem. It presents information from a database as a filesystem in 321 a modular and generic way to allow different databases to be used 322 (originally designed for organizing MP3s under directories such as 323 “<span class="quote"><span class="emphasis"><em>Artists,</em></span></span>” “<span class="quote"><span class="emphasis"><em>Song Keywords,</em></span></span>” and so on. I have since easily 324 applied it to a student 325 roster database.) The directory structure is stored in the 326 database itself and the module makes no assumptions about the database 327 structure beyond the table it requires to run. 328 </p><p> 329 Any feedback would be appreciated: comments, suggestions, patches, 330 and so on. If nothing else, hopefully it might prove useful for someone 331 else who wishes to create a virtual filesystem. 332 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2595498"></a>vscan</h3></div></div></div><p>URL: <a href="http://www.openantivirus.org/projects.php#samba-vscan" target="_top">http://www.openantivirus.org/projects.php#samba-vscan</a></p><p> 333 samba-vscan is a proof-of-concept module for Samba, which 334 provides on-access anti-virus support for files shared using 335 Samba. 336 samba-vscan supports various virus scanners and is maintained 337 by Rainer Link. 338 </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="CUPS-printing.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="winbind.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�20.�CUPS Printing Support�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�22.�Winbind: Use of Domain Accounts</td></tr></table></div></body></html> 339