LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-05-2012, 11:30 AM   #1
All3n
LQ Newbie
 
Registered: Jun 2012
Location: Ontario, Canada
Posts: 28

Rep: Reputation: Disabled
Help with partition sizes .


Hey guys, I'm driving my self nuts here. I will try to keep this simple, basically a question and a recommendation.

-Are Logical Volumes as secure as a separate partition?
I read where it's good (secure) to have /home or your data on a different partition, makes sense, but is that a Logical Volume, or one of the four primary partitions that you can create? ie: sda1,2,3,4.

I am installing Slinux6.2 on a lab/testing computer. It has a 360gig hdd.

I want to use it to learn RedHat but also serve files and media to windows pc and backup data from my windows pc, maybe download a few torrents etc.

Right now Slinux recommends:

lv_root 51200 <-Seems like lots? I'm fine with it though.
lv_home 286752
lv_swap 4944

So is it just a matter of creating another Logical Volume(s) for a isolated, safe data partition? ,or again, do I need a "primary" partition for sharing and backup.

I should add I also require a safe spot to put some Clonezilla backup images.

Some size suggestions would be good. I almost had a plan, now I'm swimming in it.

I know that when I install apache etc. it's going to want some room to grow, I just don't recall at the moment were it creates those folders. (/var)

Please tell me what to do! lol, I can't make up my mind.
 
Old 07-05-2012, 12:12 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Physical and logical partitions are equally secure (or unsecure if you fiddle with things you ought not to).

You can have four physical, two of those ought to be root and swap and a third can be whatever you want it to be (say, /var).

After than, define the fourth as logical, give it as much space as you want, then add additional logical partitions until you run out of disk.

I do things in multiple partitions:
Code:
df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  7.3G  6.7G  53% /
/dev/sda3        19G  3.7G   14G  22% /home
/dev/sda5        19G  3.9G   14G  22% /usr/local
/dev/sda6        19G  1.2G   17G   7% /opt
/dev/sda7        19G  304M   18G   2% /var/lib/mysql
/dev/sda8        92G   37G   51G  42% /var/lib/virtual
/dev/sda9        92G  9.0G   79G  11% /spares
/dev/sda10      173G  220M  164G   1% /var/lib/psql
tmpfs           3.9G     0  3.9G   0% /dev/shm
These fit my needs but may not fit yours -- they're only for talking purposes.

Looking at the partition map (with cfdisk /dev/sda:
Code:
                                      cfdisk (util-linux 2.19)

                                        Disk Drive: /dev/sda
                                 Size: 500107862016 bytes, 500.1 GB
                       Heads: 255   Sectors per Track: 63   Cylinders: 60801

     Name           Flags         Part Type    FS Type              [Label]            Size (MB)
 --------------------------------------------------------------------------------------------------
     sda1                          Primary     ext4                                     15998.17    
     sda2                          Primary     swap                                     15998.17
     sda3                          Primary     ext4                                     20003.89
     sda5                          Logical     ext4                                     20003.89
     sda6                          Logical     ext4                                     20003.89
     sda7                          Logical     ext4                                     20003.89
     sda8                          Logical     ext4                                    100002.96
     sda9                          Logical     ext4                                    100002.96
     sda10                         Logical     ext4                                    188087.48
                                   Logical     Free Space                                   2.62   *
The reason I do this is that during installation (at least in Slackware) as I define or allocate partitions to file systems (that get added to /etc/fstab) I can choose to not format them. Thus, the content remains intact, the partition is in /etc/fstab, they are mounted at boot and I don't have to back up huge files onto media (or a server, which is what I normally do just-in-case anyway).

For example, /var/lib/virtual contains (at present) two virtual machines, XP and Win7 which add up to 37G -- lots of stuff to back up. Similarly, /opt contains stuff I don't want to loose (and don't want to reload either), /usr/local contains all non-distribution software I've added (ditto) and /var/lib/mysql has some important data bases I don't want to loose or have to reconstruct from a lot of complicate stuff.

For all practical purposes, logical partitions are identical to physical ones (and, yeah, they're physical disk space). The limits of four physical partitions are hold-overs from the bad old days and you just have to live with 'em (for now -- there are ways around that, but it's hardly worth the effort).

Hope this helps some.
 
Old 07-05-2012, 12:42 PM   #3
All3n
LQ Newbie
 
Registered: Jun 2012
Location: Ontario, Canada
Posts: 28

Original Poster
Rep: Reputation: Disabled
Yes that helps, thank you. It also raises more questions but I must stay task oriented here.

So here is a bit of a game plan.

/ 50g
/swap 5g
/var ~100g
/storage ~200g(logical)

Does that seem reasonable?
 
Old 07-05-2012, 12:50 PM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by All3n View Post
Are Logical Volumes as secure as a separate partition?
Yes.

Quote:
I read where it's good (secure) to have /home or your data on a different partition
If you don't have a better understanding of why you might want a directory such as /home on its own partition, you are most likely better off not making that its own partition.

Quote:
is that a Logical Volume, or one of the four primary partitions
Linux doesn't care between logical an primary. Any partition can bes whichever of logical or primary you find convenient.

Quote:
I want to use it to learn RedHat but also serve files and media to windows pc and backup data from my windows pc, maybe download a few torrents etc.
You might want to make a separate partition for the samba share used to serve files to Windows PC's. Also you ought to have a swap partition.
Other than that, I suggest each Linux install be a single partition including /home and /boot etc.

Quote:
Right now Slinux recommends:
They can't guess your situation, so their recommendation isn't worth much.

Quote:
lv_root 51200 <-Seems like lots? I'm fine with it though.
lv_home 286752
I strongly advise against splitting those in your situation.

Quote:
Originally Posted by All3n View Post
So here is a bit of a game plan.

/ 50g
/swap 5g
/var ~100g
/storage ~200g(logical)

Does that seem reasonable?
Why is /var so big and why is /var separate from / ??
I don't think those are good ideas. For each Linux install I think you want a single / partition that includes /var.
I got the impression from your first post that you probably want to try more than one Linux distribution on that system. If so then swap could be shared between them and whichever is up at the moment could be configured to serve /storage to the Windows systems. You also could put any other significant data shared across distributions in /storage. So each distribution only needs a moderate size / partition.

Last edited by johnsfine; 07-05-2012 at 12:56 PM.
 
Old 07-05-2012, 01:10 PM   #5
All3n
LQ Newbie
 
Registered: Jun 2012
Location: Ontario, Canada
Posts: 28

Original Poster
Rep: Reputation: Disabled
Thanks johnsfine.

The separate /home folder idea I got from reading that it saves your user settings etc if I were to replace the OS down the road. Not all that important to me.

I will just be using a single OS on this machine.

I made a mistake as well in my last posting.

Right now the installer is showing:
sda1 500 /boot
sda2 342898 vg_labcomputer physical volume (LVM)

The breakdown of vg_labcomputer is:
lv_root 51200
lv_home 286752
lv_swap 4944


I was just attempting to separate my media and data from the /home folder and maybe have a partition for clonezilla images.
Does the "stock" configurations look good enough then for my needs? just seems like a waste having such a big /home folder, I realize I can change it later, just trying to learn something here and clone a baseline system before I change it too much.
 
Old 07-05-2012, 01:33 PM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by All3n View Post
The separate /home folder idea I got from reading that it saves your user settings etc if I were to replace the OS down the road.
That is a commonly expressed theory, but practice tends to be opposite: If you try to keep the same /home partition when switching Linux distributions, you lose all your settings. If you have a big enough hard drive, it is best to create a new / for the next distribution while leaving the old / intact. Then you have both distributions available via multi boot for a transition period during which you can move settings etc. from one to the other.
 
1 members found this post helpful.
Old 07-05-2012, 01:38 PM   #7
All3n
LQ Newbie
 
Registered: Jun 2012
Location: Ontario, Canada
Posts: 28

Original Poster
Rep: Reputation: Disabled
Gotcha. Thanks again.

I just have the default installation happening now, I will cut the pizza up later on when/if needed.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition sizes. cwizardone Slackware 7 10-31-2009 10:03 AM
Partition sizes for me Doctor Orange Linux - Newbie 2 08-13-2004 09:50 AM
Partition sizes? murbz Linux - Software 3 07-22-2004 08:43 AM
Partition sizes r3dhatter Linux - Newbie 8 07-19-2004 09:01 PM
Partition Sizes JonyKyte Linux - Newbie 12 12-23-2003 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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