FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-12-2012, 09:26 AM
Muhammad Yousuf Khan
 
Default samba VFS Quota or Quota tool

Dear All,

i am about to apply quota limits on samba share. and i am confuse as
what i can see so far is that i have two option to look into one is
VFS which is embedded module and support Quota but the problem is, all
the documents are very complex to understand i at least need an
example for multiple share folders. if some one who is previously
using VFS and can share his/her config file for example purpose only.
i would be very thankful.

Secondly, Quota tool. is a partition base quota service not folder
base. and i only have 1 partition and want to assign multiple share to
single users-with-quota-limit which means multiple partitions. and
that is what i currently don't have. but i know Linux always have
workaround for everything thats why i love Linux, so is there any
thing i can do in this matter?

and being a newbie. i would like to ask one more thing that which of
the facility i should use, VFS or Quota tool, as i am not aware of the
market right now that which one is more popular and mostly people are
using. any suggestion in that should be appreciated.

Thanks,


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAGWVfM=Xy-DpaXczq=x6hPVxtNwVbk+gy-NcX_cG+QT8tf-UzA@mail.gmail.com">http://lists.debian.org/CAGWVfM=Xy-DpaXczq=x6hPVxtNwVbk+gy-NcX_cG+QT8tf-UzA@mail.gmail.com
 
Old 04-12-2012, 06:32 PM
Camaleón
 
Default samba VFS Quota or Quota tool

On Thu, 12 Apr 2012 14:26:53 +0500, Muhammad Yousuf Khan wrote:

> i am about to apply quota limits on samba share. and i am confuse as
> what i can see so far is that i have two option to look into one is VFS
> which is embedded module and support Quota but the problem is, all the
> documents are very complex to understand i at least need an example for
> multiple share folders. if some one who is previously using VFS and can
> share his/her config file for example purpose only. i would be very
> thankful.

I can help you with the global concept but no with a sample configuration
file, that's something you'll have to find out.

To setup quotas in samba you basically need setup two things:

- Enabling quotas for the mount point that holds the stored data (which
usually means installing "quota" and "quota tool" packages).

- Enabling samba quotas by configuring the corresponding samba VFS module.

(there are many guides and information on how to setup these two things on
the Internet...)

Remember that samba acts like a "glue" and knows little to nothing about
users/groups/filesystems and relays on "mapping" (linux → windows) to
mimic the Windows settings.

> Secondly, Quota tool. is a partition base quota service not folder base.
> and i only have 1 partition and want to assign multiple share to single
> users-with-quota-limit which means multiple partitions. and that is what
> i currently don't have. but i know Linux always have workaround for
> everything thats why i love Linux, so is there any thing i can do in
> this matter?

AFAIK, quotas can be applied to users/groups and to hard disk
volumes. What you can do in your case is restricting your user's quota
space and apply the restriction to the whole samba share volume. To get
this working well, you will have to play with users/grous permissions and
put special care in having a perfect mapping between samba (windows)
users/groups and your linux users/groups but still that can't be enough.

Another thing you do is discarding the use of quotas in the samba share
and monitor the available disk space in the linux volume, warning the
admin when the disk capacity reaches a defined percentage of use.

To make samba useful, what I usually do is keeping things as simple as
possible and create different directories for different purposes, for
instance:

- One (general) big pool directory where all users can read/write.

- Per user (specific) directories available only to their owners (kinda
private user dirs for their stuff).

- Hidden (non browseable) and protected directories where only root can
access to store, e.g., the bakcup files.

But designing and defining a good policy for samba to fit your network
requirements is not a simple task and requires high doses of trial and
error tests, fighting with users and permissions before you can put it
under production.

> and being a newbie. i would like to ask one more thing that which of the
> facility i should use, VFS or Quota tool, as i am not aware of the
> market right now that which one is more popular and mostly people are
> using. any suggestion in that should be appreciated.

AFAICT, you need both.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jm773e$gu4$10@dough.gmane.org">http://lists.debian.org/jm773e$gu4$10@dough.gmane.org
 
Old 04-12-2012, 08:13 PM
Muhammad Yousuf Khan
 
Default samba VFS Quota or Quota tool

On Thu, Apr 12, 2012 at 11:32 PM, Camaleón <noelamac@gmail.com> wrote:
>
> On Thu, 12 Apr 2012 14:26:53 +0500, Muhammad Yousuf Khan wrote:
>
> > i am about to apply quota limits on samba share. and i am confuse as
> > what i can see so far is that i have two option to look into one is VFS
> > which is embedded module and support Quota but the problem is, all the
> > documents are very complex to understand i at least need an example for
> > multiple share folders. if some one who is previously using VFS and can
> > share his/her config file for example purpose only. i would be very
> > thankful.
>
> I can help you with the global concept but no with a sample configuration
> file, that's something you'll have to find out.
>
> To setup quotas in samba you basically need setup two things:
>
> - Enabling quotas for the mount point that holds the stored data (which
> usually means installing "quota" and "quota tool" packages).
>
> - Enabling samba quotas by configuring the corresponding samba VFS module.
>
> (there are many guides and information on how to setup these two things on
> the Internet...)

did you mean that in order to apply quota i have to implement it in
samba config file and on mount point also.
only applying quota on mount point will not work, is that what you mean?

can you please guide me to some proper step by step example?

>
> Remember that samba acts like a "glue" and knows little to nothing about
> users/groups/filesystems and relays on "mapping" (linux → windows) to
> mimic the Windows settings.
>
> > Secondly, Quota tool. is a partition base quota service not folder base.
> > and i only have 1 partition and want to assign multiple share to single
> > users-with-quota-limit which means multiple partitions. and that is what
> > *i currently don't have. but i know Linux always have workaround for
> > everything thats why i love Linux, so is there any thing i can do in
> > this matter?
>
> AFAIK, quotas can be applied to users/groups and to hard disk
> volumes. What you can do in your case is restricting your user's quota
> space and apply the restriction to the whole samba share volume. To get
> this working well, you will have to play with users/grous permissions and

yes thank God i am already aware of the permission with user and
groups so i am not worried about it at all

> put special care in having a perfect mapping between samba (windows)
> users/groups and your linux users/groups but still that can't be enough.
>
> Another thing you do is discarding the use of quotas in the samba share
> and monitor the available disk space in the linux volume, warning the
> admin when the disk capacity reaches a defined percentage of use.
>

no i can not do that. actually i am the admin and network engineer at
the same time i am a one man army doing everything :P anyways. our
users are very irresponsible i know they will dump their personal data
to their personal folder they think personal folder on fileserver
means storage for any thing so better telling and teaching every
one quota is a best solution in my case



> To make samba useful, what I usually do is keeping things as simple as
> possible and create different directories for different purposes, for
> instance:
>
> - One (general) big pool directory where all users can read/write.
>
> - Per user (specific) directories available only to their owners (kinda
> private user dirs for their stuff).
>
> - Hidden (non browseable) and protected directories where only root can
> access to store, e.g., the bakcup files.
>
> But designing and defining a good policy for samba to fit your network
> requirements is not a simple task and requires high doses of trial and
> error tests, fighting with users and permissions before you can put it
> under production.

thanks for sharing you experience, but i was reading an article the
guy was suggesting to use a virtual file system image. so that how big
you create the file your quota will be limited to that image size no
matter whoever is accessing that share. but definitely this is a work
around.
any suggestion on that?


>
> > and being a newbie. i would like to ask one more thing that which of the
> > facility i should use, VFS or Quota tool, as i am not aware of the
> > market right now that which one is more popular and mostly people are
> > using. any suggestion in that should be appreciated.
>
> AFAICT, you need both.
>
> Greetings,
>
> --
> Camaleón
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/jm773e$gu4$10@dough.gmane.org
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAGWVfMm_039jebEu0pE-ihnWZCa+hB9b0ujouTED11SsPaa4wg@mail.gmail.com">htt p://lists.debian.org/CAGWVfMm_039jebEu0pE-ihnWZCa+hB9b0ujouTED11SsPaa4wg@mail.gmail.com
 
Old 04-13-2012, 01:22 PM
Camalen
 
Default samba VFS Quota or Quota tool

On Fri, 13 Apr 2012 01:13:13 +0500, Muhammad Yousuf Khan wrote:

> On Thu, Apr 12, 2012 at 11:32 PM, Camalen <noelamac@gmail.com> wrote:

(...)

>> To setup quotas in samba you basically need setup two things:
>>
>> - Enabling quotas for the mount point that holds the stored data (which
>> usually means installing "quota" and "quota tool" packages).
>>
>> - Enabling samba quotas by configuring the corresponding samba VFS
>> module.
>>
>> (there are many guides and information on how to setup these two things
>> on the Internet...)
>
> did you mean that in order to apply quota i have to implement it in
> samba config file and on mount point also. only applying quota on mount
> point will not work, is that what you mean?

If you want to control the available space from windows clients you have
to enable the corresponding VFS module in samba, which is just editing a
couple of samba configuration lines, nothing more.

> can you please guide me to some proper step by step example?

Nope, sorry. That information can be found easily over Internet ;-)

>> Another thing you do is discarding the use of quotas in the samba share
>> and monitor the available disk space in the linux volume, warning the
>> admin when the disk capacity reaches a defined percentage of use.
>>
>>
> no i can not do that. actually i am the admin and network engineer at
> the same time i am a one man army doing everything :P anyways. our users
> are very irresponsible i know they will dump their personal data to
> their personal folder they think personal folder on fileserver means
> storage for any thing so better telling and teaching every one quota
> is a best solution in my case

Then how about repartition the whole volume in small chunks? That way you
will limiting the available space by the partition size, and this cannot
be avoided, can be easily monitored, you will have more control over the
resources permission...

>> But designing and defining a good policy for samba to fit your network
>> requirements is not a simple task and requires high doses of trial and
>> error tests, fighting with users and permissions before you can put it
>> under production.
>
> thanks for sharing you experience, but i was reading an article the guy
> was suggesting to use a virtual file system image. so that how big you
> create the file your quota will be limited to that image size no matter
> whoever is accessing that share. but definitely this is a work around.
> any suggestion on that?

Mmm... yes, I also have read something like that in some articles and
forum threads but I'd be very hesitant to try it in my own systems (I
value my data) and given that is not the usual case for using a samba
share, should I wanted to explore that option to be implemented in my
network I would first run some tests with unimportant data on the share
and over a virtualmchine to see how it behaves. Sorry, I can't give you
more feedback on this, I have never tried it, but you can do your own
tests :-)

Greetings,

--
Camalen


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jm99be$ehq$1@dough.gmane.org">http://lists.debian.org/jm99be$ehq$1@dough.gmane.org
 
Old 04-14-2012, 07:36 AM
Muhammad Yousuf Khan
 
Default samba VFS Quota or Quota tool

Then how about repartition the whole volume in small chunks? That way you
> will limiting the available space by the partition size, and this cannot
> be avoided, can be easily monitored, you will have more control over the

> resources permission...

but i am using RAID 1, and if i divide the partition in few or many chunks it means i am creating more RAID 1 drives, is it practical ? i mean i never tried that , according to you experience what you say?





On Fri, Apr 13, 2012 at 6:22 PM, Camalen <noelamac@gmail.com> wrote:
> On Fri, 13 Apr 2012 01:13:13 +0500, Muhammad Yousuf Khan wrote:
>
>> On Thu, Apr 12, 2012 at 11:32 PM, Camalen <noelamac@gmail.com> wrote:

>
> (...)
>
>>> To setup quotas in samba you basically need setup two things:
>>>
>>> - Enabling quotas for the mount point that holds the stored data (which
>>> usually means installing "quota" and "quota tool" packages).

>>>
>>> - Enabling samba quotas by configuring the corresponding samba VFS
>>> module.
>>>
>>> (there are many guides and information on how to setup these two things

>>> on the Internet...)
>>
>> did you mean that in order to apply quota i have to implement it in
>> samba config file and on mount point also. only applying quota on mount
>> point will not work, is that what you mean?

>
> If you want to control the available space from windows clients you have
> to enable the corresponding VFS module in samba, which is just editing a
> couple of samba configuration lines, nothing more.

>
>> can you please guide me to some proper step by step example?
>
> Nope, sorry. That information can be found easily over Internet ;-)
>
>>> Another thing you do is discarding the use of quotas in the samba share

>>> and monitor the available disk space in the linux volume, warning the
>>> admin when the disk capacity reaches a defined percentage of use.
>>>
>>>
>> no i can not do that. actually i am the admin and network engineer at

>> the same time i am a one man army doing everything :P anyways. our users
>> are very irresponsible i know they will dump their personal data to
>> their personal folder they think personal folder on fileserver means

>> storage for any thing so better telling and teaching every one quota
>> is a best solution in my case
>
> Then how about repartition the whole volume in small chunks? That way you
> will limiting the available space by the partition size, and this cannot

> be avoided, can be easily monitored, you will have more control over the
> resources permission...
>
>>> But designing and defining a good policy for samba to fit your network
>>> requirements is not a simple task and requires high doses of trial and

>>> error tests, fighting with users and permissions before you can put it
>>> under production.
>>
>> thanks for sharing you experience, but i was reading an article the guy
>> was suggesting to use a virtual file system image. so that how big you

>> create the file your quota will be limited to that image size no matter
>> whoever is accessing that share. but definitely this is a work around.
>> any suggestion on that?
>
> Mmm... yes, I also have read something like that in some articles and

> forum threads but I'd be very hesitant to try it in my own systems (I
> value my data) and given that is not the usual case for using a samba
> share, should I wanted to explore that option to be implemented in my

> network I would first run some tests with unimportant data on the share
> and over a virtualmchine to see how it behaves. Sorry, I can't give you
> more feedback on this, I have never tried it, but you can do your own

> tests :-)
>
> Greetings,
>
> --
> Camalen
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/jm99be$ehq$1@dough.gmane.org

>
 
Old 04-14-2012, 09:05 PM
Camalen
 
Default samba VFS Quota or Quota tool

On Sat, 14 Apr 2012 12:36:20 +0500, Muhammad Yousuf Khan wrote:

Sir, please, turn off html, I hardly can read your messages :-(

(correcting the quotes and trimming)

>> Then how about repartition the whole volume in small chunks? That way
>> you will limiting the available space by the partition size, and this
>> cannot be avoided, can be easily monitored, you will have more control
>> over the resources permission...
>
> but i am using RAID 1, and if i divide the partition in few or many
> chunks it means i am creating more RAID 1 drives, is it practical ? i
> mean i never tried that , according to you experience what you say?

I suppose you are referring here to linux software raid (mdadm), right?

If that's the case, you can have the number of volume partitions under
the RAID1 your system can manage. In fact, that's the usual setup, I
mean, if you have two physical hard disks (sda and sdb), you'll have md0
(sda1+sdb1) for /boot, md1 (sda2+sdb2) for /, md2 (sda3+sdb3) for /home,
md3 (sda4+sdb4) for /var, etc...

What is not a good idea is to share/mix "non-raided" partitions with
"raided-ones" because an error in one of the disks will expose the
running system. It is thus recommended to have all the partitions in a
disk holding raid volumes inside a raid set.

But still... is this "a perfect" setup? Maybe not and some people would
instead recommend adding LVM over the RAID 1 to make your disk layout
even more flexible and configurable over the time.

But note that's something that will add "two" extra layers of complexity
in your configuration (first, the software raid and then, the LVM) and
while that setup can be seen as an advantadge, unexperienced users could
easily make fatal mistakes (with data loss) while setting it up. Again, I
would prefer running whatever tests you need to do from a virtualized
environment where you can break things without having to worry the day
after :-)

Greetings,

--
Camalen


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jmcoqf$2dp$7@dough.gmane.org">http://lists.debian.org/jmcoqf$2dp$7@dough.gmane.org
 
Old 04-15-2012, 09:51 AM
Muhammad Yousuf Khan
 
Default samba VFS Quota or Quota tool

On Sun, Apr 15, 2012 at 2:05 AM, Camalen <noelamac@gmail.com> wrote:
> On Sat, 14 Apr 2012 12:36:20 +0500, Muhammad Yousuf Khan wrote:
>
> Sir, please, turn off html, I hardly can read your messages :-(
>
> (correcting the quotes and trimming)
>
>>> Then how about repartition the whole volume in small chunks? That way
>>> you will limiting the available space by the partition size, and this
>>> cannot be avoided, can be easily monitored, you will have more control
>>> over the resources permission...
>>
>> but i am using RAID 1, and if i divide the partition in few or many
>> chunks it means i am creating more RAID 1 drives, is it practical ? i
>> mean i never tried that , according to you experience what you say?
>
> I suppose you are referring here to linux software raid (mdadm), right?
>
yes, definitely this is what i mean

> If that's the case, you can have the number of volume partitions under
> the RAID1 your system can manage. In fact, that's the usual setup, I
> mean, if you have two physical hard disks (sda and sdb), you'll have md0
> (sda1+sdb1) for /boot, md1 (sda2+sdb2) for /, md2 (sda3+sdb3) for /home,
> md3 (sda4+sdb4) for /var, etc...
>
> What is not a good idea is to share/mix "non-raided" partitions with
> "raided-ones" because an error in one of the disks will expose the
> running system. It is thus recommended to have all the partitions in a
> disk holding raid volumes inside a raid set.
>
> But still... is this "a perfect" setup? Maybe not and some people would
> instead recommend adding LVM over the RAID 1 to make your disk layout
> even more flexible and configurable over the time.
>
> But note that's something that will add "two" extra layers of complexity
> in your configuration (first, the software raid and then, the LVM) and
> while that setup can be seen as an advantadge, unexperienced users could
> easily make fatal mistakes (with data loss) while setting it up. Again, I
> would prefer running whatever tests you need to do from a virtualized
> environment where you can break things without having to worry the day
> after :-)
>
> Greetings,
>
Thanks , LVM is a good idea. i already have a basic understanding with
it. ok ill work over it in virtual environment and then ill implement
it on the production server.

Thanks , it was very helpful

> --
> Camalen
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/jmcoqf$2dp$7@dough.gmane.org
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAGWVfMk9-=zbZNWgRfj67ru9E=2WNySZtx7wKboHz_wAYVXtTA@mail.gma il.com">http://lists.debian.org/CAGWVfMk9-=zbZNWgRfj67ru9E=2WNySZtx7wKboHz_wAYVXtTA@mail.gma il.com
 

Thread Tools




All times are GMT. The time now is 07:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org