Solved

Best practise for Ubuntu LVM2 Public webserver?

Posted on 2009-04-08
4
663 Views
Last Modified: 2013-12-16
Hi all,

I'm new to LVM partitioning on linux (ubuntu 8.10 server) and want to use LVM for deviding the partions. so /var/ or a user/website wil not fill up the system.
i have two pyshical harddisks (in a VM), both 10GB

The server is meant as an public webserver and (reversed) proxy server.

I used to use this for my public webservers when using /ext3
/                    4 GB.
/VAR              4 GB.
/TMP              2 GB.
SWAP            2 GB.
/EXPORT        Remaing space - for webstorage and home directories

What should i do now and how can setup these drives.

I now have 1 big (10GB) LVM for the root /
There aren't many options when installing ubuntu when using LVM.

You can initalize 1 big VolGroup and when you try to enter it manually, you can't set sizes for LVM. SDB isn't used yet, but i have initialized it as a phyical LVM disk.

When steps should i take to setup and mount lvm and how can i move /var when in use...

Best regards,
Rick
0
Comment
Question by:Rick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
Morne Lategan earned 500 total points
ID: 24097840
I'm not sure I understand what you mean with "not many options in Ubuntu". The way I do it is:

Create a partition of 100mb or so, set it to format as ext3 and mount point as /boot

Then create a partition to fill the rest of the disk, and set it as "physical volume for LVM". The moment you return to the main menu again after creating a physical volume, the "Configure Logical Volumes" menu item is added. Select it, create a volume, and select your physical volume.

Then create logical volumes inside them, entering the size of each one, call it something like root, swap, var, home etc. When you exit back to the main menu those appear as formatable partitions in the list. Select the root one, format it as whatever filesystem you prefer and mountpoint /, same for /var and same for /user/website.

And you're set to go. All through the Ubuntu installer.
0
 

Author Comment

by:Rick
ID: 24101088
ah i looked over the "Configure the Logical Volume Manager" option! haha

really, i have redone the installation already 4 times :-D

many thanks!

Regards,
Rick
0
 

Author Comment

by:Rick
ID: 24101332
one last question...

Inside these LVM volume's I have now configured several ext3 partitions, do these automatically change if I resize a LV?
Or have to do that manually like the old days...

Would be great! :-D
0
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24101819
The "partition" size changes. But not the filesystem on it. What you'll have to do after resizing an LV is an resize2fs. With Ubuntu 8.1 you can do it online while the partition is mounted with:

resize2fs -f /dev/mapper/whatever_its_called

0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question