1831600 Members
2857 Online
110027 Solutions
New Discussion

Rename the File System

 
Flavio Lacks
Frequent Advisor

Rename the File System

Hi all,

I don´t have JFS, and i need rename one File System, how can i do this job, with command line ? how can i entrance in machine whit single user ?

Thank
5 REPLIES 5
David Bellamy
Respected Contributor

Re: Rename the File System

umount old mount point and create a new one.
remount filesystem on new mount point.
Hein van den Heuvel
Honored Contributor

Re: Rename the File System


>> I don´t have JFS,

So what do you have? :-)

Why not share a the output for 'bdf filesystem' with us?
Or the fstab line involved?

>> nd i need rename one File System, how can i do this job, with command line ?

Uh... just
- umount
- mv /old_file_sysmtem_name /new_file_system
- mount...

Be sure to adapt /etc/fstab

You want to mv the old name away to make sure any stray application code does not start using it and 'land' on /

hth,
Hein.
A. Clay Stephenson
Acclaimed Contributor

Re: Rename the File System

You don't need any special command and you almost certainly have JFS but perhaps not OnlineJFS but that doesn't matter at all in this case.

What you have to do is trivially simple. Let's suppose that the existing filesystem is mounted as /old and we want to change that to /new.

1) Stop all applications that have /old in use. Lsof or fuser can be used to determine this.

2) umount /old

3) Edit /etc/fstab and change entry that contains /old to /new. Only the mountpoint in this line needs to be changed.

4) mv /old /new

5) mount /new

-----------------------------------------

To bring the box up in single-user mode:

1) Shutdown -r -y 0
2) At the console, interrupt the boot process.
3) BOOT PRIMARY
4) Interact with IPL/ISL? Y
5) ISL> hpux -is

This will bring you up in single-user logged in as root BUT this shouldn't be needed for your mount/umount task.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: Rename the File System

Shalom,

You know this operation is a simple umount create a directory mount operation? Yes?

You don't need to go into single user mode to do this. However it might prevent people from using the filesystem during this operation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
whiteknight
Honored Contributor

Re: Rename the File System


hi,

to go to single user mode, you can use
#shutdown 0

to multi-user mode
#init 3

If you want to rename the mount point ?
which filesystem you want to rename?

may be bdf command will help to see which filesystem want to rename ?



WK
Problem never ends, you must know how to fix it