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 05-02-2014, 05:43 AM   #1
BhushanPathak
Member
 
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 85

Rep: Reputation: Disabled
Question Linux partitioning & LVM to be used together


Hello All,

I am installing CentOS 6.5 [as a VM] via a kickstart file which I created, available on a local ftp server.

I have a total of 35GB disk space available, which I have partitioned as follows in the kickstart file-

Code:
# Disk partitioning information
part swap --fstype="swap" --size=4096
part / --fstype="ext4" --size=5120
part /var --fstype="ext4" --size=15360
part /opt --fstype="ext4" --size=6144
part /home --fstype="ext4" --size=4096
Now my question is that I need to further partition the /var partition into /var/lib of 10G & rest would be 5G.

How do I achieve that?

I used system-config-kickstart utility on another CentOS server to create the original kickstart file, but it did not give any option to further partition the /var partition.

Do I continue to use the partitions specified in kickstart file & then use LVM to further separate /var into smaller LVs, or create a large LVM of the entire 35G space & use LVM to create all partitions as LVs?

Any other suggestions are welcome.


Thanks

Bhushan Pathak
 
Old 05-02-2014, 08:25 AM   #2
BhushanPathak
Member
 
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 85

Original Poster
Rep: Reputation: Disabled
Post

I updated the disk partitioning layout manually in the kickstart file as follows -

Code:
# Disk partitioning information
part swap --fstype="swap" --size=4096
part / --fstype="ext4" --size=5120
part /var/lib --fstype="ext4" --size=10240
part /var --fstype="ext4" --size=5120
part /opt --fstype="ext4" --size=6144
part /home --fstype="ext4" --size=4096
This seems to have done the job, but is it correct? Or would any issues arise in future out of it?
 
Old 05-02-2014, 09:13 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Generally I prefer to use LVM over partitioning for most purposes.

With LVM:
1) You can add additional disks or partitions to the Volume Group (VG) later to expand what is already there.
2) With LVM order isn't important so you can expand logical volumes (LVs) later even if there are other LVs added after the one you wish to expand. You can also shrink LVs to free up space for other LVs to be expanded.

On the other hand if you have partitions you have to remove everything beyond the one you have if you want to expand a given partition.

Of course /boot is generally on a partition rather than in LVM.

There might be *some* edge cases where having contiguous space might be important but they're fairly rare in my experience. We've run Oracle, MySQL and Postgres DBs in LVM with no problems for years.
 
1 members found this post helpful.
Old 05-29-2014, 03:20 AM   #4
gauravgoel1989
Member
 
Registered: Feb 2013
Posts: 42

Rep: Reputation: Disabled
It is correct. Since you require this partition standard to be applied to your new server, better you make changes in your kickstart file.
 
  


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
Lvm, nfs, raid0&5, linux networking, crontab, yum & rpm packages job description linux_learner12 Linux - Newbie 2 10-02-2012 06:40 AM
LVM Partitioning? your_shadow03 Linux - Newbie 2 09-23-2008 12:54 PM
LVM Partitioning Kryptos Linux - Newbie 1 11-19-2007 11:22 PM
LVM and Partitioning spellinator Linux - Server 1 10-05-2007 07:32 AM
Partitioning LVM retox Linux - Software 3 07-01-2007 06:33 PM

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

All times are GMT -5. The time now is 10:39 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