Solved

Best practise for Ubuntu LVM2 Public webserver?

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now