Mount XFS filesystem with userquota in Debian

0

I'm trying to get userquotas working on a xfs-formatted root partition.

However, I can't mount the partition with userquota enabled:

# mount
[...]
/dev/disk/by-uuid/91f9e241-4878-4c86-868e-e19491a12378 on / type xfs (rw,relatime,attr2,delaylog,noquota)
[...]

# cat /etc/fstab
[...]
/dev/md/2   /   xfs defaults,uquota     0 0

# dmesg | grep -i -E "(xfs|quota|md2)"
[    1.228189] VFS: Disk quotas dquot_6.5.2
[    2.810291] md: md2 stopped.
[    2.819683] md/raid1:md2: active with 2 out of 2 mirrors
[    2.819762] md2: detected capacity change from 0 to 2991329640448
[    2.832585]  md2: unknown partition table
[    3.249903] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
[    3.250357] SGI XFS Quota Management subsystem
[    3.251240] XFS (md2): Mounting Filesystem
[    3.434411] XFS (md2): Ending clean mount

I tried remounting with mount -o remount,uquota / and rebooting. The mount command didn't output anything.

I also tried using usrquota instead of uquota, but that made no difference.

Does anyone has an idea how to solve that?

EDIT: Here is what happens when I try to remount /, for clearness:

# mount | grep " / "
/dev/disk/by-uuid/91f9e241-4878-4c86-868e-e19491a12378 on / type xfs (rw,relatime,attr2,delaylog,noquota)
# mount -o remount,usrquota /
# mount | grep " / "
/dev/disk/by-uuid/91f9e241-4878-4c86-868e-e19491a12378 on / type xfs (rw,relatime,attr2,delaylog,noquota)

Fanir

Posted 2014-10-15T13:46:55.527

Reputation: 3

Answers

2

Looks like it's not mounted with quotas turned on. According to the xfs_quota man page setting quotas on root filesystems requires a different approach than other XFS filesystems. From the "QUOTA ADMINISTRATION" section of man xfs_quota:

"Turning on quotas on the root filesystem is slightly different from the above. For IRIX XFS, refer to quotaon(1M). For Linux XFS, the quota mount flags must be passed in with the 'rootflags=' boot parameter."

Setting GRUB_CMDLINE_LINUX="rootflags=quota" in /etc/default/grub, running update-grub, and rebooting should enable quotas on the root filesystem.

Steve

Posted 2014-10-15T13:46:55.527

Reputation: 36

Thanks! I totally overlooked that point in the manpage... – Fanir – 2014-11-20T12:52:40.287