koverstreet / bcachefs

Other
707 stars 73 forks source link

Quota management does not work with multi-device filesystems #665

Open sesse opened 8 months ago

sesse commented 8 months ago

Simply:

cassarossa:~# quotaon /export/cassarossa/skummel/
quotaon: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
quotaon: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
quotaon: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
quotaon: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
quotaon: Mountpoint (or device) /export/cassarossa/skummel not found or has no quota enabled.
cassarossa:~# edquota -P 1000
edquota: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
edquota: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
edquota: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
edquota: Cannot stat() mounted device /dev/dm-51:/dev/dm-50: No such file or directory
No filesystems with quota detected.

The filesystem has been created with user, group and project quota when it was formatted.

alexminder commented 4 weeks ago

Same for me:

# mount -t bcachefs
/dev/sdc:/dev/sda:/dev/sdb on / type bcachefs (rw,relatime,metadata_replicas=2,data_replicas=2,compression=lz4,background_compression=zstd:15,metadata_target=ssd,foreground_target=ssd,background_target=hdd,promote_target=ssd,root_reserve_percent=1,usrquota,grpquota,prjquota)

# grep . /etc/proj*
/etc/projects:1:/var/downloads
/etc/projid:downloads:1

# edquota -P 1
edquota: Cannot stat() mounted device /dev/sdc:/dev/sda:/dev/sdb: No such file or directory
No filesystems with quota detected.

# setquota -P downloads 500G 1T 0 0 -a
setquota: Cannot stat() mounted device /dev/sdc:/dev/sda:/dev/sdb: No such file or directory
setquota: Error getting quota information to update.

# chattr +P -p 1 /var/downloads
chattr: Not supported while setting flags on /var/downloads