LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partitioning issue (https://www.linuxquestions.org/questions/linux-newbie-8/partitioning-issue-719882/)

tech_paul 04-17-2009 12:19 PM

Partitioning issue
 
Hi,

I have done the following partitions on CentOS:

/boot - 100MB
/swap - 4GB
/root - 4GB
/var/log - 2GB
/var/mysql - 5GB
/tmp - 1GB
/var/www - rest

and while I started installing packages, it is telling me partition /root is full.

Am I understanding well that all other partitions are being created under /root?

Can someone tell me why this is happening to me? How can I solve it?

Thanks

MS3FGX 04-17-2009 12:40 PM

/root is the home directory of the root user (which you have allocated 4 GB), but the "root" filesystem is /. Are you sure it is saying that /root is full and not root? Since you haven't shown how much space you allocated to the root filesystem.

tech_paul 04-17-2009 01:14 PM

Hi,

Thanks for you reply

Here is the result of my partitions:

[root@www ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 3.9G 3.2G 506M 87% /
/dev/sda8 126G 196M 120G 1% /var/www
/dev/sda7 996M 66M 879M 7% /tmp
/dev/sda6 2.0G 39M 1.8G 3% /var/log
/dev/sda2 4.9G 139M 4.5G 3% /var/mysql
/dev/sda1 99M 17M 77M 19% /boot
tmpfs 506M 0 506M 0% /dev/shm

What is taking me so much from / in a new installation? I have just installed apache bind and webalizer. Do you suggest more space for / than 4GB? this is a shared hosting server. what partitions do you suggest please?

Thanks for your help!

MS3FGX 04-17-2009 01:26 PM

You have sort of a strange partition setup here. You have partitioned off all of the directories that are small, and left all the big stuff on the single partition.

The root filesystem (/) and /usr will take up probably 80-90% of the space on a fresh install, and you have them both on the single 4 GB partition; while directories which will never take up much space like /tmp and /var/log are pushed into their own. It is a good idea to push things like /var/log off to another partition for security reasons (though with modern log rotation and disk sizes, DoS via logging seems pretty unlikely), but you need to makes sure the core OS has enough space to operate.

There is no reason to put /boot onto it's own partition on modern hardware, so you can leave that on /. I would put / on at least 2 GB, and then /usr on another 4 GB. If you are going to leave / and /usr on the same partition, make it at least 10 GB.

tech_paul 04-18-2009 06:48 AM

You suggestions were very useful. So I will do as follows:

/swap - 4GB
/root - 15GB
/var/log - 2GB
/var/mysql - 5GB
/tmp - 512MB
/var/www - rest

What do you think with the new scheme? I have removed the /boot partition, increase the / filesystem and reduced the /tmp.

What do you think of /var/log and /var/mysql partitions? Is it good to leave them like this?

Thanks.

pixellany 04-18-2009 07:32 AM

You are still saying "/root" when you mean "/"----look at the first reply.

I have a different perspective on these things.....Unless there is a reason, I use:

swap 1GB (more with a good reason---eg for suspend to RAM)
/ at least 10GB--more if you have it

data partition, mounted somewhere appropriate

tech_paul 04-19-2009 05:23 AM

Thanks for your patient.

So lets make things clear for the last time. If I do the following partitioning I should be fine, right?

/swap - 1GB
/ - 15GB
/var/log - 2GB
/var/mysql - 5GB
/tmp - 512MB
/var/www - rest

btw I have a 146GB hard disk space. How shall I mount the data partition somewhere more appropriate? What do you mean by this please? Can you kindly elaborate more on this?

Thanks again for your cooperation.

UPDATE: I have just read that / (root direction) is the parent of all other partitions... am I understanding well please? So every other partition will fall under the / partition. This means that I MUST do the / partition the largest partition in size, right?

repo 04-19-2009 05:27 AM

I would add a partition for /home, so when you need to reinstall, you can keep the data.

jay73 04-19-2009 11:37 AM

By default, everything belongs under / but you can decide to place certain subdirectories of / on their own partition - which is what you appear to be doing.
Frankly, it is often more convenient to leave everything - except swap, home and possibly boot - under /. It reduces the risk of this or that partition running out of space, makes backups easier, etc. Neither does having multiple partitions increase performance in any noticeable way; if you are really concerned about that kind of thing, you should spread your partitions over multiple drives instead.

pixellany 04-19-2009 10:13 PM

"/" is the parent of all directories---not partitions. It is sometimes called the "root" of the filesystem tree--or directory tree.

Filesystems on partitions can be mounted (connected) to the directory tree. When we say "mount a partition", it would be more correct to say "connect the filesystem on the partition".


All times are GMT -5. The time now is 06:47 PM.