Linuxでquotaコマンドを使用してディスク領域を管理するインスタンスチュートリアル
#yum install quota
2.VirtualBox HDDの作成
コードのコピー
#mkfs -t ext4 /dev/sdb
コードのコピー
#mount /dev/sdb /home
3.新しく作成したHDDのフォーマット
コードのコピー
[root@localhost ~]# mkfs -t ext4 /dev/sdb
コードのコピー
mke2fs 1.41.12 (12-Apr-2016)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
524288 inodes, 2097152 blocks
104857 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
コードのコピー
[root@localhost ~]# mount /dev/sdb /home/
[root@localhost ~]# mount -o remount,usrquota,grpquota /home [root@localhost ~]# mountコードのコピー
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")