Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jan 13, 2012 3:11 pm 
Offline
Senior Newbie

Joined: Fri Jan 13, 2012 3:05 pm
Posts: 6
I asked Linode support for help, but was told to try the forum instead. :)

I have installed the Linode build of CentOS 6 64bit. I have installed DirectAdmin control panel. In order for DirectAdmin to work correct, it needs quotas enabled.

Please see this page: http://help.directadmin.com/item.php?id=42

When I run this command:
Code:
/sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;


Then I get this error:
Code:
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.


Also when I run this command:
Code:
/usr/sbin/repquota /home


I get this error:
Code:
[root@server ~]# /usr/sbin/repquota /home
repquota: Mountpoint (or device) /home not found or has no quota enabled.
repquota: Not all specified mountpoints are using quota.


However /home does exist of course and I also have DirectAdmin installed and its working. But I get quota errors in DirectAdmin when adding a user.

I have been looking at /etc/fstab but are not sure what to change there, I am a beginner at this. This is the content of my /etc/fstab

Code:
# /etc/fstab
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/xvda      /                       ext3    defaults,noatime,errors=remount-ro 1 1
/dev/xvdb      swap                    swap    defaults                           0 0
tmpfs                   /dev/shm                tmpfs   defaults                           0 0
devpts                  /dev/pts                devpts  gid=5,mode=620                     0 0
sysfs                   /sys                    sysfs   defaults                           0 0
proc                    /proc                   proc    defaults                           0 0
/var/tmpMnt /tmp ext3 loop,nosuid,noexec,rw 0 0


Also I have checked that quota is installed by yum, and it is.

Have any of you heard of this problem before? Maybe it is common for Linode VPS? I would be thankful for any help!


Top
   
 Post subject:
PostPosted: Fri Jan 13, 2012 4:05 pm 
Offline
Senior Member
User avatar

Joined: Tue Mar 17, 2009 5:11 am
Posts: 129
Location: UK
I've had the exact same issue with cPanel on Linode - quotas weren't set.

From memory I got around this by amending the fstab file to add quotas in the list of options...something like:

/dev/xvda / ext3 defaults,noatime,quotas,errors=remount-ro 1 1

But please google it as I can't remember the exact syntax. However this resolved the problem of cPanel quotas.

HTH


Top
   
 Post subject:
PostPosted: Sat Jan 14, 2012 11:52 am 
Offline
Senior Newbie

Joined: Fri Jan 13, 2012 3:05 pm
Posts: 6
Thanks. However the adding the needed to etc/fstab did not work because there was other problem. The major problem was that /dev/root did not exist on this Linode distribution of CentOS 6.0 64bit. This is how I solved the problem:

Code:
ln -s /dev/xvda /dev/root


Then I added userquota,groupquota to etc/fstab

Then I run:
Code:
/sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;


Now quota is working in DirectAdmin. I think the missing /dev/root folder is a bug with this Linode distribution of CentOS 6 64bit


Top
   
 Post subject:
PostPosted: Sat Jan 14, 2012 1:51 pm 
Offline
Senior Newbie

Joined: Fri Jan 13, 2012 3:05 pm
Posts: 6
However I now discovered that after doing:

Code:
ln -s /dev/xvda /dev/root


Even if quota is then working perfect, if I reboot the vps, then the symlink from /dev/root is removed, so each time I reboot the vps I have to run this code again:

Code:
ln -s /dev/xvda /dev/root


Does anybody know how I can do this so that it is not removed after reboot? I am a beginner at this ...


Top
   
 Post subject:
PostPosted: Sat Jan 14, 2012 4:15 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
From the looks of things, /dev/root seems to be deprecated (based on 1 and 2). From a quick survey, I have it on my Ubuntu 10.04 workstation and Linode, but not on my Ubuntu 11.10 netbook.

It might be worth checking with the DirectAdmin folks, as it is a commercial product and they've probably run into this sort of stuff before. (I don't believe I'd heard about it prior to this thread.)

Worse comes to worse, /etc/rc.local.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Feb 26, 2012 3:51 am 
Offline
Senior Newbie

Joined: Sun Sep 04, 2011 1:12 pm
Posts: 5
I'm having exactly the same issue. It seems to be a bug that affects Centos 6.x on Xen from my searches. The only problem with creating the /dev/root link in /etc/rc.local is that the link needs to exist before this code in /etc/rc.sysinit:

Code:
# Update quotas if necessary
if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then
   action $"Checking local filesystem quotas: " /sbin/quotacheck -anug
fi

if [ -x /sbin/quotaon ]; then
    action $"Enabling local filesystem quotas: " /sbin/quotaon -aug
fi


There is quite a bit of code bofore to determine if the update is really necessary before performing it, so I'm assuming that it's best not to just run it out of the blue (though I could be wrong. I've resorted to placing the following line just before the above in /etc/rc.sysinit:

Code:
# Create link to /dev/root for quota fix
ln -s /dev/xvda /dev/root


This does work and all errors in the logs are gone after reboot, however I have some questions:

1. Is editing /etc/rc.sysinit like this is acceptable?

2. Is this a file that cPanel or a future update of some sort will strip of manual edits?

3. Other than manually, is boot the only time quotas are checked or is there a regular maintenance check by cPanel somewhere? (I've not found one).

Since this only seems to happen on Xen virtualized platforms, Linode might want to check into it and perhaps modify the Centos 6.x configurations.

Thanks!

_________________
David Rahrer


Top
   
PostPosted: Sat Dec 15, 2012 4:43 pm 
Offline
Junior Member
User avatar

Joined: Sun Jan 22, 2012 1:47 am
Posts: 28
Website: http://www.xpzion7.info
Location: Rosarito
Got the same problem in centos 32 bits.

_________________
;)


Top
   
PostPosted: Wed Jul 23, 2014 5:59 am 
Offline
Senior Member

Joined: Wed Nov 16, 2011 8:15 am
Posts: 70
Upgrading my Linode to Ubuntu 14.04LTS at the moment, and I have the same issue. The symlink fixed it.

After robooting, David's solution of adding the link to the /etc/rc.sysinit did not work for me. I then put "ln -s /dev/xvda /dev/root" into /etc/rc.local and its working.

Cheers,
Nap

_________________
My VPS system:
(Ubuntu 14.04 LTS, Kernel 3.15.4-x86_64, Apache 2.4.7, MariaDB Server 5.5.40, MariaDB Client 5.5.41, PHP 5.5.9, ISPConfig 3.0.5.4p5, Webmin, PureFTP & Quota, phpMyAdmin, postfix, dovecot, amavis, clamav, spamassassin, awstats, fail2ban, Jailkit, bind9, vlogger, webalizer)


Top
   
PostPosted: Tue Aug 05, 2014 6:46 am 
Offline
Newbie

Joined: Tue Aug 05, 2014 6:41 am
Posts: 3
Also on Ubuntu 14.04. I needed to do the following :

Code:
# /etc/rc.local

ln -s /dev/xvda /dev/root
/etc/init.d/quota restart

exit 0


Top
   
PostPosted: Sat Dec 06, 2014 6:52 pm 
Offline

Joined: Sat Dec 06, 2014 6:29 pm
Posts: 1
As systemd is making my head spin at the moment, does anyone know where the best place to recreate the /dev/root symlink on Centos 7 would be? Short of enabling rc.local.

Quotas turn on with the symlink in place as with CentOS 6.x, I'm just unsure the 'proper' way to recreate the link on a reboot.

Thanks much!


Top
   
PostPosted: Thu Feb 12, 2015 4:08 pm 
Offline
Senior Newbie

Joined: Fri Jan 28, 2011 10:21 am
Posts: 17
Location: Kiev, Ukraine
tomwiebe wrote:
As systemd is making my head spin at the moment, does anyone know where the best place to recreate the /dev/root symlink on Centos 7 would be? Short of enabling rc.local.

Quotas turn on with the symlink in place as with CentOS 6.x, I'm just unsure the 'proper' way to recreate the link on a reboot.

Thanks much!

Found this udev oneliner on ubuntu forums:
Code:
echo 'KERNEL=="xvda", SUBSYSTEM=="block", SYMLINK+="root"' > /etc/udev/rules.d/99-root-link.rules


Looks like it's a much better way, than rc.local.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group