Sponsored Content
Operating Systems AIX How to know exactly which physical partion contains data? Post 302928806 by bakunin on Monday 15th of December 2014 11:26:21 AM
Old 12-15-2014
let me restructure your questions a bit:

Quote:
Originally Posted by bobochacha29
1. Is it OK to use the command " migratelp" to do something like this. The data availability, the synchronization between the 1st mirror and the 2nd mirror ... is OK ? Are there any errors of the filesystem, errors of data, ... after using this command? If 1 of 4 hard disk fails, the data is still OK ???
It is perfectly OK and in fact the command was made for exactly this purpose. Still, i think you do not need it, see below.

Quote:
Originally Posted by bobochacha29
In fact, I want to split the data of a filesystem on multiple hard disks equally.
[...]
The problem is when I checked the disk operation ( by command "topas" ), I found that the operation of hdisk1 and hdisk2 is very high, ~90%-100% while the operation of hdisk3 and hdisk4 is just ~ 10% ( most of the disk operation is writing - the application writes logs to the fs's mountpoint ).
This - the splitting you intend - makes sense only in a specific kind of situation, so please describe your hdisk-devices a bit better. What are they (single SCSI-disks, RAID-sets, LUNs from SAN, ...) and how do you access them?

First a little theory, so that ou can understand the output better:
Quote:
Originally Posted by bobochacha29
This is how it looks like
Code:
fslv01:/movelv_test
LP    PP1  PV1               PP2  PV2             
0001  0175 hdisk1            0111 hdisk2            
0002  0176 hdisk1            0112 hdisk2           
0003  0177 hdisk1            0113 hdisk2            
0004  0178 hdisk1            0114 hdisk2
[...]

Here you see several of the "layers" i talked about in a previous post at work: The LV consists of LPs (leftmost column) numbered 0001, 0002, 0003, ... and the space in this LV is continuous. That means that when byte nr. X is the last byte in in LP 0001 then byte nr X+1 is the first byte in LP 0002. Now, the LP 0001 consists in fact of two PPs, which hold identical copies; PP0175 on hdisk1 and PP 0111 on hdisk2. Similarily for all the other LPs.

The first question is if you really need the LV-copies. writing in parallel is a tad slower than writing on a single LV (without copies) and it might help with the performance if you do away with the mirroring. You will have to decide if the loss of security outweighs the gain on performance or if it is the other way round.

Second, you can place the LPs also in this way (schematically):

Code:
LP    PP1  PV1
0001  0001 hdisk1
0002  0001 hdisk2
0003  0001 hdisk3
0004  0001 hdisk4
0005  0002 hdisk1
0006  0002 hdisk2
0007  0002 hdisk3
0008  0002 hdisk4
[...]

The LVM of AIX has a special provision for doing that, called (somewhat counterintuitively) "Inter-Policy", look here:

Code:
# lslv -l mylv
mylv:/some/where
PV                COPIES        IN BAND       DISTRIBUTION  
hdiskpower2       1670:000:000  24%           270:410:409:409:172 
# lslv -L ap33p1lv
LOGICAL VOLUME:     mylv                   VOLUME GROUP:   myvg
LV IDENTIFIER:      00534b7a00004c000000011cd5e0067e.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            4096                   PP SIZE:        512 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1670                   PPs:            1670
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        /some/where            LABEL:          /some/where
MIRROR WRITE CONSISTENCY: on/ACTIVE                              
EACH LP COPY ON A SEPARATE PV ?: yes                                    
Serialize IO ?:     NO                                     
INFINITE RETRY:     no

At "minimum" the LVM places the LPs on the PPs in a way so that the minimum possible hdisks are involved. At "maximum" it will try to spread it over as many hdisks as possible, thus arriving at a placement similar to what i have sketched out above.

Note, btw, that the smaller the PP size you use (this is a property of the VG so you might have to create it anew and start over from scratch) the better it is for the effect to take place. You are ultimately trying to use the internal cache of the hdisks for maximum effect and the PPs should be small enough to fit into this cache. 512MB, like in my example, would be too big for that.

If you really have to create the VG anew it might also be a good idea to create a RAID set (faster than single disks but slower than a stripe set) or even a stripe set (faster than the RAID but lacking the security of the RAID). See this little tutorial for details about RAIDs, striping, etc..

You can even more fine-tune the creation process of the LV by using a so-called "map file" and using the "-m" switch (see the man page of "mklv" for details). Basically you can explicitly state which PP(s) should represent any given LP of the LV that way.

Further, please tell us which kind of data the FS holds. You already said "mostly writing log files", but a little more detail would help: many small files, a few very large files, do the files change often or are they mostly appended? How often are files deleted and recreated (like in log rotation)? How many processes write (typically) concurrently to the FS. It might be that you can gain a lot with different OS tuning parameters without even having to change the disk layout.

At last, about "migratepv": if you really need it (which is, as shown above, not sure IMHO) you will want to remove any mirror copy from the LV prior to migrating its PPs around. It is simply only half the work because every PP has to moved separately. Unmirror the LV you want to migrate, do the migration and when that is done create a new mirror. You can use a map file (see above, the "-m" switch) for this too.

I hope this helps.

bakunin
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Partion size

hi, just need to know the disk size and the partition size on machine.pls let me know how to do that.is their a way i can get to know the size of directory.like /,/var...etc. thanx (2 Replies)
Discussion started by: saood
2 Replies

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

3. Linux

Doing stuff to files on a NTFS partion from linux

I have a 50GB section of my hard drive on which I've kept all my music, movies and more back from when I had Windows. When I'm in linux it says that the NTFS section is a read only section. Is it possible to copy, rename, add, move or delete any files off of this section? I'm trying to get rid... (2 Replies)
Discussion started by: CTroxtell21
2 Replies

4. UNIX for Dummies Questions & Answers

Partion Magic problems.

Hiya people, A great big "HI" to everybody. I'm new to the Forum and now to my problem(s). I am about to partition my only 80GB HD and using the Partition Magic 8 software it looks fairly simple although here is my problem :- 1. Do I change the new partition to primary or logical? 2. Do I... (4 Replies)
Discussion started by: Syndrome_00
4 Replies

5. UNIX for Dummies Questions & Answers

Physical volume- no free physical partitions

I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Discussion started by: markper
9 Replies

6. Solaris

How to create on partion from 2 disks?

Hi everyone :b: I'm glade to join this forum and I have one question I installed latest Solaris 10 release on SF V480 with 2 73 GB disks 8 GB RAM 4 CPU's My configuration is 10GB for root, 8GB for Swap and 12GB for var. I mirrored root, so disk 1 has 40GB free of space and disk 2 has... (11 Replies)
Discussion started by: HishamN
11 Replies

7. Shell Programming and Scripting

Auto XP partion restore

At my computer shop where I work, we got alot of used PC's from some place. It's my job to refurbish them for resale. Each computer comes with XP pro. So the boss man asks me if there is a way to put a XP restore option. I say yes if I install Linux on a small partion and use partimage to make a... (1 Reply)
Discussion started by: Zewbie
1 Replies

8. Linux

Centos 5 install. Partion order

I can't control the partion order during install. For example i need. hda5 /var 1GB hda6 /opt 2GB I created them in such order but OS adjust them to hda5 /opt 2GB hda6 /var 1GB It is frustrating during install, I pretty sure I can order the partion as i like... (0 Replies)
Discussion started by: honglus
0 Replies

9. AIX

Maximum Limit of HMC to handle Physical Power Virtualization Physical Machine

Hello All, Can anybody please tell me what is the maximum limit of Physical IBM Power Machine which can be handled by single HMC at a single point of time? Thanks, Jenish (1 Reply)
Discussion started by: jenish_shah
1 Replies
All times are GMT -4. The time now is 02:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy