changing Physical Partition (PP)

Hi all,

I am trying to replace an old 9gb hard disk for a 36gb hard drive on an AIX 4.3.2 system (can't update)

I was thinking of doing this by doing a dd from the 9gb to the 36gb hard drive and then resize the Logical Volumes. However, lspv <36gb hard disk> gives me the folowing:

#lrnt> lspv hdisk6
PHYSICAL VOLUME:    hdisk0                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      0035570279651069         VG IDENTIFIER     00355702e19f34a0
PV STATE:           active                                     
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            16 megabyte(s)           LOGICAL VOLUMES:  9
TOTAL PPs:          542 (8672 megabytes)     VG DESCRIPTORS:   2
FREE PPs:           29 (464 megabytes)                         
USED PPs:           513 (8208 megabytes)                       
FREE DISTRIBUTION:  00..00..00..00..29                         
USED DISTRIBUTION:  109..108..108..108..80        

I can only allocate an extra 29 PPs = 464mb. Where are the rest of the PPs of how can I increase the PP size?

Or should I be using a different way to upgrade the (boot)disk?

Thanks,
Robbert

Why does the lspv say that the 36 GB disk is part of the rootvg? Are you trying to copy the contents of the 9 GB drive to an existing disk or a new one?

This is strange I think:

#lrnt> lspv hdisk6
PHYSICAL VOLUME:    hdisk0                   VOLUME GROUP:     rootvg

Which volume group does the 9GB disk belong to?

Normally to move the conents of one disk to another, I would extend the VG with the new disk, mirror the VG, remove the old mirror and reduce the VG to remove the old disk. Of course if the disk you are replacing is one of many in a VG this isn't sufficient.

There are other commands, such as migratepv, etc. There's not enough information in your post to say exactly which method to use.

Hi,

your ppsize is too small - since you can have only 1016 pps on a physical disk normally, you would need a pp size of 64.

The clean way would be to restore the system from mksysb via a nimserver - the ppsize should be automatically set to 64. Since your box is so old and you maybe don't want to do this kind of restore, you could try it with a simple

chvg -t 4 
  • this works if your metadata doesnt need to be changed and you don't have stale partitions and allows you to have 4 x 1016 = 4064 pps on a disk but it comes with the price that you can only have max 4 disks in rootvg afterwards.

Kind regards
zxmaus

Hi Robert.
From what you describe I think you are experienced with some other Unix, probably Linux, but you are unaware of AIX in general and of LVM in particular. Unfortunately by using what worked in a different environment you outfoxed yourself here. LVM is great because many things can be done on the fly but among the things LVM cannot do is changing a VG's PP size. Once you decided upon a PP size you need create a new VG to change that. This usually means backup followed by restore. By using dd you wrote your 9GB disk onto the 36GB disk. This explains why there are just as many PP visible as the 9GB disk had you used as infile. No LVM has written any logical structure onto your bigger disk but you did that with dd. From AIX 5.2 on you might be able to change this with chvg -g but you would need to boot from that disk first. However, even if your server boots from that disk and you could add new partitions to the VG's descriptor area you would still need to use the -t factor to fully utilise the 36GB disk.

Well, yes. Both scottn and zxmaus hinted at part of the solution. An AIX administrator would

# extendvg -f rootvg hdisk6
# chvg -t 4 rootvg
# mirrorvg rootvg hdisk6
# bosboot -ad /dev/hdisk6
# bootlist -m hdisk6 hdisk0
# shutdown -Fr 

Unfortunately there is another fly in the ointment. Depending on where hdisk6 belongs to there might be more to do before you could follow that procedure. AIX is very robust usually but sth AIX cannot deal with is two disks with the same PVID but that is what you created with dd. If that evil disk exists within your rootvg removing it from there might turn out to be bit of problem. In that case start with takeing a backup from your rootvg. Only then try to get rid of the disk with a

# dd if=/dev/zero of=/dev/hdisk6 bs=1024k
# reducevg rootvg hdisk6
# savebase
# shutdown -Fr 

And hopefully your server has no memory of hdisk6 as member of the rootvg after that.

http://www.redbooks.ibm.com/abstracts/sg245432.html?Open
http://www.redbooks.ibm.com/abstracts/sg245433.html?Open

Yes indeed I am more familiar with LINUX. This AIX system is one of the oldest systems at my work. We still have got a few of them. They are one of the most stable systems I've ever seen. That's great but also doesn't give me much experience with troubleshooting :slight_smile: Most of our own AIX guru's have moved on and even IBM finds it difficult to give us support on these systems today. Specifically on the hardware!

We have 4 IBM S70 stations. They are currently equipped with one (1) 9gb hard drive which we want to upgrade to a 36gb drive.

What I will try again is to restore one of our tape backups. The first time this came with a big list with errors concerning the network. Perhaps this was due to read errors from the tape? Can I also copy back files from disk to disk after the tape restore?

Thanks to everyone so far for your reply!

Robbert