Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7583487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:41:23+00:00 2026-05-30T18:41:23+00:00

I would like to implement per-directory quotas for a multi-user web application we’re developing.

  • 0

I would like to implement per-directory quotas for a multi-user web application we’re developing. The problem is… we have implemented a document manager for any client to store their own private documents but we don’t want to run out of space due to this feature, so we want to assign them a given limit.

As there doesn’t seem to exist a standard method for implementing per-directory quotas in Linux (I know, quotas are primarily targeted against users or groups, but we need something like the way Windows Server 2008 R2 handles quotas on a per-directory basis) I opted to use a ‘trick’. I basically do this:

touch client1.ext3
dd if=/dev/zero of=./client1.ext3 bs=1024 count=16384
mkfs.ext3 ./client1.ext3
mount -o loop,rw ./client1.ext3 ./mountpoint

It’s just a code sample, but that’s the idea… I create virtual ‘volumes’ which I assign to my clients so they can store their private data and, in case they need more, they can pay on a per-storage-ammount basis.

The ‘problem’ I see with this is I just see 8 loop devices in my /dev hierarchy, and we currently have 17 test clients for our application, so the ammount of currently present loop devices don’t cover my needs. I know you could allocate up to 256 loop devices up to kernel version 2.6.23, and the limit (from version 2.6.24 onwards) isn’t theoretically present anymore, although I still have some concerns.

Honestly, I feel like filling the /dev hierarchy with 1000+ loop devices (which are not gonna be unmounted at all during all the system lifetime) is very wrong and not the way it should be done, but maybe it’s doable as a middle-term solution, so my questions are:

  • How much memory does a single loop device take on allocation?
  • Do the system crash or have a performance hit having 256+ allocated
    loop devices?
  • Can I increase in a dynamic way the number of loop devices? or…
  • How can I pre-define the number of available loop devices at boot
    time?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:41:25+00:00Added an answer on May 30, 2026 at 6:41 pm

    The idea you described is in fact “logical volume management” (LVM) done by hand. If you use LVM for this you get the double bonus of “it’s a well known standard” and “there is good tool support for that including online resizing and more”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to implement a command line interface for a Java application. This
We would like to implement a web form that automatically saves content at regular
I would like to log how many get requests a user performed per day
I would like to implement a type-parametrized function as per excersize on page 72
I would like to implement Aero Peek of tabs in my desktop application (as
Here's the situation: I have a web-based ticket application, multiple users. One problem that
I would like to implement a decorator that provides per-request caching to any method,
I have separate repository classes for each entity. Now I would like to implement
I would like to implement in python something like this: def producer(): while True:
i would like to implement a good throttle algorithm by in .net (C# or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.