Bug 31210 - xfs quotas will not work on UCS-3.1-1
xfs quotas will not work on UCS-3.1-1
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 3.1
All All
: P2 normal (vote)
: UCS 3.1-1-errata
Assigned To: Stefan Gohmann
Arvid Requate
:
: 29650 29652 (view as bug list)
Depends on:
Blocks: 31234
  Show dependency treegraph
 
Reported: 2013-04-26 12:49 CEST by ch
Modified: 2013-05-08 12:34 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ch 2013-04-26 12:49:52 CEST
1. UCS will not set quotas on xfs filesystems
2. if you set quota manually on xfs filesystems you see a wrong size on windows and with
   smbcquotas
3. finally you and up with not space left on device, but in the properties tab the share looks almost empty

maybe there is a relation to the following samba bug:

https://bugzilla.samba.org/show_bug.cgi?id=9146


Cheers,

  CH
Comment 1 Stefan Gohmann univentionstaff 2013-04-29 07:36:08 CEST
We have checked this and we were not able to reproduce it. 

Can you provide some more information? A detailed description about the steps you did and the results (screenshots, logs, and so on).

Known issues about xfs quota and samba: Bug #29650 and Bug #29652

Set importance back to normal because it seems not to be a general issue.
Comment 2 Kevin Dominik Korte univentionstaff 2013-04-29 08:30:06 CEST
Reported at Ticket#: 2013042621001219

root@$(dc master):~# univention-ldapsearch cn=quota_normal
# extended LDIF
#
# LDAPv3
# base <$(ldap/base)> (default) with scope subtree
# filter: cn=quota_normal
# requesting: ALL
#

# quota_normal, policies, sozgeb.sg.verwalt-berlin.de
dn: cn=quota_normal,cn=policies,$(ldap/base)
cn: quota_normal
objectClass: top
objectClass: univentionPolicy
objectClass: univentionPolicyShareUserQuota
objectClass: univentionObject
univentionObjectType: policies/share_userquota
univentionQuotaHardLimitSpace: 800MB
univentionQuotaSoftLimitInodes: 50000
univentionQuotaHardLimitInodes: 80000
univentionQuotaSoftLimitSpace: 500MB

# search result
search: 3
result: 0 Success

# numResponses: 2
# numEntries: 1

hier die Aussgabe des smbcquota Kommandos nach setzen der quota:

root@$(samba 3 Member):~# smbcquotas //$(samba 3 Member)/home -U Administrator -L
Enter Administrator's password: 
$(user account)         :            2048/       NO LIMIT/       NO LIMIT


hier der Versuch die quota mit dem Befehl smbcquota zu setzen:

root@$(samba 3 Member):~# smbcquotas //$(samba 3 Member)/home -U Administrator -S
FSQLIM:204800000/307200000
Enter Administrator's password: 
SMB_FS_QUOTA_INFORMATION failed: NT_STATUS_ACCESS_DENIED
NT_STATUS_ACCESS_DENIED cli_set_fs_quota_info

(das Password ist richtig, aber set quota command aus der smb.conf (univention-setquota)
schlägt fehl)

hier der logoutput des Kommandos (univention-setquota):

Fr 26. Apr 09:33:49 CEST 2013
"/data/home" 1 -1 2 200000 300000 100000 150000 1024
Comment 3 Stefan Gohmann univentionstaff 2013-04-29 22:32:57 CEST
I've talked to CH and after some more tests I was able to reproduce it. Thanks for the clarification.

I've installed a UCS 3.1-1 amd64 with Samba 4 and various xfs partitions. I've enabled the file system quota via the UMC module:
 https://<server>/univention-management-console/?module=quota

After that I created a share and linked a quota policy with the share.

In Windows XP SP3 the file system shows the double side and the reserved file system is only a few bytes.

The same occurred with a Samba 3 Memberserver as member in the S4 domain. I think it is also the same with a Samba 3 Memberserver in a S3 domain.

After reading Bug #29650 carefully I must say the problem is not new. But the priority has not been recognized correctly.

The patch from the samba bugzilla solved the problem for Samba 3. For Samba 4 the problem is still available but a part of the patch is applied.

We should adjust and apply the patches for Samba 3 and Samba 4. The patches uses xfs/xqm.h from xfslibs-dev and not the old linux/dqblk_xfs.h. The tests should be very carefully and combined with the upcoming errata for univention-quota: Bug #24357 + Bug #30636.
Comment 4 Stefan Gohmann univentionstaff 2013-04-29 22:35:21 CEST
*** Bug 29650 has been marked as a duplicate of this bug. ***
Comment 5 Stefan Gohmann univentionstaff 2013-04-29 22:36:28 CEST
*** Bug 29652 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Gohmann univentionstaff 2013-05-02 08:03:56 CEST
Currently the Samba 3 build does not enable the internal XFS quota. Thus a xfs partition has been recognize as "normal" partition and the limit and the used space are not calculated correctly. The build has been fixed.

I've also added a simple test case to ucs-test which tests the quota on ext2, ext3, ext4 and xfs. The test compares the smbcquota and the repquota output. This test does not check if it is still possible to upload files on an exceeded partition. This has to be checked manually.

For the QA: due to Bug #30636 the current univention-quota test package does not work. You should use an old version.

YAML: 2013-05-02-samba.yaml
Comment 7 Arvid Requate univentionstaff 2013-05-07 15:29:53 CEST
Verified:
 * ucs-test -s samba -E dangerous  on amd64: result + logfile OK
 * Advisory: OK
 * Package built for UCS3.1-2 with 76_samba-3.6-xfs-quota-patch.patch

root@master90:~# apt-cache  policy samba
samba:
  Installiert: 2:3.6.8-1.565.201305061531
  Kandidat:    2:3.6.8-1.566.201305070657
  Versionstabelle:
     2:3.6.8-1.566.201305070657 0
        500 http://192.168.0.10/build2/ ucs_3.1-0-ucs3.1-2/amd64/ Packages
 *** 2:3.6.8-1.565.201305061531 0
        500 http://192.168.0.10/build2/ ucs_3.1-0-errata3.1-1/amd64/ Packages
Comment 8 Janek Walkenhorst univentionstaff 2013-05-08 12:34:49 CEST
http://errata.univention.de/ucs/3.1/92.html