Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relocating file system /home to another physical volume 1

Status
Not open for further replies.

johnb546

Technical User
May 31, 2001
21
GB
Hello Colleagues,
I have a problem. My system is running out of disk space, therefore I bought and installed an external 4.5g SCSI disk drive. The drive has been recognised by the system ok. So all fine there!!

Now what I want to to do is relocate the /home filesystem ( as this contains all the users data etc) to the new disk drive and I am not sure what steps I should take to complete this task.

Can anyone assist?

Brian...

 
Firstly MAKE A BACKUP. Then check your backup.
I assume you have added the new disk to the rootvg Volume group. If not, assuming your new disk is hdisk1 use: extendvg rootvg hdisk1

1. Check on which lv /home is: lsfs /home
The 1st column is the lv name eg. hd1
2. Check on which disk/s the lv resides:
lslv -m hd1
3. Migrate the lv from the disk/s to the new disk using: migratepv -l lvname SourcePV DestPV eg. migratepv -l hd1 hdisk0 hdisk1
You might have to do this again depending if hd1 was spread over more than one disk.

You can do this while the system is in use, but I would rather wait until after hours.
I also suggest reading the man pages on the above commands.
 
hi,
thats the correct aproach..
u can use mogratepv to migrate ur /home to another disk..
if /home is spreded over multiple disks then do it for all of them to the destination ..but before trying this plz ensure that u hav the proper back of the fs after unmounting it.

i hope it will help..

bye
nan aix sys admin
***************
nandkumarg@visto.com
 
Hi Franc,
Thanks for the reply.... You mention that the new disk needs to part of the ROOTVG using the extendvg function. I have tried this but I get the following error

extendvg: Warning, The Physical Partition Size of 4 requires the creation of 1075 partitions for hdisk2. The system limitation is 1016 physical partitions per disk. Specify a larger Physical Partition Size in order create a volume group on this disk.
0516-862 extendvg: Unable to create volume group.

Now I presume that this is because the original 1.1gig has PP size of 4meg and equates to or under the 1016 system limitation, but because my new disk is 4.5gig then the PP size needs to be greater.

If this is the case where do I go from here? Can you convert the PP size to a larger one on the ROOTVG and then extend the VG? (obviously taking a back-up prior). Or would I have to recreate the ROOTVG and restore from a backup that does not have mapping in effect??

Brian....
 
You can do this in one of a few ways.
1. Make a mksysb and restore it onto the 4GB disk. This is also a good way of testing if your mksysb's work. Make sure you restore to only the new disk. This way you can back out if something goes wrong.

2. If you are running AIX 4.3.x you can increase the maximum number of PP's in a VG by using: chvg -t factor vgname, eg. chvg -t 2 rootvg will double the max allowed PP's to 2032. Read the manpage on chvg carefully before doing this.

3. Create a new VG eg. homevg on the 4Gb disk. Unmount /home. Copy your home lv (hd1) to the new VG using: cplv -v VolumeGroup -y newlvname sourcelvname eg. cplv -v homevg -y homelv hd1
Rename the old hd1 to something else: chlv -n newname oldname eg. chlv -n oldhd1 hd1 .
Rename your new homelv to hd1 and remount /home
When you are happy that everything is ok you can delete the old lv.
It is best to do this when there is no activity on the system. I would even go as far as changing into single user mode before attempting this.

Good luck
 
Hi,
i have a question here. why is it that u want to move your /home to the new disk. instead u can add the new disk to ur root volume group and then increase the size of /home since u have enuff disk place in rootvg after u add the new disk.Just a thought !!.
incase u are facing problems adding the disk because of partiotion size limitations u can use
chvg -t 2 rootvg
read man pages as everyone suggests and make sure u have a mksysb before u do the changes.
sendhil
 
Hi Francs,
Thanks and gratitude for the posting. I will have fun tonight with option 3 and gain experience of using the commands. This gets another task under my belt in learning the AIX administrators role. Thanks again.

Also thanks to sendhilk for your input. Unfortunately for me, we are not at AIX 4.3 yet. But this will probably be my next task to upgrade!!!

Thanks again guys it's good to have access to experienced people.

Brian.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top