Operating System - Tru64 Unix
1748209 Members
2796 Online
108759 Solutions
New Discussion

Moving disks between LSM disk groups

 
SOLVED
Go to solution
emerany
Occasional Advisor

Moving disks between LSM disk groups

Is it possible to move a disk(with the associated volumes, plexes subdisks etc.) from one lsm disk group to another? (just normal diskgroups, not the rootdg)

If yes, what are the recommended steps to follow.
1 REPLY 1
Ralf Puchner
Honored Contributor
Solution

Re: Moving disks between LSM disk groups

You can move the volumes and disks into a new diskgroup while keeping the data within the LSM volumes intact provided you recreate
the LSM configuration in the new diskgroup exactly the same using the low-level commands. Of course, all data should be backed up before attempting to do it. Below's the steps for the system configuration described above (Volume1, Volume2, disk1, disk2, disk21, and disk22):

1) Backup Volume1 and Volume2 data and config info (just in case) ...

# tar cvf ...
# volprint -ht > vp.info
# voldisk list >> vp.info

2) Assuming you don't already have some other disks in the rootdg, some
additional disks will need to be added. Find at least 2 (preferably 4-8)local/non-shared disks to add to rootdg. Use mount, disklabel, swap -s, etc. to find free partitions and/or disks in the local (not shared) bus.
It's preferable to add the whole disk (e.g., rz4) if it's unused, otherwise you can add it as the partition (e.g., rz4h). Use the voldiskadd and voldctl commands. For example:
# voldiskadd rz4
:
# voldiskadd rz6g
:
# voldctl add disk rz4 rz6g ..

3) Remove references to disk1, disk2, disk21, disk22 from /etc/vol/volboot. Use 'voldisk list' to get the DISK to
DEVICE mapping, and 'voldctl list' to see if any of those disks are present (note don't remove the disks added in step 2 above). For example, if disk1, disk2, disk21, disk22
were on rz17, rz19c, rz34, and rz36 respectfully and the 'voldctl list' command showed them present (i.e., /etc/vol/volboot), then the following would be done:
# voldisk list
# voldctl list
# voldctl rm disk rz17 rz19c rz34 rz36

4) Save Volume1 and Volume2 configuration into a description file:
# volprint -mvpsh Volume1 > v1.df
# volprint -mvpsh Volume2 > v2.df

5) Unmount the volumes (if mounted) and remove Volume1 and Volume2 from rootdg:
# mount
# umount Volume1_fs
:
# voledit -rf rm Volume1 Volume2

6) Make a note of the LSM disk name mappings, then remove the disks from rootdg:
# voldisk list > list.out
# voldg rmdisk disk1 disk2 disk21 disk22

7) Create the new diskgroup (e.g., dg1) and add the disks. Refer to the results in columns 'DISK' and 'DEVICE' from the voldisk list command above.
For example, if disk1, disk2, disk21, disk22 were on rz17, rz19c, rz34, and rz36 respectfully:
# voldg init dg1 disk1=rz17
# voldg -g dg1 adddisk disk2=rz19c disk21=rz34 disk22=rz36

8) Restore Volume1's and Volume2's configuration into the new diskgroup and start the volumes:
# volmake -g dg1 -d v1.df
# volmake -g dg1 -d v2.df
# volume start v1 v2

If all went ok, the data in Volume1 and Volume2 should still be intact.

9) Volume1 and Volume2 will have a different device paths now:
old path: /dev/vol/rootdg/Volume1
/dev/rvol/rootdg/Volume1
new path: /dev/vol/share_dg/Volume1
/dev/rvol/share_dg/Volume1
so you will need to update /etc/fstab, AdvFS references (/etc/fdmns), etc. to use the new paths. For AdvFS, I think the commands to repoint AdvFS at the existing volume data in the new diskgroup are something like:
a) cd /etc/fdmns/
b) ls -l | grep Volume1 Volume2
c) rm -f Volume1 Volume2
d) ln -s /dev/vol/dg1/Volume1 Volume1
ln -s /dev/vol/dg1/Volume1 Volume1

Next time you can also consult the lsm documentation ;-)
Help() { FirstReadManual(urgently); Go_to_it;; }