[Samba] Custom, per share (or user) dfree command?

Бак Микаел mikael.bak at yandex.ru
Wed Nov 28 07:44:51 MST 2012


Hi list,

I am Mikael and I am new to this list.

In our data center I need to give some users low end "backup storage" to
Windows servers. For this I thought Samba shares could be a very easy
and nice solution.

I am able to limit the user's disk usage with file system quota, but
unfortunately the disk space and usage reported to the Windows machines
are the total amount of storage space and the total amount of space left
on the entire backup server. This is not that nice.

I would like to somehow tweak the way Samba reports disk usage and total
amount of disk space to its Windows clients. I could imagine a custom
script that I write to get the user's quota information and pass that
along to the clients.

I have noticed that there is a "dfree command" in the global section.
But that seems not to be able to work share specific. I must be able to
somehow resolve a username->share mapping and get quota from that
specific user.

I thought about using "homes" instead of plain shares, but I'm not sure
if that would help me in any way.

I also played with the idea to have each user a loopback mounted file
system of their own. Problem is that then they always use up all their
storage space even if they actually don't need it. That's far from optimal.

My backup server is an Ubuntu 12.04 LTS and the file system is ext3. The
reasons for that old file system are historical and not easily
replacable right now. But if changing file system is a requirement, I
will consider it.
The Samba version is the one packaged with Ubuntu (3.6.3-2ubuntu2.1).

I appreciate all help and hints I can get.
TIA,
Mikael Bak


More information about the samba mailing list