Operating System - HP-UX
1831593 Members
2916 Online
110027 Solutions
New Discussion

Moving /opt /usr /var into /

 
SOLVED
Go to solution
Derek Whigham_1
Trusted Contributor

Moving /opt /usr /var into /

I need to move then contents of /opt /var /usr into / then unmount them (to be removed in the future).

I am planning to move them using cp to move them to / such that /var becomes /var2 /usr becomes /usr2 and /opt becomes /opt2

Then unmount /var /usr/ and /opt

and mv /var2 back to /var

Anybody have a better way or see's any danger i n this.

Below is our setup

lvol1 vg00 LVM HFS 304 1 /stand
lvol2 vg00 LVM Swap/Dump 16368 1
lvol3 vg00 LVM VxFS 40592 1 /
lvol4 vg00 LVM VxFS 608 1 /home
lvol5 vg00 LVM VxFS 4000 1 /opt
lvol6 vg00 LVM VxFS 208 1 /tmp
lvol7 vg00 LVM VxFS 5008 1 /usr
lvol8 vg00 LVM VxFS 2000 1 /var
Divide and Conquer
4 REPLIES 4
VEL_1
Valued Contributor
Solution

Re: Moving /opt /usr /var into /

Hi,

Its better create one directory in / & use cpio command to move /opt /var /usr into /NEW_DIR . Using the cpio command, u can keep the permission & owner, group permission also.


Thanks.
Arunvijai_4
Honored Contributor

Re: Moving /opt /usr /var into /

Booting into single user mode and doing the specified operations should be correct way.
ISL>hpux -iS

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
MarkSyder
Honored Contributor

Re: Moving /opt /usr /var into /

The first question that arises is why? The second is do you have enough room in / to do this? / is usually small.

Without more details, I would tend to suggest taking an ignite backup and rebuilding the system from that.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Derek Whigham_1
Trusted Contributor

Re: Moving /opt /usr /var into /

Yeap cpio is the way to go , I have completed this successfully / was 40Gb due to a field engineer mistake.

Thanks for the prompt responses
Divide and Conquer