Solved

Best practise for Ubuntu LVM2 Public webserver?

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

856 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