Operating System - HP-UX
1820694 Members
2574 Online
109627 Solutions
New Discussion юеВ

Re: Add a prefix to file system

 
My_Server
Advisor

Add a prefix to file system

Hello

I need to add a prefix to some file system mounted in my hp ux server ,if there a commande to do this or I have just to umount files systems and rename the path for every file system
for exemple

I need to add a prefix for this file system
/var/dcs ===> /temp/var/dcs
/opt/dcs ===> /temp/opt/dcs

is there possible or not ?
thanks in advanced
8 REPLIES 8
Peter Godron
Honored Contributor

Re: Add a prefix to file system

Hi,
depending on why you are doing this,you could try and work with links.
See "man ln"

Please read:
http://66.34.90.71/ITRCForumsEtiquette/after.html

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
on how to reward any useful answers given to your questions.

So far you have not awarded any points !

Torsten.
Acclaimed Contributor

Re: Add a prefix to file system

Hi,

the idea about a "prefix" is bad, because this will move all of /var or /opt to /tmp/var etc.
What do you want to do?
Just try to backup the directory like
/var/dcs using "tar".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
My_Server
Advisor

Re: Add a prefix to file system

HI

I need to migrate some application with oracle data base from server to another

and its recommanded to me from the personne ho devellop this application to have a prefix in all file system in the second server

If i use a link like for exemple :

ls -s /var/dcs /temp/var/dcs

we must have a new file system /temp with new disk or not ?
thank you in advanced
MarkSyder
Honored Contributor

Re: Add a prefix to file system

Assuming /var/dcs and /opt/dcs are filesystems in their own right and /temp exists, the easiest way is to edit /etc/fstab. Add /temp in front of these filesystems then reboot the system.

Before you do this I would ask if it is either necessary or desirable: maybe there is a reason for dcs being under /var and /opt. It could well be that links, as suggested earlier, are indeed your best solution.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
My_Server
Advisor

Re: Add a prefix to file system

Yes for /var/dcs and /opt/dcs its the result to the installation for the application

I have add this ligne in /etc/fstab ,but I can't see the difference when i use bdf

etc/fstab

/dev/vg00/lvol8 /temp/var/dcs vxfs delaylog 0 2

I think that i need to make a copie to /var/dcs in /temp/var/dcs
that's right ?



Torsten.
Acclaimed Contributor

Re: Add a prefix to file system

If you really do this:

etc/fstab

/dev/vg00/lvol8 /temp/var/dcs vxfs delaylog 0 2

prepare to say good bye to your OS ;-)

Once rebooted, the system will never find
/var or /opt.

If you want to store data in

/temp/var/dcs

consider to create a new LVOL and mount it there.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
My_Server
Advisor

Re: Add a prefix to file system

HI

NO I think taht i have a solution

I can create new file system with name /temp/var/dcs ,and If I mount this file with the same Lvol to /ver/dcs ,it will be the same lvol but in another diractory ,because the files is in the a lvol not in a diractory

i hve make a teste with /tmp and its work

Thank you very much and have a nice day
MarkSyder
Honored Contributor

Re: Add a prefix to file system

Torsten is right - I did say you should do this only if /var/dcs and /opt/dcs were filesystems in their own right. Your reference to adding lines in /etc/fstab rather than amending lines suggests they aren't.

Mark
The triumph of evil requires only that good men do nothing