Convention Listings
                                                                                                                        About Us | Donate! | Contribute! | Report Problems
   
Raiden's Realm is always in need of good, community generated articles and content for our site. So if you have a Linux, Open Source or Media Freedom related article, review, tutorial, or editorial you want to contribute, by all means please submit it to admin@raiden.net. Your contributions are always appreciated and will help us out immensely. Thanks.
   
Linux and DMAPI - Data Migration Application Interface (Page 1 of 1)

Written by Doug Bonnell
Posted on: Feb 03, 2007 at 06:22am
Section: Tutorials
Printer Friendly Version
Legacy URL

There's a rather arcane extension to the Linux kernel that, in conjunction with the XFS filesystem, allows for 'hierarchical data storage' or 'data migration'. This means you can have a mounted filesystem where the files appear to be there, but the ones that haven't been accessed for a while are actually stored offline, say on other RAID systems, on network shares, tape or DVD libraries, etc.

The DMAPI extension allows the kernel to communicate a number of filesystem events to a program or programs in user space. DMAPI also supplies a number of 'behind the scenes' file manipulation functions to the user space programs. Let's do a walk through to see how this all works:

   1. Start the 'event monitor' daemon. It sets up a communications session with the kernel's DMAPI layer and waits for filesystem events.
   2. Mount an XFS filesystem with one of the options being 'dmapi'.
   3. Copy a 4GB video file to the XFS filesystem. The monitor daemon will see a 'create event' and a number of 'write events'.
   4. Now use another program to 'punch' the video file. This program uses one of the 'background' functions to truncate the file.  All of the original file attributes such as size, creation timestamp, etc. remains intact on the XFS filesystem.

       Each file has special DMAPI attributes called 'extents' that indicate the actual datasize of the file and the remaining 'virtual' filesize.  From the DMAPI perspective, each file is a virtual file with a maximum virtual size of 64 bits (2^64 bytes).

   5. After punching, if you do a 'du -h' on your XFS filesystem, you are no longer consuming 4GB for the file. The minimum 'punched' filesize depends on the block size of the filesystem, typically it's 4KB for XFS.
   6. If you perform a read operation on the punched file that's within it's punched size (say 4KB), then there is no need to recover the file.  If you read beyond that punched size, then the daemon invokes a program to restore the file from the place it was archived. Your read will block until the file is restored.

Buy using a set of user space programs, it's fairly straightfoward to determine the age of files, migrate them to offline storage to conserve the online disk space and restore the files if access is required at some future point. All of this is transparent to any applications that access the files under the filesystem with DMAPI support. The archives and migrated files can be tracked using MySQL or some other database.
Discuss this!  ( comments )

Raiden's Realm Social Bookmarking
If you have any problems with any of these links, please let us know.  Thanks.

Digg it! Slashdot It! Del.icio.us Add to StumbleUpon Add to Technorati Reddit! Add to Google Bookmarks Add to FaceBook Share Add to Twitter

Average vistor rating: 4.6 out of 5 (5 total votes)

Community Image Gallery

More Images
Submit new images to gallery

Upcoming Shows and Cons

 1.  LinuxCon 2010
 2.  OpenSource World 2010
 3.  Ohio Linux Fest 2010
 4.  Atlanta Linux Fest 2010
 5.  ESC Boston 2010
More

Announcements

This is just a reminder to everyone that we're always looking for articles for posting on our site.  So if you have a Linux, Open Source or Media related article, review, tutorial, or editorial you want to post, by all means please send it to admin@raiden.net and we'll be glad to post it.  Thanks.

Have you ever bought a PC or laptop preloaded with Linux?

Yes
No
Considering it
Other ( Please specify )

More Polls
Latest Releases
(courtesy of Distrowatch)

1. Clonezilla Live 1.2.5-38...
Released: 07/29
2. RIPLinuX 10.6
Released: 07/29
3. Mint 9-rc (Fluxbox)
Released: 07/29
4. Nexenta 3.0-rc3
Released: 07/29
5. Salix 13.0.1
Released: 07/29
6. AUSTRUMI 2.1.6
Released: 07/28

More
All original content on this site is copyright of Raiden's Realm via the Creative Commons license. All rights reserved.

Any non original content is the sole property of the respective owners.