- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to create separte /usr which is created now on...
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
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
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
тАО05-24-2010 04:11 AM
тАО05-24-2010 04:11 AM
How to create separte /usr which is created now on / file-system
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 3080192 2853984 226208 93% /
/dev/vg00/lvol1 1998072 103384 1694880 6% /stand
/dev/vg00/lvol7 61440000 860272 60106752 1% /var
/dev/vgxa1/lvtss1 674758656 9518281 623662859 2% /tss1
/dev/vg00/lvol6 4096000 25944 4041200 1% /tmp
/dev/vg00/lvol5 7176192 2983600 4159896 42% /opt
/dev/vg00/lvol4 5242880 4643824 594432 89% /home
I want to create separate file-system for /usr. My concern is how to copy the data which is there on /usr . Will it work if I do scp/tar? Which is better in this? Are any other method there to do same?
As /usr contains binary and lib files so I am confused if I do copy using scp will it give problem accessing the binary files later.
Thank you in Advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2010 04:34 AM
тАО05-24-2010 04:34 AM
Re: How to create separte /usr which is created now on / file-system
enter the entry in fstab
copy the content from /usr to /usr_new
may be u have to go into single user mode and rename the original /usr to /usr.old and /usr_new to /usr
..correct me if i am wrong somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2010 04:34 AM
тАО05-24-2010 04:34 AM
Re: How to create separte /usr which is created now on / file-system
enter the entry in fstab
copy[with tar ] the content from /usr to /usr_new
may be u have to go into single user mode and rename the original /usr to /usr.old and /usr_new to /usr
..correct me if i am wrong somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2010 04:35 AM
тАО05-24-2010 04:35 AM
Re: How to create separte /usr which is created now on / file-system
If I were you, I would do an Ignite make_tape_recovery, then boot from the tape, re-allocate all your root file systems with more realistic sizing and create a separate /usr volume, all at the same time.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2010 04:37 AM
тАО05-24-2010 04:37 AM
Re: How to create separte /usr which is created now on / file-system
I'd create a new filesystem named /usrtemp
Since /usr is not currently on its own logical volume, you can't use dd to copy the contents.
So you will need to use cp -pr /usr /usrtemp
Then you can take your system to single user mode and change the mount information.
The reason we use /usrtemp (pick a name) in this case is there already is a /usr directory on the system. We go to single user to make sure no processes are open on the old infrastructure which will prevent a smooth transition.
There are probably 10 different ways to get this done.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2010 05:36 AM
тАО05-24-2010 05:36 AM
Re: How to create separte /usr which is created now on / file-system
I am successfully able to create separate /usr file-system on HP-UX 11.31.
I followed below steps.
1. Created new lvol8 on vg00.
2. Mounted /dev/vg00/lvol8 as /user_new
3. tar the /usr contents (tar ├в cvf /usr_new/usr.tar usr)
4. Extracted the tar -xvf /usr_new/usr.tar (but it extracted as /usr_new/usr so again copied
scp ├в rp /user_new/usr /usr_new/
so I think No need of tar, Even scp works fine.
5. v the existing /usr as /usr.orig (mv /usr /usr.orig)
6. un-mounted /usr_new
7. mounted /dev/vg00/lvol8 as /usr
As this server is new and nobody accessing at that time so I think it allowed me to un-mount /usr_new and mount back as /usr.
Thank you for support and your precious time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2010 05:48 AM
тАО05-24-2010 05:48 AM
Re: How to create separte /usr which is created now on / file-system
I still say that your root file systems are totally mis-allocated and that should be addressed, but it's your system. Do with it what you will.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2010 05:52 AM
тАО05-24-2010 05:52 AM
Re: How to create separte /usr which is created now on / file-system
This looks good except I would use 'cp -p -r' instead of 'tar' for step 3.
Also, note that as long as the sub directory /usr, which is currently mounted to /, has enough space under /, then it is not a problem. Except to say that once you remove /usr from / then you're going to have a 2GB plus lvol3, formatted contiguously, instead of random like lvol8 is, and you'll be wasting disk.
Also note that having /usr under / is how you are going to see many Solaris and linux boxes and the occaisional HP-UX box. It's not really a problem and more of an organizational issue.