Using additional partiions as pools for var

General support questions
Post Reply
the_dude_Abides
Posts: 8
Joined: 2015/01/01 16:35:53

Using additional partiions as pools for var

Post by the_dude_Abides » 2015/03/06 19:41:21

Hi all,

I have setup CentOS Linux release 7.0.1406 (Core), 64bit
In addition to my core setup, I have an extended partition with /dev/sda5 & /dev/sda6
and these will be used as addition storage space and share directories.

/dev/sda5 I wanted to use as a storage pool, so to speak, for when my /var directory fills up. /var is already on a separate partition, and the contents fluctuate at times.

To use /dev/sda5 as an extended space for /var
is this an efficient way to do this, and is there something missing in this setup?

Make a directory on /dev/sda5
and have that mounted as /new-dir
and edit /etc/fstab to mount at boot.
Changed the SELinux contexts of /new-dir to match /var

Then make a directory for http or ftp /new-dir/http
Change the SELinux contexts of /new-dir/http to match /var/www/html

Then in /var/www/html/directory
Create a sym-link to /new-dir/http
Ensure any SELinux contexts are correct

And then test and go?

Best,
Dave

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Using additional partiions as pools for var

Post by aks » 2015/03/08 06:53:04

That looks about right, except for anything that I've forgotten!
If you're using LVM you can just extend the existing var LVM VG group with the new space...

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Using additional partiions as pools for var

Post by TrevorH » 2015/03/08 12:31:47

I would add that it'll simply things immensely if you just mount the new filesystem directly on the place you want it. No mucking about with symlinks, no special selinux stuff required (except perhaps one restorecon -r once it's mounted the first time).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

the_dude_Abides
Posts: 8
Joined: 2015/01/01 16:35:53

Re: Using additional partiions as pools for var

Post by the_dude_Abides » 2015/03/08 21:37:53

Thanks for the responses. Yeah, it was after I set the partition up as is, I thought about extending my lvm group with the new allocated partition.

And actually, the only reason this came up is, my limited knowledge with http and ftp configuration files. I was unsure of how to use other directories with http and ftp to have the files visible when accessed on the network. The only way I know how to have the files visible is to set them up in the default locations of /var/ftp/. and /var/http/.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Using additional partiions as pools for var

Post by gerald_clark » 2015/03/08 22:45:18

CentOS does not use /var/http.
Are you running a control panel?

the_dude_Abides
Posts: 8
Joined: 2015/01/01 16:35:53

Re: Using additional partiions as pools for var

Post by the_dude_Abides » 2015/03/08 22:51:20

Sorry, I meant /var/www/html/

Post Reply