Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I'm running a CentOS dedicated server, with a 100Gb HD, in which I installed apache, postgesql and php, and I started running a little app from there, but the app suddenly stop working... so, I give a look at the log, an it said that the hard drive is full, but when I checked, there still had 90Gb free, so I think that I made the huge mistake of installing everything as the root user, and I used all the disk quota, so now I'm short on space, but I have a 90% of the HD free... :/
So I checked that quota was installed, and tried to edit my user qouta:
rpm -q quota
quota -u root
but nothing happened, no info, no message, nothing..
then I seeked in the centos manual, and it said that run
so there are no any quota created so far, but I'm still running out of space, and I have no idea what to do...
-If I Add the usrquota root to the fstab, and remount the system, it may work..? am I gonna lose everything I got in the HD so far..?
-Is any other way in which I can increase my root user quota..?
-There is any way to do this without erasing all the data and installing everything again as a new user..? Because I already got some users running the app and I can't just stop the server to reinstall everything again..
Hi, I'm running a CentOS dedicated server, with a 100Gb HD, in which I installed apache, postgesql and php, and
Root is the pivotal account "ruling" the system. It's not for use by human users but for system configuration and maintenance. If you would like to know more (and you should, as new Linux user) please read your distributions starter and basic server documentation. You run a server but by the looks of your /etc/fstab you partitioned it like a new users desktop with only "/" and "/home". Partitioning it "the old school way" with at least a separate "/", "/home" and "/var" (or using LVM if you find that usable) will allow your server to continue to function if for example users clog up /home.
Originally Posted by javier_ns
I started running a little app from there, but the app suddenly stop working... so, I give a look at the log, an it said that the hard drive is full, but when I checked, there still had 90Gb free,
Then first show us output of
du -mhs /*
and if one directory seems to hold gigabytes of data give us a 'du' of that directory. For example "/var":
in www it's were I have the app, some test folders and a couple of backups, thats why its taking up all that space.
I'm going to move to another server very soon (and of course I'm reading the server documentation, so this never happen again.. ) but in the meantime there is anyway to give root more space, without affecting the installed system..? or to move everything to another acount without having to reformat the disk..?
/dev/md2 has enough space for this purpose. What you need to do is stop all services (running 'lsof -Pwln -a +D/var' will show you what processes still write to /var), then create and copy /var ('mkdir -m 0755 /home/var; chown 0:0 /home/var; rsync -aAEXDS /var/ /home/var/; mv -f /var /home/var_old; ln -sf /home/var /var'), then restart your services and check the logs ('tail -f /home/var/log/secure /home/var/log/messages /home/var/log/audit/audit.log') for errors. If all went well you should reboot the server to see if it actually works (might want to disable SELinux while rebooting, enable when all seems OK). If it doesn't work then you may have trouble accessing your server so before proceding first ensure you have backups and an Out Of Band way in via iLO, IPMI, terminal server, VMWare console or whatever else you use, you get the idea.
Wow, thanks a lot for such a quick answer, but the server is in gigapros, I have no way to access it out of band, and I can't afford the risk of going offline for a long time..
So I'm afraid I'm going to try to delete as much as I can, while I move to the other server and Start from scratch in the correct way..
But it's great to know that in Linux there is always a way of doing things..!!
Thanks for all your help, I learned a lot..!!
I suspect (from the 90GB) you actually are referring to the default reserve space for root (it is 5% by default according to the "man tune2fs" documentation).
Normally, there are little to no quotas actually assigned to the root filesystem - nearly everything there is owned by root, or a designated system service account.
When a filesystem is initialized (ext2/3/4) there is a default reserve space alloted to root. This prevents non-root users from causing a denial of service by using up all the disk space. The amount of the reserve CAN be altered (tune2fs -m <reserve percent> <partition to be modified>)
For this, you can do it nearly anytime you want. It doesn't affect the filesystem data at all, only the superblock reserve amount. What I don't remember is if the effect takes place immediately, or if it requires the system to remount first.
Backup isn't required. Nice to have in any case, but for this purpose it isn't required.