Sponsored Content
Operating Systems Linux Logical Volume to physical disk mapping Post 302883003 by jimthompson on Friday 10th of January 2014 11:03:00 AM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
LVDISPLAY(8)						      System Manager's Manual						      LVDISPLAY(8)

NAME
lvdisplay - display attributes of a logical volume SYNOPSIS
lvdisplay [-a|--all] [-c|--colon] [-d|--debug] [-h|-?|--help] [--ignorelockingfailure] [--ignoreskippedcluster] [--maps] [--nosuffix] [-P|--partial] [--units hHbBsSkKmMgGtTpPeE] [-v|--verbose] [--version] [LogicalVolumePath [LogicalVolumePath...]] lvdisplay --columns|-C [--aligned] [-a|--all] [-d|--debug] [-h|-?|--help] [--ignorelockingfailure] [--ignoreskippedcluster] [--noheadings] [--nosuffix] [-o|--options [+]Field[,Field...]] [-O|--sort [+|-]Key1[,[+|-]Key2...]] [-P|--partial] [--segments] [--separator Separator] [--unbuffered] [--units hHbBsSkKmMgGtTpPeE] [-v|--verbose] [--version] [LogicalVolumePath [LogicalVolumePath...]] DESCRIPTION
lvdisplay allows you to see the attributes of a logical volume like size, read/write status, snapshot information etc. lvs(8) is an alternative that provides the same information in the style of ps(1). lvs(8) is recommended over lvdisplay. OPTIONS
See lvm(8) for common options and lvs for options given with --columns. --all Include information in the output about internal Logical Volumes that are components of normally-accessible Logical Volumes, such as mirrors, but which are not independently accessible (e.g. not mountable). For example, after creating a mirror using lvcreate -m1 --mirrorlog disk, this option will reveal three internal Logical Volumes, with suffixes mimage_0, mimage_1, and mlog. -c, --colon Generate colon separated output for easier parsing in scripts or programs. N.B. lvs(8) provides considerably more control over the output. The values are: * logical volume name * volume group name * logical volume access * logical volume status * internal logical volume number * open count of logical volume * logical volume size in sectors * current logical extents associated to logical volume * allocated logical extents of logical volume * allocation policy of logical volume * read ahead sectors of logical volume * major device number of logical volume * minor device number of logical volume -m, --maps Display the mapping of logical extents to physical volumes and physical extents. To map physical extents to logical extents use: pvs --segments -o+lv_name,seg_start_pe,segtype --columns, -C Display output in columns, the equivalent of lvs. Options listed are the same as options given in lvs(8). Examples Shows attributes of that logical volume. If snapshot logical volumes have been created for this original logical volume, this command shows a list of all snapshot logical volumes and their status (active or inactive) as well: lvdisplay -v /dev/vg00/lvol2 Shows the attributes of this snapshot logical volume and also which original logical volume it is associated with: lvdisplay /dev/vg00/snapshot SEE ALSO
lvm(8), lvcreate(8), lvs(8), lvscan(8), pvs(8) Sistina Software UK LVM TOOLS 2.02.105(2)-RHEL7 (2014-03-26) LVDISPLAY(8)
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy