- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: moving /var
Operating System - HP-UX
1753795
Members
6970
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО04-12-2006 01:42 PM
тАО04-12-2006 01:42 PM
Hi all,
I've installed HPUX 11i from DVD, but I accidentally remove /var from the filesystem configuration, so now my /var is in the / filesystem. I want to mount /var into a separate filesystem, can I do these?
- Create a new lvol and mount it on /var2
- cp -rp /var/* /var2
- modify /etc/fstab, new lvol = /var
please advise
regards,
Sandy
I've installed HPUX 11i from DVD, but I accidentally remove /var from the filesystem configuration, so now my /var is in the / filesystem. I want to mount /var into a separate filesystem, can I do these?
- Create a new lvol and mount it on /var2
- cp -rp /var/* /var2
- modify /etc/fstab, new lvol = /var
please advise
regards,
Sandy
I never think of the future. It comes soon enough.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2006 01:47 PM
тАО04-12-2006 01:47 PM
Re: moving /var
Hi Sandy,
Yes you could, but do it from single user.
Boot the system in single user where your / is already mounted, mount /var2 and you could then even do a mv instead of cp.
Once completed change your fstab entry to mount new lv as /var and reboot the server..
Cheers
Rajeev
Yes you could, but do it from single user.
Boot the system in single user where your / is already mounted, mount /var2 and you could then even do a mv instead of cp.
Once completed change your fstab entry to mount new lv as /var and reboot the server..
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2006 02:07 PM
тАО04-12-2006 02:07 PM
Solution
cp -r(even with -p) isn't really great for this because you need to preserve mode, links, and ownerships of all files and directories. You also are going to leave a bunch of space beneath the /var mountpoint with your method. Finally you are going to leave / much larger than it needs to be (~200MB is plenty) but if you don't mind the wasted space (even after we recover the stuff beneath /var) then I would do this:
Find enough space in some filesystem (or create one) to hold /var's current data.
cd /var
find . -print | cpio -ocv > /whereever/var.cpio.dat
create your new LVOL, make a filesystem, create a /var2 mountpoint, and mount the new filesystem as /var
cd /var2
cpio -icvdum < /whereever/var.cpio.dat
This form of cpio will preserve everything including directory ownerships which the -p version of cpio will not.
Now, edit /etc/fstab and change the /var2 mountpoint to /var but do not remount the filesystem.
Shutdown and bring the system up in single-user mode by interrupting the boot, boot pri, interact with ISL? At the ISL prompt, enter "hpux -is". You will be brought up as root with only / mounted.
/sbin/mv /var /varold
/sbin/mv /var2 /var
/sbin/reboot
and allow the system to come up normally.
If everything under /var look normal then you can "rm -r /varold" and "rm /whereever/var.cpio.dat".
Plan B. Reinstall from DVD and do it right this time.
Plan C. Install IgniteUX, do a make_tape_recovery, and Ignite the system.
I like Plan B because you need the practice.
Find enough space in some filesystem (or create one) to hold /var's current data.
cd /var
find . -print | cpio -ocv > /whereever/var.cpio.dat
create your new LVOL, make a filesystem, create a /var2 mountpoint, and mount the new filesystem as /var
cd /var2
cpio -icvdum < /whereever/var.cpio.dat
This form of cpio will preserve everything including directory ownerships which the -p version of cpio will not.
Now, edit /etc/fstab and change the /var2 mountpoint to /var but do not remount the filesystem.
Shutdown and bring the system up in single-user mode by interrupting the boot, boot pri, interact with ISL? At the ISL prompt, enter "hpux -is". You will be brought up as root with only / mounted.
/sbin/mv /var /varold
/sbin/mv /var2 /var
/sbin/reboot
and allow the system to come up normally.
If everything under /var look normal then you can "rm -r /varold" and "rm /whereever/var.cpio.dat".
Plan B. Reinstall from DVD and do it right this time.
Plan C. Install IgniteUX, do a make_tape_recovery, and Ignite the system.
I like Plan B because you need the practice.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2006 02:13 PM
тАО04-12-2006 02:13 PM
Re: moving /var
Hi all,
Thanks for the inputs.
I can't do installation from DVD, because the applications already installed from the DVD. Don't worry about the practice, I will have another chance for that.
regards,
Sandy
Thanks for the inputs.
I can't do installation from DVD, because the applications already installed from the DVD. Don't worry about the practice, I will have another chance for that.
regards,
Sandy
I never think of the future. It comes soon enough.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP