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

x
?
Solved

Best practise for Ubuntu LVM2 Public webserver?

Posted on 2009-04-08
4
Medium Priority
?
672 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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 …
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month8 days, 2 hours left to enroll

824 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