- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- renaming /opt logical volume name
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2013 06:45 AM - last edited on 06-24-2013 07:06 PM by Maiko-I
06-24-2013 06:45 AM - last edited on 06-24-2013 07:06 PM by Maiko-I
renaming /opt logical volume name
/opt is supposed to be lvol5
so is it in many vmhosts in our environment
but in one particular vm host /opt is lvol6
can i change this /opt to have lvol5?
if yes, pls guide me how?
thanks
P.S. This thread has been moved from HP-UX > System Administration to LVM and VxVM - HP Forum moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2013 07:33 AM - edited 06-24-2013 07:50 AM
06-24-2013 07:33 AM - edited 06-24-2013 07:50 AM
Re: renaming /opt logical volume name
Is there anything currently using /dev/vg00/lvol5?
If not, then the following should work:
1) Reboot the server and come up in single-user mode
2) mount the /var, /usr and /tmp LVs
3) cd /dev/vg00
4) mv lvol6 lvol5
5) mv rlvol6 rlvol5
(edited to fix a typo...)
6) edit the /etc/fstab file so that your /opt line now uses /dev/vg00/lvol5
7) Reboot
If lvol5 is already in use by another LV, then you will have to use the same process to rename it.
Be careful to not make any typos anywhere as it could render your system unable to mount /opt when you reboot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2013 07:34 AM
06-24-2013 07:34 AM
Re: renaming /opt logical volume name
In the HP-UX default vg00 layout, lvol5 is /home and lvol6 is /opt.
If your vmhosts have /opt as lvol5, then where is /home on those systems?
(What does "bdf /home" report?)
If /home is part of the root filesystem on many of your vmhosts, that is not very good: users may accidentally fill the filesystem that contains their home directories. The root filesystem is usually rather small, so the risk is greater.
And if root filesystem fills to 100%, there is a risk that nobody can log in, until sysadmin logs in using the console and frees up some disk space.
Since /opt must always be a regular filesystem, its device name should only be referenced in /etc/fstab. Nothing else in the OS should require /opt to be a specific LV.
Changing it might be possible, but in my opinion, quite a lot of work for a very small benefit.
- If lvol5 is currently unused, extend it to the same size as lvol6. (If lvol5 is in use, you must first move its contents somewhere else.)
- mount lvol5 somewhere, e.g. /mnt
- copy everything from /opt to /mnt, preserving file permissions. For example, run "cd /opt; tar cf - | ( cd /mnt; tar xvf -)" as root.
- reboot the system to single user mode
- edit /etc/fstab to mount lvol5 instead of lvol6. Run "mount /opt" and make sure it works without errors.
- reboot again to verify that the system can successfully boot with the moved /opt.
- do whatever you want with the now-unused lvol6.
Alternatively, you could also create a map file for vg00, edit it to have the name "lvol5" for minor device #6, then boot the system to LVM maintenance mode, export vg00 and re-import it with the modified map file... but I don't recommend this, as it would break the symmetry between LVM device minor numbers and the lvol# names. In other words, it does not really fix the problem, only hides it a little deeper in the operating system configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2013 07:39 AM - edited 06-24-2013 07:40 AM
06-24-2013 07:39 AM - edited 06-24-2013 07:40 AM
Re: renaming /opt logical volume name
>5) mv rlvol6 rlvol6
This is probably one of the typos you warned about. ;-)
You can edit your post with Post Options > Edit Reply
(You might also want to remove the double spacing.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2013 07:50 AM
06-24-2013 07:50 AM
Re: renaming /opt logical volume name
You are correct, Dennis! Thanks for pointing that out. It's now fixed.