Operating System - HP-UX
1834836 Members
2973 Online
110070 Solutions
New Discussion

Re: Changing system logical volume after OS installation

 
Valerie KAM_5
Occasional Contributor

Changing system logical volume after OS installation

Hello,

I have already installed by HPUX 11.0 OS with the default logical volume names.
E.g change /dev/vg00/lvol6 for /usr to
/dev/vg00/lvol6 to /oracle

Can I use Ignite to change the lvol names? If not, how do I change?

Comment or help will be appreciated, else I may have to install th whole OS..

rgds
VK
12 REPLIES 12
Muthukumar_5
Honored Contributor

Re: Changing system logical volume after OS installation

You are trying to change mount point only. Create a directory in / as /oracle then unmount /usr and then mount that lvol to /oracle.

Change /etc/fstab file accordingly. No OS reinstallation is needed.

Why do you want to change that lvol to /oracle. It will be with /usr contents. Try to create new lvol and assign it to /oracle.

hth.
Easy to suggest when don't know about the problem!
RAC_1
Honored Contributor

Re: Changing system logical volume after OS installation

What exactly you want to change lvol names or mount points?? Both is possible.
For chaning lvol names, delete old lvols (after noting down minor numbers) and create new ones.
mknod /dev/vg00/my_name c 64 0x0y0000
0x0y0000 - is a correct lvol number. update the fstab file accordingly.
There is no substitute to HARDWORK
Fred.Wu
Frequent Advisor

Re: Changing system logical volume after OS installation

Hi:
Not sure if you just want to change the mount point , or the lv name.
For mount point change , just modify /etc/fstab is ok.
For lv name , just change the file name of /dev/vgxx/oldlv and roldlv to new names by "mv" command. and don't forget modify fstab to mount correct lv to correct point.
fred
Valerie KAM_5
Occasional Contributor

Re: Changing system logical volume after OS installation

Hello ,

Thanks for all the input.

Some background to all this-
* The system I am working on is currently is is a Development server. The intention is to do a 'fbackup' and 'dump' the whole OS into the Production server and the Production server has /dev/vg00/lvol6 mounted on /oracle
and /dev/vg00/lvol9 on /usr.
* The system admistrators for the Production Server have been using those lvols numbering and do not wish to change it.
* Thus in the development server, /usr (/dev/vg00/lvol6 ) has data and /oracle (/dev/vg00/lvol9) has no data.
* The development server OS is also mirrored to another disk.

My intention is to do the following :
1. Change the current OS on Development Server , that is to
/dev/vg00/lvol6 on /oracle
/dev/vg00/lvol9 on /usr

Next question:
1. If there are data already on /dev/vg00/lvol6 with /user. Can the data still be retained after I delete the lvols(after noting down minor numbers)and creating new ones?
And to use ignite recovery to change it.

AwadheshPandey
Honored Contributor

Re: Changing system logical volume after OS installation

check attached pdf file for ur lvm issue

Awadhesh
It's kind of fun to do the impossible
Valerie KAM_5
Occasional Contributor

Re: Changing system logical volume after OS installation

Hello All,

We have decide to go ahead with the OS re-installation.

Thanks all for the input.

rgds
VK
Devender Khatana
Honored Contributor

Re: Changing system logical volume after OS installation

Hi,

You still did not to use ignite, allthough ignite will do this.

Just rename the mount points in /etc/fstab and reboot the system. The reboot is required as /usr is in use and will not let you umount itself. Even if you are going for OS reinstallation just try this out once.

In /etc/fstab
/dev/vg00/lvol6 /oracle -- ----

/dev/vg00/lvol9 /usr -- ----


Change to

/dev/vg00/lvol6 /usr -- ----

/dev/vg00/lvol9 /oracle -- ----

HTH,
Devender
Impossible itself mentions "I m possible"
Devender Khatana
Honored Contributor

Re: Changing system logical volume after OS installation

Hi

Forgot ot mention that copy contents of existing /usr to /oracle first. Also restore /oracle from backup after reboot.

HTH,
Devender
Impossible itself mentions "I m possible"
Fred.Wu
Frequent Advisor

Re: Changing system logical volume after OS installation

No need to re-install OS, just rename the /dev/vg00/lvol9 to lvol6, and lvol6 to lvol9 by "mv" command under /dev/vg00,

and then modify fstab for correct mount point.

try do this on single user mode.
fred
Valerie KAM_5
Occasional Contributor

Re: Changing system logical volume after OS installation

Hello,

Thanks for all the suggestions.

On further investigation here, we also had to change the following:

* /dev/vg00/lvol6, /dev/vg00/lvol9,
/dev/vg00/lvol8, and /dev/vg00/lvol7
* change lvol sizes of the above and their mount points. Most of them are HPUX System directories.


Noted the steps to change from the document from Awadhesh ...

E.g:
To change the name of a LV you can simply rename the LV devicefiles:
# umount /dev/vg01/lvol1
# mv /dev/vg01/lvol1 /dev/vg01/lvdata
# mv /dev/vg01/rlvol1 /dev/vg01/rlvdata
# mount /dev/vg01/lvdata

Re-installation of the OS was taken due to a lack of time ;). It is already half way there.

Cheers
VK



Devender Khatana
Honored Contributor

Re: Changing system logical volume after OS installation

Hi,

The steps what you have noted are true for vg01 but for vg00 same shall not work as this is OS VG and require file systems to be mounted all the time.

HTH,
Devender
Impossible itself mentions "I m possible"
Don Mallory
Trusted Contributor

Re: Changing system logical volume after OS installation

The problem with changing the lvol names is that if for some reason you have to vgscan and vgimport the disk at a later date, and you don't have a vgexport map to work from, it will create the lvol names for you numerically as it sees them.

I have a node with home directories each being their own filesystem (NFS server, makes hard quotas, easy to manage) the filesystems are named by username. There was an issue that required the entire VG to be imported, and instead of lvol names like there was, there were numbered lvols..

It was a mess.