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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-28-2010, 12:44 AM
|
#1
|
Member
Registered: Nov 2008
Posts: 91
Rep:
|
LVM Basics
Hi all,
I am trying to learn LVM concepts and created Physical and Volume group and output are as follows.
Quote:
[root@srv-ftp /]# /sbin/fdisk /dev/sdb
The number of cylinders for this disk is set to 30401.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 12159 97667136 8e Linux LVM
/dev/sdb2 12160 18239 48837600 8e Linux LVM
|
Can anyone please help me in explaining this output? I can understand that it is a 250GB harddisk and it has two partions of LVM type.How can i see the unpartitioned size so that i can extend or create a new partition.How is the cylinder size related to the harddisk.What does 30401 and 16065 * 512 mean ?Awaiting for your reply.Thanks in advance.
Last edited by fizeelinux; 01-28-2010 at 12:45 AM.
|
|
|
01-28-2010, 12:59 AM
|
#2
|
Member
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468
Rep:
|
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 12159 97667136 8e Linux LVM
/dev/sdb2 12160 18239 48837600 8e Linux LVM
In Red is your Total # of Cylinders.
In Blue is the last Cylinder of your 2nd partition. That means you still have space between 18240 & 30401 = 12161 Cylinders.
Take 12161 and times the Unit 8225280 bytes will give you your remaining space of 100,027,630,080 bytes. About 93GB. All this is basic partition concepts and does not really have anything to do with LVM.
The partitions marked as Linux LVM are used as the physical volumes. From them you can create volume groups and logical volumes.
To view LVM details use:
pvdisplay
vgdisplay
lvdisplay
Not in front of a *nix box, so can't tell you the exact commands. But basically, what you need to do is create another partition of type Linux LVM in the free space available.
Then use pvcreate to mark the partition as a physical volume(PV).
Use vgextend to add this PV into your current volume group (VG)
and lvextend to extend your logical volume (LV)
Finally use resize2fs to resize the filesystem into the new partition size.
Last edited by ongte; 01-28-2010 at 01:06 AM.
|
|
|
01-28-2010, 01:03 AM
|
#3
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hello,
Have a look at this LVM Tutorial, it's very easy to follow and understand and explains the commands with nice examples.
Kind regards,
Eric
|
|
|
01-29-2010, 02:24 AM
|
#4
|
Member
Registered: Nov 2008
Posts: 91
Original Poster
Rep:
|
Quote:
Originally Posted by ongte
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 12159 97667136 8e Linux LVM
/dev/sdb2 12160 18239 48837600 8e Linux LVM
In Red is your Total # of Cylinders.
In Blue is the last Cylinder of your 2nd partition. That means you still have space between 18240 & 30401 = 12161 Cylinders.
Take 12161 and times the Unit 8225280 bytes will give you your remaining space of 100,027,630,080 bytes. About 93GB. All this is basic partition concepts and does not really have anything to do with LVM.
The partitions marked as Linux LVM are used as the physical volumes. From them you can create volume groups and logical volumes.
To view LVM details use:
pvdisplay
vgdisplay
lvdisplay
Not in front of a *nix box, so can't tell you the exact commands. But basically, what you need to do is create another partition of type Linux LVM in the free space available.
Then use pvcreate to mark the partition as a physical volume(PV).
Use vgextend to add this PV into your current volume group (VG)
and lvextend to extend your logical volume (LV)
Finally use resize2fs to resize the filesystem into the new partition size.
|
Thanks a lot.I really appreciate that.Thanks for the info.
|
|
|
All times are GMT -5. The time now is 09:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|