2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

dockerでpquotaを有効にする

Posted at

dockerでディスク使用量を制限するためにはgrubでproject quotaを有効にする必要があります。

Quotas are support on btrfs, overlay2+xfs, and and devicemapper.

 と言われた場合に。

##grubの編集

vi /etc/default/grub

どこかに

GRUB_CMDLINE_LINUX_DEFAULT="rootflags=uquota,pquota" 

を追加

##grub更新
んで( https://qiita.com/moukuto/items/c78f29f9bd1221baffca )より引用

・BIOSマシン

grub2-mkconfig -o /boot/grub2/grub.cfg

・UEFIマシン

grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

##再起動

##確認

GRUB_CMDLINE_LINUXの変更が適用されているかは、以下コマンドで確認可能

cat /proc/cmdline
[root@localhost ~]# cat /proc/cmdline
BOOT_IMAGE=/vmlinu(中略)uiet rootflags=uquota,pquota

#Ref
https://forums.docker.com/t/storage-quota-per-container-overlay2-backed-by-xfs/37653
https://qiita.com/moukuto/items/c78f29f9bd1221baffca

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?