The World Is a libferris Filesystem
Listing 11. Output of One Virtual Console
$ fcreate --create-type=db4 --rdn=raw.db . $ fls --monitor-all -0 ./raw.db Created new1 Changed c:0x8321f88 /tmp/ljdb/raw.db Changed c:0x8321f88 /tmp/ljdb/raw.db Deleted new1 Created redirected-output Changed c:0x8321f88 /tmp/ljdb/raw.db
Listing 12. Output of Another Virtual Console
$ ftouch ./raw.db/new1 $ ferrisrm -v ./raw.db/new1 removing ./raw.db/new1 $ echo "hello" | \ ferris-redirect -T ./raw.db/redirected-output $ fcat ./raw.db/redirected-output hello
Many operations performed with libferris are also stored for possible future use. This includes the types of files you recently created (png, jpeg, db, tuple and so on), which files you recently edited and viewed and more. All of this is kept only for your personal use and never sent anywhere. Storage of metadata on files you view and edit is called remembrance in libferris. Only view and edit actions invoked through libferris are currently remembered. Listing 13 shows how I set up Xine to be executed as the default view operation on Annodex media files.
Listing 13. Setting Up Xine to Play Annodex Files
$ cat xine.desktop [Desktop Entry] Name=xine Comment=Video Player Exec=xine MimeType=video/mpeg;... Icon=~/icons/xine.png Terminal=0 Type=Application $ ferris-import-desktop-file xine.desktop $ ferris-set-file-action-for-type -v -a xine \ /tmp/Wombats.anx # Lets view the video. $ alias fv="ferris-file-action -v" $ fv /tmp/Wombats.anx
Now we can explore what libferris knows about our past operations. By default, remembered operations are grouped by operation type then media type. The recommended EA for the final directories in the tree are the filename and the time it was last viewed or edited. This history virtual filesystem shown in Listing 14 shows only a set amount of the most recent operations so as not to become too large.
Listing 14. Showing Recent View Operations
$ fls remembrance:// history $ fls remembrance://history edit view $ fls remembrance://history/view video $ fls -0h remembrance://history/view/video /tmp/Wombats.anx 05 Dec 6 21:34
For each file, you also can bring up the complete list of view and edit times. This uses what libferris calls a branch filesystem. A branch filesystem best can be described as an entire personal filesystem attached to a file. Branch filesystems are accessed using the branches:// handler; all other URL handlers appear as direct children of branches://.
In Listing 15, I take a look at what branches are available for my media file and explore the remembrance view filesystem. Then, out of curiosity, I take a look into the extents branch and see that the kernel's XFS filesystem has placed the whole media file in a single contiguous extent on disk.
To see if a file has a valid digital signature, you simply can read the has-valid-signature EA on the file. The signatures branch filesystem allows much more detail to be exposed about the signature. The branchfs-attributes filesystem exposes all EAs for a file as a filesystem. Sometimes it is more convenient to access an EA as though it is a file.
Listing 15. Branch Filesystems: a Filesystem about a File
$ fls branches://file/tmp/Wombats.anx branchfs-attributes branchfs-medallions branchfs-remembrance branchfs-extents branchfs-parents branchfs-signatures $ fls -0 branches://file/tmp/\ Wombats.anx/branchfs-remembrance/view 10.7M -rw-rw---- 05 Dec 6 21:34 ... 05 Dec 6 21:35 10.7M -rw-rw---- 05 Dec 6 21:34 ... 05 Dec 6 21:39 ... $ fls --xml \ branches://file/tmp/Wombats.anx/branchfs-extents <ferrisls> <ferrisls url="branches://.../branchfs-extents" name="branchfs-extents" > <context name="0" start-block="14245376" end-block="14267375" start-address="0" end-address="21999" /> </ferrisls> </ferrisls>
In the future, libferris will continue to support mounting more things and obtaining more metadata where it can. A module for FUSE is planned to supplement the current Samba support.
Resources for this article: /article/8947.
Ben Martin has been working on filesystems for more than ten years. He is currently working toward a PhD combining Semantic Filesystems with Formal Concept Analysis to improve human-filesystem interaction.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Astronomy for KDE
- The Linux RAID-1, 4, 5 Code
- At the Forge - Getting Started with Ruby
- Cooking with Linux - Wherefore Art Thou, Oh Access Point?
- Getting Started with Salt Stack-the Other Configuration Management System Built with Python
- Profiles and RC Files
- Get Organized with Emacs Org-mode
- Fancy Tricks for Changing Numeric Base
- SoftMaker FreeOffice
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide