Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1041
  • Last Modified:

partition size for linux installation

HI,
i am trying to install linux by using GUI tool and i will use LVM partition

I have 2 question :

a) i need to put /boot out of LVM partition , right ??
b) how much minimum space requred for / . /var, /home , /usr , /tmp ??  ( Server installation)


0
fosiul01
Asked:
fosiul01
  • 11
  • 10
1 Solution
 
joolsCommented:
This really really depends on what it's going to be used for and is very subjective.

If you have a lot of users the /home needs to be big.
If you have a full installation then /, /usr and /var need to cater for this.
If you are using a web server then you would probably have a /var/www as well

If this is for RHCE then you will need to read the question but don't over do it! :-)

I'd suggest / = 5GB, /var = 5GB, /home = 4GB, (leave /usr under /) and /tmp = 2GB. Swap (again being subjective) is usually 2 x memory, there could well be a log of arguement about this..... :-)

Yes, /boot MUST be on a standard partition and ext3. Or ext2 if it's an older release of RH. (2.1 I think!)
0
 
fosiul01Author Commented:
ok let my installation finish then i will ask one more question which i need to clearify


are you RHCE ??
0
 
joolsCommented:
Yes, I retook on the exam on RHEL 5 several months ago, my RH7 RHCE expired and I needed to update.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
fosiul01Author Commented:
cool , that mean, you have quite good few years of solid linux experience !!!

I just started for RHCE preparation,

let see what happend and how far i can go

0
 
fosiul01Author Commented:
ok i have configured my 10GB hardrive  like this :
[root@bkworkshop ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup03-LogVol00
                      1.2G  106M  1.1G  10% /
/dev/hda1              99M  8.8M   85M  10% /boot
none                   62M     0   62M   0% /dev/shm
/dev/mapper/VolGroup00-LogVol00
                      725M   17M  671M   3% /home
/dev/mapper/VolGroup02-LogVol00
                      2.9G  856M  1.9G  32% /usr
/dev/mapper/VolGroup01-LogVol00
                      2.4G   62M  2.2G   3% /var

and

[root@bkworkshop ~]# fdisk -l

Disk /dev/hda: 10.2 GB, 10262568960 bytes
255 heads, 63 sectors/track, 1247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14         395     3068415   8e  Linux LVM
/dev/hda3             396         714     2562367+  8e  Linux LVM
/dev/hda4             715        1247     4281322+   5  Extended
/dev/hda5             715         867     1228941   82  Linux swap
/dev/hda6             868         969      819283+  8e  Linux LVM
/dev/hda7             970        1247     2233003+  8e  Linux LVM


: i create LVM partition for /home , var , usr , root

now since its more then 4 primary partition , i guess, it created one Extended

what i need to understand is :
when you guys p artition your headdrive

do you make whole hardrive as 1 primary partition then define, /home ,/var inside that   Or do you crate more then one primary partition for /var, /home and others ??

0
 
fosiul01Author Commented:
[root@bkworkshop ~]# vgdisplay -v
    Finding all volume groups
    Finding volume group "VolGroup03"
  --- Volume group ---
  VG Name               VolGroup03
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.12 GB
  PE Size               32.00 MB
  Total PE              68
  Alloc PE / Size       38 / 1.19 GB
  Free  PE / Size       30 / 960.00 MB
  VG UUID               HDWueD-0LaO-zGCn-UqC5-BDi1-fhaT-olS7v0

  --- Logical volume ---
  LV Name                /dev/VolGroup03/LogVol00
  VG Name                VolGroup03
  LV UUID                2VxdNb-nIwL-VcGy-jSsH-e1nW-rCLo-TTJQvF
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.19 GB
  Current LE             38
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Physical volumes ---
  PV Name               /dev/hda7
  PV UUID               vaylrp-1VJ0-FOfG-NTeJ-kHye-2Dlf-8dFeDX
  PV Status             allocatable
  Total PE / Free PE    68 / 30

    Finding volume group "VolGroup00"
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               768.00 MB
  PE Size               32.00 MB
  Total PE              24
  Alloc PE / Size       23 / 736.00 MB
  Free  PE / Size       1 / 32.00 MB
  VG UUID               aRMGJF-s4u5-zTS9-p4Fr-noIT-RdwM-700Qtd

  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                MQspXM-7QBR-N4WP-8w6M-ZR0b-cnxC-3iMmiD
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                736.00 MB
  Current LE             23
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1

  --- Physical volumes ---
  PV Name               /dev/hda6
  PV UUID               TLfSZd-P0wa-w7O7-rq4r-6R8p-YbgK-CiGxdm
  PV Status             allocatable
  Total PE / Free PE    24 / 1

    Finding volume group "VolGroup01"
  --- Volume group ---
  VG Name               VolGroup01
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.44 GB
  PE Size               32.00 MB
  Total PE              78
  Alloc PE / Size       77 / 2.41 GB
  Free  PE / Size       1 / 32.00 MB
  VG UUID               D3cOpV-44SF-aSXt-z7fM-Rdls-yrEz-BUetsu

  --- Logical volume ---
  LV Name                /dev/VolGroup01/LogVol00
  VG Name                VolGroup01
  LV UUID                xeERC0-agbI-jhiD-4B5R-YbU4-tUjb-fEHquu
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.41 GB
  Current LE             77
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:2

  --- Physical volumes ---
  PV Name               /dev/hda3
  PV UUID               0MB2gq-qytA-rM91-J4bU-wGAg-9cTE-F9cCLM
  PV Status             allocatable
  Total PE / Free PE    78 / 1

    Finding volume group "VolGroup02"
  --- Volume group ---
  VG Name               VolGroup02
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.91 GB
  PE Size               32.00 MB
  Total PE              93
  Alloc PE / Size       92 / 2.88 GB
  Free  PE / Size       1 / 32.00 MB
  VG UUID               1VRcjZ-3Jmw-QMWK-FK68-zouR-QU58-Yr5iGe

  --- Logical volume ---
  LV Name                /dev/VolGroup02/LogVol00
  VG Name                VolGroup02
  LV UUID                exWxrm-EWPE-7nYO-osSb-TgOV-Naub-GMQNLW
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.88 GB
  Current LE             92
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:3

  --- Physical volumes ---
  PV Name               /dev/hda2
  PV UUID               1nEVxM-vqhk-VsDp-TiG5-ZJnV-FIf9-0MoowA
  PV Status             allocatable
  Total PE / Free PE    93 / 1
0
 
joolsCommented:
Not ideal as a server installation I have to say.

The filesystems /, /var, /usr should be in the root volume group, this defaults to VolGroup00 on the standard linux build.

As an example, below id a df listing for my system, rootvg is the same as VolGroup00.
I also have an additional volume group called datavg, you'll see that my server is really running a webserver so most of the space is allocated to that.

# df -Pk
Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/mapper/rootvg-root   7935392   3296192   4229600      44% /
/dev/md0                194366     16782    167549      10% /boot
tmpfs                  1558004         0   1558004       0% /dev/shm
/dev/mapper/rootvg-tmp   2031440     68720   1857864       4% /tmp
/dev/mapper/rootvg-var   2951952    854852   1944732      31% /var
/dev/mapper/datavg-www 198384608  10641476 177503132       6% /var/www
/dev/mapper/datavg-medialib 454572016 147771908 283336584      35% /var/www/html/medialibrary
/dev/mapper/datavg-technotes 198384608   2163104 185981504       2% /var/www/html/technotes
0
 
fosiul01Author Commented:
While i am checking this question, can you just quickly have a  look at this one

http://www.experts-exchange.com/OS/Linux/Q_23785065.html?cid=239#a22634390
0
 
joolsCommented:
LVM configuration looks like the attached.

I'm not saying that this is the way to do it, it's just one of the ways to do it.



lvmsummary.txt
0
 
fosiul01Author Commented:
Ok about this line :

you have create seperate logical volume for /var

/dev/mapper/rootvg-var   2951952    854852   1944732      31% /var

and here , you have created logical volume for /var/www

/dev/mapper/datavg-www 198384608  10641476 177503132       6% /var/www


my question is : www folder should be in /var

but  you have one LV for  var and at the same time another LV for /var/www


why is that ??
 so you have 2 /var  in your system ??
0
 
joolsCommented:
No, only one /var...

The www directory is a mount point for the web server, I don't want it under /var so it's just mounted under a different directory.
0
 
fosiul01Author Commented:
Ok i am little bit of confused now

when you configured your partiton at the time of installation did not you create this logical volume ??


dev/mapper/rootvg-var   2951952    854852   1944732      31% /var
/dev/mapper/datavg-www 198384608  10641476 177503132       6% /var/www
/dev/mapper/datavg-medialib 454572016 147771908 283336584      35% /var/www/html/medialibrary
/dev/mapper/datavg-technotes 198384608   2163104 185981504       2% /var/www/html/technotes


Or , you have create logical volume only /var at time of installation

then added  extra such as :(datavg-medialib, datvg-technotes)logical volume later on ??


0
 
joolsCommented:
You will need to understand installation and partitioning. Youll notice above the heirarchy on the mount points above. /var first, then /var/www etc.

Check out the following documents;
   http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/Installation_Guide.pdf
   http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/Cluster_Logical_Volume_Manager.pdf

I used a custom kickstart script to build my OS because I didnt like the volume group names and couldnt be bothered to do it manually. The /var logical volume was created at install time in the rootvg.

I created the datavg later to increase the space available in /var/www.
0
 
fosiul01Author Commented:
yap i need to understand pertitioning first ,

i will go through those link now

meanwhile

what is /dev/md0   ??

i knew , hda, sda but never saw md0 ??( dont laugh#)
0
 
joolsCommented:
md0 is my software raid config, dont worry about that now, lookup mdadm later and have a play about.
It provides software raid on my server, the underlying physical devices are listed below.

# ./getraidinfo
--------------------
--- RAID Summary ---
--------------------

--- RAID Device ---
   Raid-Dev   Raid-Level     SizeMB  N-Devs State                 Active Working  Failed   Spare
   /dev/md0   raid1             196       2 clean                      2       2       0       0

--- RAID Usage ---
   Raid-Dev   FStype     SizeMB  UsedMB  FreeMB   %Used MountPoint
   /dev/md0   ext3          190      17     164     10% /boot

--- RAID Disk Info ---
   Disk       State         Raid-Dev  Major  Minor
   /dev/cciss/c0d0p1 active-sync          0    104      1
   /dev/cciss/c0d1p1 active-sync          1    104     17

--- RAID Device ---
   Raid-Dev   Raid-Level     SizeMB  N-Devs State                 Active Working  Failed   Spare
   /dev/md1   raid1           17163       2 clean                      2       2       0       0

--- RAID Usage ---
   Raid-Dev   FStype     SizeMB  UsedMB  FreeMB   %Used MountPoint
   /dev/md1   lvm2            -       -       -       - [See LVM Summary]

--- RAID Disk Info ---
   Disk       State         Raid-Dev  Major  Minor
   /dev/cciss/c0d0p2 active-sync          0    104      2
   /dev/cciss/c0d1p2 active-sync          1    104     18

--- RAID Device ---
   Raid-Dev   Raid-Level     SizeMB  N-Devs State                 Active Working  Failed   Spare
   /dev/md2   raid5          858284       4 clean                      4       4       0       0

--- RAID Usage ---
   Raid-Dev   FStype     SizeMB  UsedMB  FreeMB   %Used MountPoint
   /dev/md2   lvm2            -       -       -       - [See LVM Summary]

--- RAID Disk Info ---
   Disk       State         Raid-Dev  Major  Minor
   /dev/cciss/c0d2p1 active-sync          0    104     33
   /dev/cciss/c0d3p1 active-sync          1    104     49
   /dev/cciss/c0d4p1 active-sync          2    104     65
   /dev/cciss/c0d5p1 active-sync          3    104     81

You can cover software raid at a later stage, dont bother with it now.

If I were you I'd reinstall your server and get rid of the multiple volume groups for your O/S directories.

Read thru the docs above, customise the partitioning and dont let the installer do it for you (except to clear all the existing partitions). Don't worry what the logical volumes are called at this moment, just create a /var /home /tmp as separate lv's.
0
 
fosiul01Author Commented:
ok so you are saying :

i will make whole hardrive as one Logical volume group

then will put var, home and tmp in seperate logical volume
right ??

i will do that then,

0
 
joolsCommented:
your partitions would look something like;

hda1 size 100MB type 83 on partition /boot
hda2 the rest of the disk type 8e to be used as LVM

hdb??? or is id hdc?
hdb1 whole disk type 8e to be used as LVM.

hdb can be either part of the root volume group if you are putting operating system stuff on it.
or it can be used as a separate volume group, for now keep it as part of the rootvg.

 
0
 
joolsCommented:
It could look something like (I've made the numbers up!)

Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/mapper/rootvg-root   5000000   3296192   4229600      44% /
/dev/hda1          100000     16782    167549      10% /boot
/dev/mapper/rootvg-tmp   2000000     68720   1857864       4% /tmp
/dev/mapper/rootvg-var   5000000    854852   1944732      31% /var
/dev/mapper/rootvg-home  2000000    854852   1944732      31% /home

All under the root volume group.

0
 
fosiul01Author Commented:
yes i understood what you meant,

its time to go home and weakend as well!!!

have a good weakend

one last queston before i close this one

all the red hat web site, showing how to do lvm partitioning by using Graphical installation .

but none of them showing how to do that from text mode

do u have any link so that i can see , how to do lvm partitioning by using text mode ??
0
 
joolsCommented:
I believe text mode LVM installations are a little more tricky, I've always preferred the graphical install or kickstart approach if using LVM (or RAID).

I just did a quick search and found this...
http://www.linuxtopia.org/online_books/installation_guides/centos_x86_amd_itanium_installation/s1-diskpartitioning.html

No pretty pictures though.

Have a good week end.

J
0
 
fosiul01Author Commented:
Hi i will close this question

please have a look at this one

http://www.experts-exchange.com/OS/Linux/Q_23793051.html
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 11
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now