Solved

Best practise for Ubuntu LVM2 Public webserver?

Posted on 2009-04-08
4
652 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ftp to port 21 4 68
Why  my code (program) build with old compiler? 11 108
CentOS 7 Linux for HP DL380 G4 32Bits 7 75
Time Sync Best Practice 13 46
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

756 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