LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-30-2015, 08:34 PM   #1
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Rep: Reputation: Disabled
Location of the /var folder ?


A new centos 6.6 is installed. When I do a df-h I get the following. My worry now should I reinstall to create a separate /var or leave it where it will be enough? Where will the /var be in the / or /home ?

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_tt-lv_root
                      219G 1009M  207G   1% /
tmpfs                 7.7G     0  7.7G   0% /dev/shm
/dev/sda2             477M   47M  405M  11% /boot
/dev/sda1             200M  260K  200M   1% /boot/efi
/dev/mapper/vg_tt-lv_home
                       48G   52M   46G   1% /home
 
Old 07-30-2015, 08:43 PM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,110
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
/var in my experience is usually in root / , not home

Code:
$ cd /
 / $ ls
bin    dev   initrd.img      lib64       mnt   root  srv  usr      vmlinuz.old
boot   etc   initrd.img.old  lost+found  opt   run   sys  var
cdrom  home  lib             media       proc  sbin  tmp  vmlinuz
Code:
$ df -h --total
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        18G  8.9G  7.6G  55% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           389M  1.3M  388M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G   88K  1.9G   1% /run/shm
none            100M   28K  100M   1% /run/user
/dev/sda5       160G   76G   77G  50% /home
total           182G   85G   89G  49% -
Your root at 200 + gig is more than enough room for /var.

Last edited by rokytnji; 07-30-2015 at 08:45 PM.
 
Old 07-30-2015, 08:51 PM   #3
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Rokytnji,
So is this setup ok or should I reinstall it ? My worry is the mysql may grow beyond var default size of 50G ?
 
Old 07-30-2015, 10:54 PM   #4
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,140

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
I would redo the partition structure and make root only 10 or 15 gigs. then create a data partition and link stuff into the proper place. this has the advantage of keeping stuff separate should a reinstall be required for whatever reason. In your case

Code:
/ @ 15gb
/boot @ 512mb
/data @ 230gb
Adjust for LVM of course.

Last edited by jmgibson1981; 07-30-2015 at 10:58 PM.
 
1 members found this post helpful.
Old 07-31-2015, 02:38 AM   #5
Cebrian
LQ Newbie
 
Registered: Jul 2015
Location: Barcelona, Spain
Distribution: CentOS
Posts: 12

Rep: Reputation: Disabled
You can create a new lv or partition and mount it under /var.If you want dedicated storage for MySQL or MariaDB you should mount it under /var/lib/mysql/
 
1 members found this post helpful.
Old 08-01-2015, 11:03 PM   #6
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi All,
If it is not separated into different partition will it be any issue ? When there is a reinstall how its come to help I am not so clear ?
 
Old 08-02-2015, 11:06 AM   #7
Cebrian
LQ Newbie
 
Registered: Jul 2015
Location: Barcelona, Spain
Distribution: CentOS
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by newbie14 View Post
Hi All,
If it is not separated into different partition will it be any issue ? When there is a reinstall how its come to help I am not so clear ?
You will get interesting features if you use LVM like FS Snapshots, online resizing, and so on..

In my opinion is better to have one LV dedicated to database storage.

If your system was not installed with LVM I recommend you to reinstall it with LVM support.
 
1 members found this post helpful.
Old 08-02-2015, 02:39 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
normally "var" is on / ( /var )

but if you are going to be having a HUGE database there
you might want to place /var on it's OWN harddrive


my install of SL 6.6
( not using LVM and,sharing it with a second OS )
/boot -- 200 meg
/ -- 200 gig
/home -- 32 gig
 
1 members found this post helpful.
Old 08-02-2015, 03:25 PM   #9
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,110
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
Quote:
you might want to place /var on it's OWN harddrive
symlinking it to a var folder in /, No?

Placing var on another hard drive, or another partition, still requires symlink to root so logs being sent to / make it to the other var folder on another partition or another hard drive.

I run beta testing releases myself and all /home and / stuff I wish to keep goes on another partition and gets symlinked back to their respective spots in the linux file structure. I am lazy so I use rox file manager instead of command line for drag and drop symlinking. I'll like delete the var folder in /. Make a new one like for example /dev/sdb/var.

Then drag and drop /dev/sdb/var and pick relative from the menu. Instead of absolute.

If afeared newbie14. Reinstall with all the good suggestions I marked as helpful in this thread.
 
Old 08-23-2015, 10:49 PM   #10
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Rokynji,
Initially you mentioned Your root at 200 + gig is more than enough room for /var. So can I leave it as it is ? I dont think my db will go up to 50 Gb even cause we will delete data we go.
 
Old 08-27-2015, 05:39 AM   #11
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
yes. you can leave it as is, just be aware of the other comments made.
Having /var on a different partition can make it easier when upgrading your OS, but if you follow normal good practice of backing things up first, it shouldn't matter.

keeping it simple is useful, and if some time in the future your database gets so big it won't fit on the partition, add a second larger hard drive, and move everything in /var over to it, then just mount the new drive partition on /var
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can someone tell me the purpose of directories in /var/lib/nfs location? kingston Linux - Newbie 2 03-08-2011 09:43 PM
Increasing size of /var folder or mount to another folder jbspain Linux - Server 7 11-18-2010 02:33 AM
How to Change default /var/ftp/pub location in Linux mcsnadeem Linux - Distributions 1 07-12-2010 08:13 AM
how do i tar a folder to another location? steve51184 Linux - Software 4 12-11-2009 12:36 PM
change the /var/spool/mail to any other location nuker Linux - Software 6 11-05-2005 02:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration