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!
|Working with Command Arguments||May 28, 2016|
|Secure Desktops with Qubes: Installation||May 28, 2016|
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
|ServersCheck's Thermal Imaging Camera Sensor||May 25, 2016|
- Secure Desktops with Qubes: Introduction
- Secure Desktops with Qubes: Installation
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Working with Command Arguments
- CentOS 6.8 Released
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- ServersCheck's Thermal Imaging Camera Sensor
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
- Petros Koutoupis' RapidDisk
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide