LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 07-18-2012, 06:18 AM   #1
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 81

Rep: Reputation: 15
Question Is GPT and LVM what I really need?


Hello everybody!

I just bough a new 2 TB hard disk and I'm wondering, would it be a very wild idea to use GPT instead of MBR? Is there any real advantage? (my BIOS is a regular one, not a UEFI)

And the second part is that I'd like to try some distributions now that I have plenty of space. (I use Ubuntu). Is using LVM a good idea for this? I read that using LVM you can resize your partitions on the fly, and I want to know more about this.

Let's suppose I use the following partitioning method with the old MBR partition table:

Code:
sda1   ext4      /           30 GB
sda2   ext4      /home     1925 GB
How would that be with GPT + LVM?

Would it be possible to resize sda2 whenever I want (even if it has many GB in use but a few unused) to create other partitions that I'd use with other distributions (Arch, Gentoo, Debian, Ututo)? And if I'm tired of them, give the GBs back to sda2?

Any advice and suggestion is accepted, thank you very much in advance!
 
Old 07-18-2012, 12:39 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,318

Rep: Reputation: 124Reputation: 124
Can't say about GPT, all I know is that it's needed for disks larger than 2TB and not all systems supports it.

LVM: This is great, but has some disadvantages.
Pro:
With LVM and for instance reiserfs you can resize on-the-fly without even unmounting first!
This I have tried several times, always worked - but of course, that is not a guarantee - remember Titanic?.
If you use ext2/3/4 partitions must be unmounted before they are resized, making it a bad combination for your root.
You can also add additional disks as needed, so LVM is really very good.

Downside - and this is taken from real life :-( (ouch what a terrible time I had)
Use LVM, use several disks, create a large partition for movie-files or whatever in that LVM.
Now imaging one disk dies...
I actually managed to rescue everything but it took days.
Without LVM, when one disk or partition goes bad, you have a physical structure to work with. This is far easier than dealing with a logical structure.
Simple solution: take backups to a separate disk. Very often people do what I did: "I'll fix the backup-ing tomorrow"...
So in short: use LVM with a filesystem that allows resizing without unmounting, and configure backups immediately.
Then, IMHO, LVM is the way to go.

And there is no problem sharing LVM:s between distros (NOT Windows though AFAIK) only they must have LVM-support.
Not all have it per default but easily installed.

Last edited by pingu; 07-18-2012 at 12:40 PM.
 
Old 07-22-2012, 04:38 AM   #3
tauro_kpo
Member
 
Registered: Feb 2007
Distribution: Debian
Posts: 81

Original Poster
Rep: Reputation: 15
Thumbs up

Hello pingu thank you for helping

First, I'm sorry to hear about your accident, I'm glad you could recover all the data. For the moment I'm not planning to use many different hard disks within a single volume group, or logical volume.

These days I was reading and testing lvm with a virtual machine, and it's a lot of fun! :-D It seems to be exactly what I need. As of GPT, I'm not sure. Would it be of any advantage to use it over MBR in a non-over-2TB hdd? Perhaps somebody could help with this other question.

You say that you can resize your partitions on-the-fly with reiserfs but that problems may arise. Regarding that, can I really resize partitions without running any risks? both file system and the logical volume? (even unmounted, is it safe?). I don't have a good knowledge of how reiserfs works, so I'll be using ext4.

How should I partition my disk? Let's suppose I'm going to use MBR.

Somewhere I read I need to create a /boot partition first, and then I'd give the rest of the space to a lvm partition. Is that a good idea? Can I simply create a single vlm partition and then assign it to a volume group and then create many logical volumes? Bear in mind that I want to boot multiple distributions with the same hard disk.

Did anybody you know try this already? I'm sure a lot of people did! I'd be of great help to hear some of your experiences.

thank you for your help
 
Old 07-22-2012, 05:33 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,488

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Ext[34] has handled on-line (mounted) resizing for years. Both enlarging and shrinking.
Whether shrinking a (mounted) root is a good idea at all is debatable - I prefer to do it offline, after having taken a backup. Not a regular event in my case.

LVM is (most) useful in Enterprise environments IMHO. Good for adding storage (pvs), not so for reducing. However it is not a substitute for backups.
As for using multiple distros in the same LVM environment, it should be do-able, but I haven't tried.
 
Old 07-22-2012, 06:12 AM   #5
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 583

Rep: Reputation: 129Reputation: 129
The advantage of GPT is that you can use 128 partitions and you can label partitions. The disadvantages are not all OSes
support GPT and to boot you have to use elilo or grub2. For LVM I don't see many advantages so I don't use it.
 
Old 07-22-2012, 12:19 PM   #6
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,318

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by syg00 View Post
Ext[34] has handled on-line (mounted) resizing for years. Both enlarging and shrinking.
OK, but what I've read about LVM is that when you use ext3/4 it is dangerous to not unmount first.
That could be old though, haven't used LVM since 2010.
 
Old 11-14-2013, 04:18 PM   #7
jheengut
Member
 
Registered: Sep 2006
Location: Providence, Moka Mauritius
Distribution: Slackware, OpenSuse, Debian, Fedora, Mageia, Ubuntu, RedHat, BSD, Gentoo, Puppy
Posts: 187
Blog Entries: 2

Rep: Reputation: 3
Quote:
Originally Posted by whizje View Post
support GPT and to boot you have to use elilo or grub2. For LVM I don't see many advantages so I don't use it.
lilo works well
 
  


Reply

Tags
gpt, lvm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPT vs MBR asipper Linux - General 9 12-23-2011 09:29 PM
CentOS 5.5 and GPT fantasygoat Linux - Hardware 4 04-08-2011 12:40 PM
[SOLVED] Slackware 13.37 - gdisk choices, MBR, GPT or Blank GPT CFet Slackware - Installation 3 04-01-2011 05:46 PM
GPT to MBR mrwall-e Linux - Software 3 08-26-2010 10:00 PM
Huge piles of disk with LVM and/or RAID - GPT/GUID?? petcherd Slackware 2 12-18-2007 05:50 PM


All times are GMT -5. The time now is 02:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration