Custom File System for Linux


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Custom File System for Linux

  1. #1
    Brian Guest

    Custom File System for Linux


    I have a production Solaris system that stores 4k chunks of text in really
    big (2gig) files.

    I have a new customer that would like access to the text as lots of 4k files,
    that can be accessed with standard fopen, fread, fwrite.

    Could a custom Linux filesystem be written that could map the big files into
    virtual small files? I've read that writing filesystems for Solaris is not
    documented, that's why Linux's open source approach is appealing.

    If this is possible, could you tell me were to get started?
    Share on Google+

  2. #2
    Neil Matthew & Rick Stones Guest

    Re: Custom File System for Linux


    Brian <aldie_lab@hotmail.com> wrote in message
    news:395a93c6@news.devx.com...
    >
    > I have a production Solaris system that stores 4k chunks of text in really
    > big (2gig) files.
    >
    > I have a new customer that would like access to the text as lots of 4k

    files,
    > that can be accessed with standard fopen, fread, fwrite.
    >
    > Could a custom Linux filesystem be written that could map the big files

    into
    > virtual small files? I've read that writing filesystems for Solaris is not
    > documented, that's why Linux's open source approach is appealing.
    >
    > If this is possible, could you tell me were to get started?


    Hi,

    It is certainly possible to write your own file systems for Linux, the wide
    range of file systems available are testament to that.

    From the sound of it the features required for your production server are
    fairly simple, it is not as if you are going to need to implement a
    full-blown
    general purpose file system.

    To get started, take a look at the Filesystems HOWTO, you can get to it
    here:

    http://www.linuxdoc.org/HOWTO/Filesystems-HOWTO.html

    Rather than delve into the depths of the kernel and write a complete
    filesystem
    from scratch, you should perhaps take a look at some other options. One that
    might prove fruitful is userfs, a way to write filesystems in user space,
    that
    is ordinary processes can appear as file systems. You can catch up with the
    latest developments of this approach here:

    http://www.penguin.cz/~jim/userfs/

    Currently Linux has a file size limit of 2Gb, so if you need to go bigger
    than
    this you may need to look at your own device driver and emulate a
    filesystem.
    One approach might be to replace fopen and fclose in the application
    (perhaps
    by preloading some of your own code in a shared object) and use a device
    driver
    to seek inside a raw disk partition to get to the 4K block you need.

    Hope this helps
    Neil and Rick



    Share on Google+

Similar Threads

  1. new file system
    By german aracil boned in forum Open Source
    Replies: 0
    Last Post: 08-24-2003, 06:07 PM
  2. Windows File System
    By Sai in forum VB Classic
    Replies: 0
    Last Post: 10-14-2001, 01:11 PM
  3. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 10:01 AM
  4. Windows 2000 File System -- limitations?
    By erictn in forum Enterprise
    Replies: 0
    Last Post: 01-26-2001, 07:40 PM
  5. Storing a file on the client's system
    By Anitha in forum authorevents.kurata
    Replies: 1
    Last Post: 04-18-2000, 01:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center