No announcement yet.

Enabling quotas permanently on CentOS 7 not so clear-cut

This is a sticky topic.
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by d2d4j View Post
    A thought just came to me, do you have to turn on second level quotas as your on a vps (I forgot which vps this refers to, but there are 2 I think which need this)
    If you mean do quotas need to be compiled in the kernel, I don't believe so on a KVM virtual machine. With openVZ or Parallels I believe compiling quotas is necessary.


    • #17
      Hi Richard

      Many thanks, and those are the 2 vps which need second level quotas (must be my age sorry)

      It's interesting that your not showing /home, and Nathan has replied to me over quotas (see below), which explains why your symlinking worked, as maybe your /home is on a different drive to sda perhaps

      Is there another centos 7 image you could use or perhaps have the option to upload your own - sorry I do not use linode

      Many thanks


      You should enable quotas on the partition that contains the /home directory. I believe in our documentation we assume that /home is on the / partition, so the example commands reflect that directory.


      • #18
        Feel free to submit a support ticket if you'd like us to take a look at your configuration as well.




        • #19
          Hey John,

          Yes, as far as I know I could upload my own spin of CentOS or the full package I suppose. But I'm not willing to go that far.

          When rolling out an OS disk at Linode there are options for reserving disk space for other partitions. I simply use all space for a single partition and a small swap partition, /dev/sda & /dev/sdb, respectively. And like Ubuntu on a laptop, no /home partition is created, just a /home directory. On the same setup page the 'root/boot device' can be assigned to any of these partitions but I just use the 'standard' and default /dev/sda.

          Here's my /etc/fstab (notice the quotas):

          /dev/sda       /               ext3    noatime,errors=remount-ro,usrquota,grpquota       0 1
          /dev/sdb       none            swap    sw                              0 0
          /proc           /proc           proc    defaults                        0 0
          tmpfs           /dev/shm        tmpfs   nodev,nosuid,noexec,mode=1777             0 0
          devpts          /dev/pts        devpts  gid=5,mode=620                  0 0
          sysfs           /sys            sysfs   defaults                        0 0
          Interestingly, my previous VPS -- also KVM but on CentOS 6.5 -- didn't have a /home partition either and was laid out much the same way as my current VPS. Quotas were working and stopped working only one time but quotacheck fixed it. Sorry I can't compare notes between the two, the old server is long gone.


          • #20
            Thanks Nathan, I will start a ticket sometime today or tonight.



            • #21
              Hi Richard

              Many thanks, and your fstab does confirm quotas (which is what your first post shows on grep as well), so I'm thinking you don't need to use grub (for xfs, I think grub is needed)

              Also, your fstab shows ext3, but I'm thinking it should be fine

              I'm thinking now that centos 7 on ext3 and 4, does need the systemd unit as your first post

              IW support will confirm exactly the issue, they rock and hopefully IW or your good self will update your post when resolved.

              I think I'll make this post a sticky as there is good content for grub and centos 7, but it will be tommorow when I'm by a PC, unless tapatalk can do this

              Many thanks and have a lovely night



              • #22
                Nathan fixed me up. He pointed out that my fstab needed to state the correct file system so I changed it from ext3 to ext4 and rebooted. I didn't even notice this mismatch.

                Then he 1) created a symlink between the root partition and /dev/root; 2) ran quotacheck; 3) setup a cron job that retains the symlink after booting.

                # ln -s /dev/sda /dev/root

                # quotacheck -cugmf /

                # crontab -l
                @reboot ln -s /dev/sda /dev/root

                Quotas are now working in Interworx after booting.

                Thanks everybody.