Logical Volume to physical disk mapping


 
Thread Tools Search this Thread
Operating Systems Linux Logical Volume to physical disk mapping
# 1  
Old 01-10-2014
Logical Volume to physical disk mapping

When installing Linux, I choose some default setting to use all the disk space.

My server has a single internal 250Gb SCSI disk. By default the install appears to have created 3 logical volumes

lv_root, lv_home and lv_swap.

fdisk -l shows the following

Code:
lab3.nms:/dev>fdisk -l

Disk /dev/sde: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b3ade

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sde2              64       30402   243685376   8e  Linux LVM

Disk /dev/mapper/vg_lab3-lv_root: 10.5 GB, 10485760000 bytes
255 heads, 63 sectors/track, 1274 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_lab3-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_lab3-lv_home: 52.4 GB, 52428800000 bytes
255 heads, 63 sectors/track, 6374 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

So the install appears to have created 2 partitions on /dev/sde i.e. /dev/sde1 and /dev/sde2

/dev/sde1 is the boot partition.

Q1. I am assuming that the logical volumes lv_root, lv_home and lv_swap are therefore using some of the space of /dev/sde2 - how do I prove / disprove that ?

Q2. During the linux install I decrease the size of lv_home to just over 50 Gb, leaving about 180 Gb unallocated. How do I see this unallocated space ?

any help appreciated,
Jim

Last edited by bartus11; 01-10-2014 at 12:18 PM.. Reason: Please use code tags.
# 2  
Old 01-10-2014
Have a look at the vgdisplay command and see if that answers your queries.



Robin
# 3  
Old 01-10-2014
pvs is good for showing space remaining in volumes across physical vols that are part of the logical vols.

When you create a volume group, it's from a pool of storage. In your case, the pool contains a single partition /dev/sde2 (at the time you posted anyhow). You'll practically never refer to /dev/sde2 again (there are cases, but generally only useful if you are creating volumes using whole drives rather than partitions).

Perhaps some good read here: NTLUG | Articles / LVM browse
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Trouble removing Physical Disk from Volume Group

I want to remove hdisk1 from volume group diskpool_4 and migrate PV from hdisk1 to hdisk2 , but facing problems, so what is the quickest way to migratepv and remove hdisk1 -- # lspv | grep diskpool_4 hdisk1 00c7780e2e21ec86 diskpool_4 active hdisk2 ... (2 Replies)
Discussion started by: filosophizer
2 Replies

2. Solaris

Exporting physical disk to ldom or ZFS volume

Generally, this is what we do:- On primary, export 2 LUNs (add-vdsdev). On primary, assign these disks to the ldom in question (add-vdisk). On ldom, created mirrored zpool from these two disks. On one server (which is older) we have:- On primary, create mirrored zpool from the two LUNs.... (4 Replies)
Discussion started by: psychocandy
4 Replies

3. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

4. AIX

Position of the logical volume on the physical volume

Hello everyone, I just read that while creating a logical volume(LV) we can choose the region of the physical volume (PV) in which the LV should be created. When I say region I mean: outer edge - outer middle - center - inner middle and inner edge. Can anyone help me understand the utility... (11 Replies)
Discussion started by: adilyos
11 Replies

5. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

6. HP-UX

Unmount and remove all Logical vol.Volume group and physical disk

Hi, Someone please help me with how i can unmount and remove all the files systems from a cluster. This is being shared by two servers that are active_standby. (3 Replies)
Discussion started by: joeli
3 Replies

7. AIX

Basic Filesystem / Physical Volume / Logical Volume Check

Hi! Can anyone help me on how I can do a basic check on the Unix filesystems / physical volumes and logical volumes? What items should I check, like where do I look at in smit? Or are there commands that I should execute? I need to do this as I was informed by IBM that there seems to be... (1 Reply)
Discussion started by: chipahoys
1 Replies

8. Solaris

Create a logical volume from a mirror and single disk?

I have two 72GB disks that are mirrored and mounted (/backup). I have a 18GB drive in an array I just attached to the server, which is running Solaris 9. I need to create a new logical volume partition and make the existing mirror device (/dev/md/dsk/d34) and the array's 18GB drive a member of... (3 Replies)
Discussion started by: dotcom75
3 Replies

9. HP-UX

HP-UX logical volume length mapping

HI, I have to find the length of the logical vol. that is spanned on different PV. Now i have to find that is any bit map type structure of physical extents of any logical volumes and how i can find that. Suppose I extend one LV on two PV on same VG. How i can jump on the starting location... (3 Replies)
Discussion started by: gorayen
3 Replies

10. UNIX for Dummies Questions & Answers

physical volume and physical disk.

Hello, I need explanations about physical disks and physical volumes. What is the difference between these 2 things? In fact, i am trying to understand what the AIX lspv2command does. Thank you in advance. (2 Replies)
Discussion started by: VeroL
2 Replies
Login or Register to Ask a Question