- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- move /opt to a lvol
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
Forums
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
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
10-13-2009 08:25 AM
10-13-2009 08:25 AM
move /opt to a lvol
/opt is under / mountpoint. I would like to create a logical volume for /opt to be separated from /
Could you please tell me if I am wrong regarding the procedure below ?
1) boot in single user mode
2) lvcreate -L 5000 -n lvol9 /dev/vg00
3) newfs -F vxfs -o largfiles /dev/vg00/lvol9
4) mkdir /new_opt
5) mount /dev/vg00/lvol9 /new_opt
6) cd /opt
7) find . -print | cpio -pdl /new_opt
8) mv /opt /old_opt
9) umount /new_opt
10) rmdir /new_opt
11) mkdir /opt
12) mount /dev/vg00/lvol9 /opt
13) update /etc/fstab
Best Regards
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 08:33 AM
10-13-2009 08:33 AM
Re: move /opt to a lvol
7) cp -p -r /opt/* /new_opt
8) OK
9) mv /new_opt /opt
10) not needed
11) not needed
12) not needed, already mounted under 5 and 8
13) yep
Once you rename new_opt to opt you're mounted to lvol9, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 09:02 AM
10-13-2009 09:02 AM
Re: move /opt to a lvol
1) boot in single user mode
2) lvcreate -L 5000 -n lvol9 /dev/vg00
3) newfs -F vxfs -o largfiles /dev/vg00/lvol9
4) mkdir /new_opt
5) mount /dev/vg00/lvol9 /new_opt
6) cd /opt
7) cp -p -r /opt/* /new_opt
-> Could you please confirm that there won't be a problem with symlinks ?
8) mv /opt /old_opt
9) mv /new_opt /opt
-> as /new_opt is a mountpoint, don't you think it is necessary to umount and create a new mountpoint ?
10) update /etc/fstab
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 09:10 AM
10-13-2009 09:10 AM
Re: move /opt to a lvol
You can't rename mountpoints. The original steps were perfectly fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 09:13 AM
10-13-2009 09:13 AM
Re: move /opt to a lvol
> as /new_opt is a mountpoint, don't you think it is necessary to umount and create a new mountpoint ?
AS in your command you moved /opt to /old_opt , you need to create one directory : # mkdir /opt
- Then you can mount it in /opt.
- -r option copies the symbolic links as well.
Cheers
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 09:16 AM
10-13-2009 09:16 AM
Re: move /opt to a lvol
1. OK
2. OK
3. OK
4. mv /opt /old_opt
5. mkdir /opt
6. mount /dev/vg00/lvol9 /opt
7. mv /old_opt/* /opt (ensure there are no .files (dot-files) in /old_opt)
8. rmdir /old_opt
9. update /etc/fstab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 09:42 AM
10-13-2009 09:42 AM
Re: move /opt to a lvol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2009 01:50 PM
10-13-2009 01:50 PM