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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving a hard disk 2

Status
Not open for further replies.

chomca

Technical User
Jun 26, 2007
15
IN
Hi
i am having 2 volume group for ex rootvg and datavg.
in rootvg i am having 3 hard disk and datavg 1 hard disk.
now i want to move 1 harddisk from rootvg to datavg volume group.

where the step and the command is correct :
1)unmount the file system in hdisk2
2) #reducevg rootvg hdisk2
3) #extendedvg datavg hdisk2

now the data and the harddisk will available in datavg.

thanks in advance


 
Your steps look ok! Unless hdisk2 is mirrored on rootvg then you have to unmirror it first! but as your steps suggest that it is not so you should be ok!

Regards,
Khalid
 
thanks for your immediate response
 
Not so...

Code:
1) unmount the file system in hdisk2   OK
2) #reducevg rootvg hdisk2             OK
3) #[red]extendvg[/red] datavg hdisk2             command is extendvg not extendedvg
                                       your assumption about the data is NOK

The space will be available in datavg, the data will NOT be!

You'll need backup/restore also


HTH,

p5wizard
 
I trust what you say p5wizard.

You are right about the command!

But logically when the disk goes to the second vg, the data should be with it! never tried it in practice but as i said i trust you say!

Regards,
Khalid
 
When you do a reducevg, tha data is not erased, but all the descriptors are deleted.
So the data may still be in the disk, it is really hard to read it (not impossible, but not as easy as remount the FS).
 
so if we moving a hard disk from one volume group to another volume group. need the data also from that hard disk,Is their any command is their in AIX .
 
You can copy its contents with cplv, from the first VG to the second VG.
Once you've copied the data and moved the hdisk to the new VG, you can move this data to the original hdisk with migratepv.

This means of course that you need enough free space in the second VG before moving the data and the disk.
 
The data is still on the disk, it is not available without some hassle.

So there is a way, but it involves knowing the exact LP mapping of the logical volume in the first VG. After the disk is extendvg'd to the second VG you have to recreate the LV in the second VG with the exact same LP map and preferably the same LV name.

Then there's also the log logical volume to consider, because that logLV has to stay in the first VG for the other FSs there... (If you have inline log for jfs2, that makes life easier, as you don't have to worry about it)

Then you have to re-create the FS stanza in /etc/filesystems manually because there is no other way!

[red]DO NOT CREATE A NEW FS ON THE NEWLY CREATED LV OR THE DATA IS GONE! FOREVER!.[/red]

OK you can copy/paste from an old copy of /etc/filesystems before you remove the FS, but for jfs log or non-inline jfs2 log, the log attribute has to change. I'd probably want to create and format a new loglv in the second VG for just that.

All in all, not something to take on without a thorough knowledge of AIX LVM...

I'll bet this procedure is described in more detail somewhere - google for it...


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top