Steps to reproduce:
Requirements: Working Active Directory setup
Install two VMs with the following basic setup with name nfssrv / smbsrv
1. Install minimal server with OpenSSH server via ISO
2. Install packages
apt-get install --yes cifs-utils mount.cifskrb5-user libnss-winbind
libpam-winbind samba smbclient winbind vim quota
3. Create /etc/samba/smb.conf
[global]
workgroup = EXAMPLE
client signing = yes
client use spnego = yes
kerberos method = secrets and keytab
realm = EXAMPLE.DOMAIN
security = ads
disable netbios = yes
idmap config * : backend = tdb
idmap config * : range = 1000-1009
idmap config EXAMPLE:backend = ad
idmap config EXAMPLE:schema_mode = rfc2307
idmap config EXAMPLE:range = 1010-999999
idmap config EXAMPLE:unix_primary_group = yes
idmap config EXAMPLE:unix_nss_info = yes
winbind use default domain = true
winbind refresh tickets = yes
winbind enum users = yes
winbind enum groups = yes
winbind expand groups = 2
4. Join system
kinit $joinuser
net ads join -k
kdestroy
4. Check /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files systemd winbind
group: files systemd winbind
shadow: files systemd
gshadow: files systemd
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
5. Restart services
systemctl restart winbind smbd
6. Enable pam-winbind and pam-mkhomedir via pam-auth-update
Input 1,2,3,4
Install nfs-server on VM nfssrv
1. Install packages
apt-get --yes install nfs-kernel-server
2. Add second disk and format
cfdisk
mkfs.ext4 -O quota /dev/sdb1
3. Add to /etc/fstab
/dev/sdb1 /export/data ext4 usrquota,grpquota 0 2
4. Mount disk
mkdir -p /export/data
systemctl daemon-reload
mount -a
5. Update /etc/exports
/export/data smbsrv(rw,sync,no_subtree_check,sec=sys)
6. Enable config
exportfs -ra
systemctl enable quotarpc
systemctl start quotarpc
7. Set quota for domain test user testdom via edquota
Disk quotas for user testdom (uid $id):
Filesystem blocks soft hard inodes soft
hard
/dev/sdb1 0 2000 4000 0 0
0
8. Check quota for testdom
Verify quota via writing data to sbd1 as user testdom
epquota -u /export/data/ -n
*** Report for user quotas on device /dev/sdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
#0 -- 20 0 0 2 0 0
#$id -- 4 2000 4000 1 0 0
Install samba-server on VM smbsrv
1. Install packages
apt-get --yes install nfs-client
2. Add to /etc/fstab
nfssrv:/export/data /data nfs defaults 0 2
3. Mount disk
mkdir -p /data
systemctl daemon-reload
mount -a
4. Add to /etc/samba/smb.conf
[data]
browseable = No
create mask = 0660
directory mask = 0770
path = /data
5. Enable config
systemctl restart smbd
Reproduce error on smbsrv
1. Mount SMB share
mount.cifs //smbsrv/data /mnt -o [email protected]
2. Run df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 2.4G 4.3M 2.4G 1% /run
efivarfs 256K 219K 33K 87% /sys/firmware/efi/efivars
/dev/sda2 97G 11G 82G 12% /
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda1 1.1G 6.2M 1.1G 1% /boot/efi
tmpfs 2.4G 12K 2.4G 1% /run/user/1000
nfssrv:/export/data 32G 0 30G 0% /data
//smbsrv/data 4.0K 4.0K 0 100% /mnt
The disk usage is always 100% even when the quota is adjusted
3. Stop quotarpc on nfssrv
systemctl stop quotarpc
4. Run df -h again
Filesystem Size Used Avail Use% Mounted on
tmpfs 2.4G 4.3M 2.4G 1% /run
efivarfs 256K 219K 33K 87% /sys/firmware/efi/efivars
/dev/sda2 97G 11G 82G 12% /
tmpfs 12G 0 12G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda1 1.1G 6.2M 1.1G 1% /boot/efi
tmpfs 2.4G 12K 2.4G 1% /run/user/1000
nfssrv:/export/data 32G 0 30G 0% /data
//smbsrv/data 32G 1.7G 30G 6% /mnt
** Changed in: samba (Ubuntu)
Status: Incomplete => New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2077725
Title:
CIFS client reports 100% disk usage when rpc-quotad is started
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2077725/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs