After booting on the vroot enabled vserver kernel, you should have a directory /dev/vroot/ with 8 vroot devices (0-7) you can use to set up your quota, if you don't, then you may make them by mknod /dev/vroot/n b 4 n (where n can be from 0 to 7). |
After booting on the vroot enabled vserver kernel, you should have a directory /dev/vroot/ with 8 vroot devices (0-7) you can use to set up your quota, if you don't, then you may make them by mknod /dev/vroot/n b 4 n (where n can be from 0 to 7).
If your distro uses udev, the vroot devices will be called: /dev/vroot[0-7] |
Use vrsetup to tell the kernel what block device you want to handle quota for: vrsetup /dev/vroot/0 /dev/evms/vs |
Use vrsetup to tell the kernel what block device you want to handle quota for:
vrsetup /dev/vroot/0 /dev/evms/vs or vrsetup /dev/vroot/0 /dev/lvm/vserver0 |
Setting up the vserver for quota is straight forward, you alter the fstab of the vserver and add usrquota,grpquota (or the one you need) to the options, then add quota_ctl (you need util-vserver 30.208 or newer) to the ccapabilities file. |
Setting up the vserver for quota is straight forward: (you need util-vserver 30.208 or newer)
- Step1: Create a default mtab for the guest: Add /dev/hdv1 / ufs rw,usrquota,grpquota 0 0 to /etc/vservers/<name>/apps/init/mtab - Step2: Add the quota capability to the guest vserver: Add quota_ctl to /etc/vservers/<name>/ccapabilities |
We are not done yet, we need to copy the vroot device which we setup earlier the vserver .. how you do this is up to you, but here is an idea: start the vserver and vnamespace -e <vs> cp -a /dev/vroot/0 /vservers/<vs>/dev/hdv1 .. |
Now you have a quota enabled vserver! |
Now you need to copy the vroot device which we setup earlier, to the vserver:
<code> cp -af /dev/vroot/0 /vservers/<name>/dev/hdv1 </code> Finishing the setup: - start your guest - inside the guest run: <code> quotacheck -maugv </code> - still inside the guest, turn quotas on DONE! |