Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-13-2009, 10:14 AM   #1
LQ Newbie
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Filesystem in a filesystem?

Hi there.

Although I've been reading this forum for some time now, this is my first question, so I take this oportunity to introduce myself.

My question is a rather uncommon one, with plenty of place for creative answers.

A friend an I have a shared web hosting account, where we have running 5 different sites. The hosting company claims the accounts to have unlimited disk space, which might be true, as we have 30 GB stored there now with no problems.
But there is one glitch which don't advertise: claiming possible performance problems of the file system, there is a limit at 50.000 files for each account.
50.000 files are a lot of files, but due to the caracteristics of the websites and of the web framework we use, each site takes more than 10.000 files, and I've already had to make tarballs of the rarely used files (but used nonetheless), as we already got a warning email for having surpassed the file count limit.

So, what do you guys think I could I do? Is there some kind of "filesystem in a filesystem" for Linux, so that a lot of files could actually be saved in a single file?. The server is a Slackware with ext3 I think, and I can compile whatever I need, but obviously no root access.
Old 09-13-2009, 11:35 AM   #2
Registered: Sep 2009
Posts: 67

Rep: Reputation: 19
You could create an archive filesystem, that on the server would be one file. Within that file, it would be a filesystem and be able to store files in it. Depends on how they would be counting how many files you have on the server, and whether or not they would add up too.

To create a filesystem in a filesystem, you could do this for a 10MB filesystem:

> dd if=/dev/zero of=/path/to/filesystem/newfilesys bs=1024 count=10000
> mkfs.ext3 /path/to/filesystem/newfilesys
This will give you a warning, usually, that it is not a block special device. You can continue. Then you would mount the filesystem as you would any other. Problem is that once you mount it, then files added could be added to the total file count!

You could try to upgrade to a larger number of total files on the server, or figure out an archive server to use.
Old 09-13-2009, 11:49 AM   #3
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
dd a file and make a filesystem on the file, mount the file, yada yada yada, just like above. But that might be difficult without root access. And not particularly efficient.

Does the host give you access to mysql? You can store the files in the database, and the database would only use a few files in and off itself. I'm not sure if it would trigger the same issue or not. But it's a pre-made somewhat efficient perveyor of data that's readily available and doesn't really require god like priviledges to use. Or a rocket science degree to understand.
Old 09-13-2009, 11:50 AM   #4
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Originally Posted by fryguy View Post

[ snip ]

So, what do you guys think I could I do? Is there some kind of "filesystem in a filesystem" for Linux, so that a lot of files could actually be saved in a single file?. The server is a Slackware with ext3 I think, and I can compile whatever I need, but obviously no root access.
Most modern websites get around this problem by using a database instead of having all the files statically stored. A commonly seen Linux-hosted database is MySQL. Sites that have a lot of content, that must update their content regularly, use a database in the background to create the pages they deliver to their visitors.

ISPs have different rules for databases because they are much more efficient (in both time and space) than static filesystems. And one could store each database record in compressed form to save space.

Your ISP's file limit of 50,000 files seems perfectly reasonable. Only online newspapers with multi-year archives is likely to exceed that limit (with 10 new articles per day, that would be about 14 years of storage). And this is why a database makes more sense -- the database might contain the minimal amount of information required to reconstruct the original page, using the most efficient content description, and then each record would be compressed before storage.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Readonly Filesystem and Mounting filesystem as readonly bluepenguine Linux - Newbie 1 06-19-2009 01:26 AM
Confusing USB Filesystem Problem (Can't Wipe Ext3 Filesystem) dkaplowitz Linux - Hardware 3 04-14-2007 06:30 PM
DISCUSSION: Virtual Filesystem: Building a Linux Filesystem from an Ordinary File mchirico LinuxAnswers Discussion 0 10-28-2004 10:35 PM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Which filesystem you use? Eits0 Linux - General 33 09-03-2002 09:19 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration