HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: copying usr and var file systems
Operating System - HP-UX
1834394
Members
1582
Online
110066
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
02-05-2005 05:00 AM
02-05-2005 05:00 AM
copying usr and var file systems
I have to move usr and var to new disks and mirror them.
What is the best way to copy them keeping all the links and permissions.
I have seen a bunch of options searching for this and many different flags with cpio.
I am used to tar and that has worked well for me on Tru64 UNIX.
tar -cf - * | (cd /the/new/directory; tar -xf -)
If I use cpio, what are the flags that I need to be using. I saw one like below in my searches.
# find .|cpio -pudlmv /destinationdirectory
thanks for your feedback.
What is the best way to copy them keeping all the links and permissions.
I have seen a bunch of options searching for this and many different flags with cpio.
I am used to tar and that has worked well for me on Tru64 UNIX.
tar -cf - * | (cd /the/new/directory; tar -xf -)
If I use cpio, what are the flags that I need to be using. I saw one like below in my searches.
# find .|cpio -pudlmv /destinationdirectory
thanks for your feedback.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2005 08:49 AM
02-05-2005 08:49 AM
Re: copying usr and var file systems
Hi,
I've used your tar method many times to do this same thing on various versions of HP-UX with no issues. I generally use a "v" on one of the tar commands, though, so I can tell how far it's gotten and whether it's hung or where an error occurred.
I highly recommend making a backup of /var and /usr before you start (tape and/or another disk; choose your paranoia :-). It should ideally be done in single-user mode; if not, there are things you have to deal with that make it more messy. Personally, I like to make /var (and sometimes /var/adm/sw, /var/spool) into their own filesystems so that I can handle disk space issues in a more independent fashion.
My $.02. HTH,
Mic
I've used your tar method many times to do this same thing on various versions of HP-UX with no issues. I generally use a "v" on one of the tar commands, though, so I can tell how far it's gotten and whether it's hung or where an error occurred.
I highly recommend making a backup of /var and /usr before you start (tape and/or another disk; choose your paranoia :-). It should ideally be done in single-user mode; if not, there are things you have to deal with that make it more messy. Personally, I like to make /var (and sometimes /var/adm/sw, /var/spool) into their own filesystems so that I can handle disk space issues in a more independent fashion.
My $.02. HTH,
Mic
What kind of a name is 'Wolverine'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2005 02:24 PM
02-05-2005 02:24 PM
Re: copying usr and var file systems
Hello,
Ensure you have a full backup of the system.
# pvmove -n
This will move the physical extends and directory structure to your new disk - lvol? being what ever /usr or /var is.
# lvextent -m 1
see man pages for pvmove and lvextend
HTH
Ensure you have a full backup of the system.
# pvmove -n
This will move the physical extends and directory structure to your new disk - lvol? being what ever /usr or /var is.
# lvextent -m 1
see man pages for pvmove and lvextend
HTH
hello
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP