|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (26)
View page history| <h1>Web Scripts</h1> |
| <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>ZFS and Traditional File System Differences - Solaris ZFS Administration Guide</title> <meta content="index,follow" name="robots"> <meta name="date" content="Jun 19, 2009"> <meta content="reference" name="collection"> <link href="css/elements.css" type="text/css" rel="stylesheet"> <link href="css/indiana.css" type="text/css" rel="stylesheet"> </head> <body> <div class="Masthead"> <div class="MastheadLogo"></div> <div class="Title">Solaris ZFS Administration Guide</div> </div> <table width="100%" cellspacing="0" border="0" class="Layout"> <tbody> <tr class="PageControls" valign="top"> <td></td><td> <table width="100%"> <tr> <td align="left"><a href="chapter2.html">Previous</a></td><td align="right"><a href="chapter4.html">Next</a></td> </tr> </table> </td> </tr> <tr valign="top"> <td width="200px" class="Navigation"> <p class="toc level1 tocsp"> <a href="bookinfo.html">Document Information</a> </p> <p class="toc level1 tocsp"> <a href="preface.html">Preface</a> </p> <p class="toc level1 tocsp"> <a href="chapter.html">1. Solaris ZFS File System (Introduction)</a> </p> <p class="toc level1 tocsp"> <a href="chapter2.html">2. Getting Started With ZFS</a> </p> <div class="onpage"> <p class="toc level1 tocsp"> <a href="chapter3.html">3. ZFS and Traditional File System Differences</a> </p> <p class="toc level2"> <a href="#gbcby">ZFS File System Granularity</a> </p> <p class="toc level2"> <a href="#gbchp">ZFS Space Accounting</a> </p> <p class="toc level2"> <a href="#gayql">Mounting ZFS File Systems</a> </p> <p class="toc level2"> <a href="#gazcc">Traditional Volume Management</a> </p> <p class="toc level2"> <a href="#gbcaq">New Solaris ACL Model</a> </p> </div> <p class="toc level1 tocsp"> <a href="chapter4.html">4. Managing ZFS Storage Pools</a> </p> <p class="toc level1 tocsp"> <a href="chapter5.html">5. Managing ZFS File Systems</a> </p> <p class="toc level1 tocsp"> <a href="chapter6.html">6. Working With ZFS Snapshots and Clones</a> </p> <p class="toc level1 tocsp"> <a href="chapter7.html">7. Using ACLs to Protect ZFS Files</a> </p> <p class="toc level1 tocsp"> <a href="chapter8.html">8. ZFS Delegated Administration</a> </p> <p class="toc level1 tocsp"> <a href="chapter9.html">9. ZFS Advanced Topics</a> </p> <p class="toc level1 tocsp"> <a href="chapter10.html">10. ZFS Troubleshooting and Data Recovery</a> </p> </td><td class="ContentPane" width="705px"> <div class="MainContent"> <a name="gbcik"></a>Chapter 3<h3>ZFS and Traditional File System Differences</h3> <p>This chapter discusses some significant differences between ZFS and traditional file systems. Understanding these key differences can help reduce confusion when using traditional tools to interact with ZFS.</p> <p>The following sections are provided in this chapter:</p> <ul> <li> |
| <p> |
| Documentation on how to develop a Web Script may be found <a href="http://wiki.alfresco.com/wiki/Web_Scripts">here</a>. </p><p>Web Scripts allow you to bind new Alfresco-based functionality to a HTTP method and custom URL. A library of URLs may be built up to provide a complete API accessible via HTTP. They are ideal for building data access & update APIs and simple UI components such as Portlets. Development of Web Scripts may be performed within Alfresco. Knowledge of Java is <em><strong>not</strong></em> required.<br/> |
| <a href="chapter3.html#gbcby">ZFS File System Granularity</a> |
| </p> |
</li> <li> |
| <p> |
| For example, you could create the following API for your particular application... |
| <a href="chapter3.html#gbchp">ZFS Space Accounting</a> |
| </p> |
| <dl><dt><strong>Execute a search</strong> </dt></dl> |
</li> <li> |
| <p> |
| GET http://<host>:<port>/alfresco/service/blog/category/{category} |
| <a href="chapter3.html#gayra">Out of Space Behavior</a> |
| </p> |
| <dl><dt><strong>Retrieve meta-data for an item in the repository</strong> </dt></dl> |
</li> <li> |
| <p> |
| GET http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release |
| <a href="chapter3.html#gayql">Mounting ZFS File Systems</a> |
| </p> |
| <dl><dt><strong>Update meta-data for an item in the repository</strong> </dt></dl> |
</li> <li> |
| <p> |
| POST http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release?status=Draft |
| <a href="chapter3.html#gazcc">Traditional Volume Management</a> |
| </p> |
| <dl><dt><strong>Delete an item in the repository</strong></dt></dl> |
</li> <li> |
| <p> |
| DELETE http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release |
| <a href="chapter3.html#gbcaq">New Solaris ACL Model</a> |
| </p> |
</li> </ul> <a name="gbcby"></a> <h3>ZFS File System Granularity</h3> <p>Historically, file systems have been constrained to one device so that the file systems themselves have been constrained to the size of the device. Creating and re-creating traditional file systems because of size constraints are time-consuming and sometimes difficult. Traditional volume management products helped manage this process.</p> <p>Because ZFS file systems are not constrained to specific devices, they can be created easily and quickly, similar to the way directories are created. ZFS file systems grow automatically within the space allocated to the storage pool.</p> <p>Instead of creating one file system, such as <tt>/export/home</tt>, to manage many user subdirectories, you can create one file system per user. In addition, ZFS provides a file system hierarchy so that you can easily set up and manage many file systems by applying properties that can be inherited by file systems contained within the hierarchy.</p> <p>For an example of creating a file system hierarchy, see <a href="chapter2.html#gaypa">Creating a ZFS File System Hierarchy</a>.</p> <a name="gbchp"></a> <h3>ZFS Space Accounting</h3> <p>ZFS is based on a concept of pooled storage. Unlike typical file systems, which are mapped to physical storage, all ZFS file systems in a pool share the available storage in the pool. So, the available space reported by utilities such as <tt>df</tt> might change even when the file system is inactive, as other file systems in the pool consume or release space. Note that the maximum file system size can be limited by using quotas. For information about quotas, see <a href="chapter5.html#gazud">Setting Quotas on ZFS File Systems</a>. Space can be guaranteed to a file system by using reservations. For information about reservations, see <a href="chapter5.html#gbdbb">Setting Reservations on ZFS File Systems</a>. This model is very similar to the NFS model, where multiple directories are mounted from the same file system (consider <tt>/home</tt>).</p> <p>All metadata in ZFS is allocated dynamically. Most other file systems pre-allocate much of their metadata. As a result, an immediate space cost at file system creation for this metadata is required. This behavior also means that the total number of files supported by the file systems is predetermined. Because ZFS allocates its metadata as it needs it, no initial space cost is required, and the number of files is limited only by the available space. The output from the <tt>df -g</tt> command must be interpreted differently for ZFS than other file systems. The <tt>total files</tt> reported is only an estimate based on the amount of storage that is available in the pool.</p> <p>ZFS is a transactional file system. Most file system modifications are bundled into transaction groups and committed to disk asynchronously. Until these modifications are committed to disk, they are termed <b>pending changes</b>. The amount of space used, available, and referenced by a file or file system does not consider pending changes. Pending changes are generally accounted for within a few seconds. Even committing a change to disk by using <tt>fsync(3c)</tt> or <tt>O_SYNC</tt> does not necessarily guarantee that the space usage information is updated immediately.</p> <a name="gayra"></a> <h3>Out of Space Behavior</h3> <p>File system snapshots are inexpensive and easy to create in ZFS. Most likely, snapshots will be common in most ZFS environments. For information about ZFS snapshots, see <a href="chapter6.html#gavvx">Chapter 6, Working With ZFS Snapshots and Clones</a>.</p> <p>The presence of snapshots can cause some unexpected behavior when you attempt to free space. Typically, given appropriate permissions, you can remove a file from a full file system, and this action results in more space becoming available in the file system. However, if the file to be removed exists in a snapshot of the file system, then no space is gained from the file deletion. The blocks used by the file continue to be referenced from the snapshot.</p> <p>As a result, the file deletion can consume more disk space, because a new version of the directory needs to be created to reflect the new state of the namespace. This behavior means that you can get an unexpected <tt>ENOSPC</tt> or <tt>EDQUOT</tt> when attempting to remove a file.</p> <a name="gayql"></a> <h3>Mounting ZFS File Systems</h3> <p>ZFS is designed to reduce complexity and ease administration. For example, with existing file systems you must edit the <tt>/etc/vfstab</tt> file every time you add a new file system. ZFS has eliminated this requirement by automatically mounting and unmounting file systems according to the properties of the dataset. You do not need to manage ZFS entries in the <tt>/etc/vfstab</tt> file.</p> <p>For more information about mounting and sharing ZFS file systems, see <a href="chapter5.html#gaynd">Mounting and Sharing ZFS File Systems</a>.</p> <a name="gazcc"></a> <h3>Traditional Volume Management</h3> <p>As described in <a href="chapter.html#gaypk">ZFS Pooled Storage</a>, ZFS eliminates the need for a separate volume manager. ZFS operates on raw devices, so it is possible to create a storage pool comprised of logical volumes, either software or hardware. This configuration is not recommended, as ZFS works best when it uses raw physical devices. Using logical volumes might sacrifice performance, reliability, or both, and should be avoided.</p> <a name="gbcaq"></a> <h3>New Solaris ACL Model</h3> <p>Previous versions of the Solaris OS supported an ACL implementation that was primarily based on the POSIX ACL draft specification. The POSIX-draft based ACLs are used to protect UFS files. A new ACL model that is based on the NFSv4 specification is used to protect ZFS files.</p> <p>The main differences of the new Solaris ACL model are as follows:</p> <ul> <li> <p>Based on the NFSv4 specification and are similar to NT-style ACLs.</p> </li> <li> <p>Much more granular set of access privileges.</p> </li> <li> <p>Set and displayed with the <tt>chmod</tt> and <tt>ls</tt> commands rather than the <tt>setfacl</tt> and <tt>getfacl</tt> commands.</p> </li> <li> <p>Richer inheritance semantics for designating how access privileges are applied from directory to subdirectories, and so on.</p> </li> </ul> <p>For more information about using ACLs with ZFS files, see <a href="chapter7.html#ftyxi">Chapter 7, Using ACLs to Protect ZFS Files</a>.</p> </div> </td> </tr> <tr valign="top" class="PageControls"> <td></td><td> <table width="100%"> <tr> <td align="left"><a href="chapter2.html">Previous</a></td><td align="right"><a href="chapter4.html">Next</a></td> </tr> </table> </td> </tr> </tbody> </table> </body> </html> |