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 of that possibility ? How can we do that ( example please) ?

Thank you

In smitty when you are creating a LV, you'll see:

POSITION on physical volume                         middle

You can change this to whatever you want. If you are using a SAN though, it probably won't make any difference since most modern SANs move data around as needed and spread it across multiple disks all unknown to the OS. If you are using internal physical disks, you will most likely see a difference - outer is faster than the inner because the head that reads the disk can read more on the outer edge because more disk is passed under it in a single disk rotation.

the center is the fastest on a disk - obviously this works only when you don't use raid 5 or SAN - you place it while you are creating the lv - either via smitty or with -a c option

Regards
zxmaus

The center is fastest? Outer tracks would have more sectors so as the disk spins, the head is able to read more sectors in a single disk rotation, right?

---------- Post updated at 10:13 AM ---------- Previous update was at 10:06 AM ----------

Here is a descent animation of the head seeking data on Western Digital's website. It is advertising their "IntelliSeek", but it shows how the head reads data.
Western Digital

the outer edge of the disk has a faster rotational velocity than the slower inner edge and will whip around much more quickly on the outside than in the middle. However, because not all the data on the disk will be written to the outer edge as a result of the limitations of the physical placement of the data, the fastest seek times for the hard disk heads will be in the center area of the disk, where the head is most likely to pass on average.

I guess that is why UNIX gives the option of where you want the data because if you are worried about seek times, you'd want the data in the middle, if you were wanting raw speed to save a smaller number of large files, you'd be better off putting it on the outer edges... to each his own. Long live UNIX.

IMHO the problem is placement within regions based on application activity.

The basic concept you want to follow: if the access is sequential in application terms the best I/O performance is achieved when the physical I/O access is sequential.

When application I/O is random there are many different things to consider - one of them being - is the I/O still physical, or is it VMM cached, or application cached.

In short, with modern systems (assuming more than one or two disks, i.e., separate volume groups for each application's data) there is no one best place.
Assuming some physical relationship the only advice that remains is that AIX LVM mirrored logical volumes with lots of write activity may benefit from being placed on the outer edge because the VGSA - Volume Group Status Area - is on the outer edge and gets updated anytime a mirrored LP is modified.

command you should look at:

lslv - options: none, and with -l
lspv -p
michael@x054:[/home/michael]lslv lvDAV
LOGICAL VOLUME:     lvDAV                  VOLUME GROUP:   vgData
LV IDENTIFIER:      005d858f00004c0000000115722f3acc.15 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            1024                   PP SIZE:        16 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1024                   PPs:            1024
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    6
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE                              
EACH LP COPY ON A SEPARATE PV ?: yes                                    
Serialize IO ?:     NO                                     
INFINITE RETRY:     no
michael@x054:[/home/michael]lslv -l lvDAV
lvDAV:N/A
PV                COPIES        IN BAND       DISTRIBUTION  
hdisk1            1024:000:000  0%            000:000:541:483:000 

This looks "bad" or less than ideal - 0% and in two regions - however, in physical terms it is a sequential as it gets. A simple command will improve the 0% to >50% (see below).

michael@x054:[/home/michael]lspv -p hdisk1 | grep lvDAV
2085-2625  used    center        lvDAV               jfs2       N/A
2626-3108  used    inner middle  lvDAV               jfs2       N/A

Here, I can see the logical volume is organized sequentially - starting in the center region, and proceeding into the "inner middle" region as one long sequence.

Now to get better stats I can do the following:
(change the preferred region to center from middle)

michael@x054:[/home/michael]chlv -a center lvDAV
0516-652 chlv: The -a parameter for IntraPolicy must be m, im, c,
        ie or e.
michael@x054:[/home/michael]chlv -a c lvDAV     
michael@x054:[/home/michael]lslv -l lvDAV
lvDAV:N/A
PV                COPIES        IN BAND       DISTRIBUTION  
hdisk1            1024:000:000  52%           000:000:541:483:000 

Hope this helps!

Dear my senario is that i have a rootvg mirrored with hdisk0 and hdisk1

now i can't increase the file system for any lv becouse the region in hdisk0 is diffrent of hdisk1 , is there any way to make the region of the LV in hdisk0 same as hdisk1 .

Yes: remove the mirror of all the LVs so that the (used space of the) VG is on one disk only. Start a "reorgvg rootvg" then to rearrange all the LVs to be contiguous again. Once this is finished remirror the LVs again using the freed disk. The LVM should make the placement identical on the disk. If you are not satisfied with the result you can also create and use map files (see the man page of "mklv") to control the process.

I hope this helps.

bakunin

Not being able to increase a logical volume is never related to the region placement. If you are mirrored and cannot increase a logical volume/filesystem - one or both are full (or less than two disks have space free for single mirrors, three disks have spece free for double mirrors (aka three copies).

Never is this related to regions.

A fairly efficient way to get a better reorganized layout is the process described above - however, start by correcting the regions as you would like them using chlv -e, remove a miror, and then remirror the volume group. reorgvg will do the same - as long as there is at least one PP free per disk. But it may take "forever" to complete.

Hope this helps

this is a freash settings of my system

 
lspv -l hdisk0
hdisk0:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd6 4 4 00..00..04..00..00 N/A
hd5 1 1 01..00..00..00..00 N/A
loglv00 1 1 00..01..00..00..00 N/A
lg_dumplv 32 32 01..31..00..00..00 N/A
hd11admin 1 1 00..01..00..00..00 /admin
lv00 1 1 00..01..00..00..00 /audit
hd1 16 16 00..00..16..00..00 /home
hd3 24 24 00..14..10..00..00 /tmp
hd10opt 8 8 00..00..08..00..00 /opt
hd4 16 16 00..00..16..00..00 /
hd8 1 1 00..00..01..00..00 N/A
hd9var 56 56 00..07..25..24..00 /var
 
 
 
 
 
lspv -l hdisk1
hdisk1:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
hd6 4 4 00..00..04..00..00 N/A
hd5 1 1 01..00..00..00..00 N/A
loglv00 1 1 00..01..00..00..00 N/A
hd11admin 1 1 00..00..01..00..00 /admin
lv00 1 1 00..01..00..00..00 /audit
hd1 16 16 00..16..00..00..00 /home
hd3 24 24 00..00..24..00..00 /tmp
hd10opt 8 8 00..08..00..00..00 /opt
hd4 16 16 00..00..16..00..00 /
hd8 1 1 00..00..01..00..00 N/A
hd9var 56 56 00..56..00..00..00 /var
hd2 56 56 00..00..56..00..00 /usr
 
 
lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE
DISTRIBUTION
hdisk0 active 546 329
108..27..00..85..109
hdisk1 active 546 361
109..27..07..109..109
 
 
 
lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT
POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 4 8 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 16 32 2 open/syncd /
hd2 jfs2 56 112 2 open/syncd /usr
hd9var jfs2 56 112 2 open/syncd /var
hd3 jfs2 24 48 2 open/syncd /tmp
hd1 jfs2 16 32 2 open/syncd /home
hd10opt jfs2 8 16 2 open/syncd /opt
lg_dumplv sysdump 32 32 1 open/syncd N/A
loglv00 jfslog 1 2 2 open/syncd N/A
lv00 jfs 1 2 2 open/syncd /audit
hd11admin jfs2 1 2 2 open/syncd /admin
 
 
chfs -a size=+1G /opt
0516-404 allocp: This system cannot fulfill the allocation request.
There are not enough free partitions or not enough physical volumes
to keep strictness and satisfy allocation requests. The command
should be retried with different allocation characteristics.
 
 
lspv -p hdisk0
hdisk0:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-1 used outer edge hd5 boot N/A
2-109 free outer edge
110-110 used outer edge lg_dumplv sysdump N/A
111-114 used outer middle hd9var jfs2 /var
115-130 used outer middle lg_dumplv sysdump N/A
131-131 used outer middle loglv00 jfslog N/A
132-132 used outer middle lv00 jfs /audit
133-144 used outer middle lg_dumplv sysdump N/A
145-156 free outer middle
157-159 used outer middle hd9var jfs2 /var
160-176 used outer middle hd2 jfs2 /usr
177-191 free outer middle
192-192 used outer middle hd11admin jfs2 /admin
193-195 used outer middle lg_dumplv sysdump N/A
196-209 used outer middle hd3 jfs2 /tmp
210-219 used outer middle hd2 jfs2 /usr
220-220 used center hd8 jfs2log N/A
221-221 used center hd4 jfs2 /
222-234 used center hd2 jfs2 /usr
235-235 used center hd9var jfs2 /var
236-236 used center hd3 jfs2 /tmp
237-252 used center hd1 jfs2 /home
253-260 used center hd10opt jfs2 /opt
261-261 used center hd3 jfs2 /tmp
262-265 used center hd2 jfs2 /usr
266-280 used center hd4 jfs2 /
281-292 used center hd2 jfs2 /usr
293-300 used center hd3 jfs2 /tmp
301-323 used center hd9var jfs2 /var
324-327 used center hd6 paging N/A
328-328 used center hd9var jfs2 /var
329-360 free inner middle
361-384 used inner middle hd9var jfs2 /var
385-437 free inner middle
438-546 free inner edge
  • i have forgotten the cause but recall hearing of problems with rootvg - but might be solved with changing the vg to a BIG vg, versus normal.
# chvg -B rootvg

Check the man page first, it might be chvg -b inste