well, I am planning to write a program which will have thousands of images (size from 1M to 2G), and I want to store them on a raw partition. I will use a database, postgresql to keep track of where the image is, on the filesystem.
On a raw filesystem, how does one know where a certain object exists? Using Linux, BTW
> On a raw filesystem, how does one know where a certain object exists?
The name "raw" says it all - you're on your own.
It's up to you to record the names, sizes, locations on disk.
Don't forget that once you've written all your images, you may want to start deleting them as well. This will then create a huge fragmentation problem for you (not to mention a defragmentation problem).
Personally, I'd go with the file system until I know exactly what performance problem there is (if indeed there is any).
Being Linux, installing new file systems isn't too hard, so there may be some 'hugeImageFs' out there which provides the advantage of writing images to large contiguous blocks of disk (for performance), but hides some of the pain from you as well.
I have no problem recording where my file size, the whole point of my program is to keep some inventory of the image (such as physical location on hdisk).
How would you go about writing to a raw partition on Linux? Are there any docs out there for this?
Altought I think the existing filesystems are pretty accurate and they can offer nearly the best performance, he will never get the skills if he doesn't try.
Anyway, I'm curious about this. I imagine the filesystem must acomplish a kind of interface that the OS will understand. That interface is called by the native OS file handling calls, that are the actual link with the compiler. Is this right?
There is a huge difference between thinking "I'm not sure how to write <insert unknown skill>, so I'll give it a try", and writing your own file system which may potentially completely stuff your hard drive.
Well I'd say it depends on what this program is for. If it's something for work that they need quickly, I'd say stick with what you know. If it's your own pet project, you might as well learn something new, so try the raw file system (and once you figure it out, let me know too
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.