Operating System - HP-UX
1834598 Members
4001 Online
110069 Solutions
New Discussion

Re: Moving a LV to a new partition - how to?

 
SOLVED
Go to solution
dictum9
Super Advisor

Moving a LV to a new partition - how to?

This is 11.23

I have this partition /var/opt/OV/share/log that has a LV mounted on it.

I found out that /var/opt/OV/share grows more than ~/log and would like to make that the mount point for the 6GB Logical Volume.

Another possibility is to make /var/opt/OV the mount point for the logical volume.

Am I correct in thinking that I all have to do is stop the application, unmount the Lvol and then mount it on the new mount point /var/opt/OV?

How do I prevent data loss?
3 REPLIES 3
TTr
Honored Contributor
Solution

Re: Moving a LV to a new partition - how to?

Whatever you do, you have to stop the app so that you are able to mount and unmount.

Lets say /var/opt/OV is your new mountpoint.

1) If you are going to keep ~/log as its own mountpoint, unmount ~/log temporarily so that you don't duplicate its contents.

2) Create a new lvol for ~OV
3) mv /var/opt/OV /var/opt/OV-folder
4) mount new lvol as /var/opt/OV and ensure its owner/group/mode are the same as those of ~OV-folder
5) Copy the ~OV-folder to ~OV by using
cd /var/opt/OV-folder
tar cf - . | ( cd /var/opt/OV ; tar xf - )

6) mount ~/log
7) start the app and check if OK
8) delete the ~/OV-folder
dictum9
Super Advisor

Re: Moving a LV to a new partition - how to?

Thanks
Emil Velez
Honored Contributor

Re: Moving a LV to a new partition - how to?


maybe I am missing something but if the mount points are logical volumes in the same volume group you can use

fsadm -F vxfs -b 5000M /var/opt/OV/share/log

(reduce size of file system)
lvreduce -L 5000 /dev/vgxx/lvolxx

then extend the logical volume with the other mount point and extend the filesystem.

THis is what online jfs is for