LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 08-14-2012, 11:58 AM   #1
TheCelticDoctor
LQ Newbie
 
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
Partition setup question


After much searching, I still have questions:

I want to install CentOS 6.3 on my machine. I have used CentOS 6.2 and 6.0 in the past and when I update, I install, the newer over the older, i.e. 6.2->6.3... In doing I have to back up my home dir and then, sometimes, restore it which is a pain... I install quite a bit of 3rd party software and libraries etc., and usually put them in /opt

What would be the best partition scheme if I want to either 1) continually install latest greatest CentOS, or 2) change linuces often without screwing over my home dir and other apps I have installed.

My usual partitoin scheme is something like this (I have a 1TB drive and 8GB RAM), and I don't care if I make partitions too big, but if I am being absolutely wasteful, and the partition sizes are larger than could ever be used please let me know too)...

Code:
/boot       25 GB
/          150 GB
/swap       16 GB
/usr/local 100 GB
/opt       100 GB
/home      remainder of drive
 
Old 08-14-2012, 12:05 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
I see no issues with the partition scheme you have above, the only other thing that some people would suggest is to separate /var into it's own partition so if it fills up it doesn't crash the / filesystem. But with 150GB that really isn't a huge issue for you.
 
1 members found this post helpful.
Old 08-14-2012, 12:21 PM   #3
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
200MB for boot and 25GB for root should be more then enough.
 
Old 08-15-2012, 02:26 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You do know its safe/supported to upgrade in-place for minor versions eg 6.2=>6.3 for RHEL/Centos?
Its only major 'updates' eg 5.x => 6.x that they insist on fresh installs ?
Of course, taking a backup should be done regularly anyway.
 
Old 08-15-2012, 02:38 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Personally I don't like to divide too much; probably just scared that I run out of space somewhere while still plenty of space elsewhere.

On servers, I use a separate /var (not containing webpages and databases) and /home and that's it. Not said that it's perfect, but it works for me.
 
Old 08-15-2012, 03:22 AM   #6
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Instead of trying to figure out "the best and only" partitioning layout, I suggest you look into LVM. The idea is that you can create, delete, resize your "volumes" instead of partitions at will, even on a running system. In most cases, you can even have /boot on an LVM volume.
 
Old 08-15-2012, 08:31 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, /boot must either be on a std partition or RAID1; LVM is not an option according to the docs I've read.
https://docs.redhat.com/docs/en-US/R...de/ch-lvm.html
 
Old 08-16-2012, 06:50 AM   #8
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 594

Rep: Reputation: 141Reputation: 141
grub2 can boot from lvm.
 
Old 08-16-2012, 03:34 PM   #9
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by whizje View Post
grub2 can boot from lvm.
I can confirm this works, I have a few systems on RHEL that are running GRUB2 and boot from a lvm without any problems.
 
Old 08-16-2012, 05:59 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
OK; something new then. I always use the default.
 
Old 08-17-2012, 07:36 AM   #11
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by TheCelticDoctor View Post
...and the partition sizes are larger than could ever be used please let me know too)...

Code:
/boot       25 GB
/          150 GB
/swap       16 GB
/usr/local 100 GB
/opt       100 GB
/home      remainder of drive
@Wim Sturkenboom
Quote:
Personally I don't like to divide too much; probably just scared that I run out of space somewhere while still plenty of space elsewhere.
that's the first thing that you have to learn; don't multiply partitions needlessly (sort of a paraphrase of Occam's Razor, but there is no evidence that William of Occam knew anything useful about partitions...or Bacon and Brown sauce sandwiches, either).

Quote:
Originally Posted by TheCelticDoctor View Post
In doing I have to back up my home dir and then, sometimes, restore it which is a pain..
This should work, if you are doing it right (you should only need the home backup if something goes wrong, but that is not an argument that you do not need to backup home...I usually have more than one usable backup, and don't use them, but I still need them).

To do it right, you have to leave the home partition as it was (same start, same finish, same file type and don't format), and it is probably advisable to leave all of the partitions doing the same thing as they were previously.

Restoring home has another potential 'gotcha'; if you restore hidden directories, you will restore settings for a lot of programs. That might work and save you (some) time, or it might fail and leave some programs un-startable. Probably, some of each. I'd rather make a new install a clean start, as far as program initialisation is concerned, but it is up to you. You can always delete the unwanted hidden directories for programs that do cause subsequent issues.

(And, one other question; you don't intend to multi-boot Linux distros, do you? If you did, the advice for sharing home dirs would be different.)

Quote:
Originally Posted by TheCelticDoctor View Post

Code:
/boot       25 GB
/          150 GB
/swap       16 GB
/usr/local 100 GB
/opt       100 GB
/home      remainder of drive
/boot is way larger than it need be; I've used 220M in the past, and was being generous; swap is larger than it need be. In fact, while you possibly don't need any swap with that amount of ram (you could check whether you use any...) I'd still advise a small amount of swap, so that if something does go wrong, it 'fails gracefully', but 2G would certainly do that.

(Side note; is this a 64 bit installation? you may not be able to make full use of your ram if it is 32 bit.)

I don't really see the argument for separating /opt and /usr/local on a general purpose workstation (see Wim Sturkenboom's comment); don't make the partitions and they will fall under '/' automatically, and you won't have the possibility of getting the size wrong, provided that '/' has enough space (and it does).

Last edited by salasi; 08-17-2012 at 07:37 AM. Reason: typo
 
  


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
Setup question, possible oversight in setup routine vdemuth Slackware 5 08-04-2010 01:47 PM
Multi-distro partition setup; does this sound like a good setup? Twilight in Zero Linux - General 5 02-22-2009 12:15 AM
NFS setup question: No password setup? ksgill Linux - General 4 12-04-2005 11:50 AM
Ideal Partition Setup Question AxXium Linux From Scratch 7 06-17-2005 03:15 PM
Help with setup/partition Netrack Linux - General 7 01-15-2003 08:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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