Renaming a vxfs filesystem

 
SOLVED
Go to solution
Ken Englander
Regular Advisor

Renaming a vxfs filesystem

Is it possible to rename a filesystem without actually backing it up, deleting it, and restoring the data to the new filesystem?

Thanks!
8 REPLIES 8
Patrick Wallek
Honored Contributor
Solution

Re: Renaming a vxfs filesystem

Absolutely.

1) Create directory for new mount point.

# mkdir /new_mount

2) Unmount current filesystem

# umount /mount

3) Modify /etc/fstab to point the LV to the new mount point /new_mount

4) Verify permissions on directories before mounting.

# ll /mount /new_mount
Make sure the ownership and permissions are the same. If not, modify the /new_mount so they are.

5) Mount /new_mount

# mount /new_mount

This should work if you correctly modified /etc/fstab.
Pete Randall
Outstanding Contributor

Re: Renaming a vxfs filesystem

Sure, just unmount it, create a new mount point, then remount it under the new mount point. For example:

umount /home
mkdir /myhome
mount /dev/vg00/lvol4 /myhome

/home has now been renamed /myhome!


Pete

Pete
DCE
Honored Contributor

Re: Renaming a vxfs filesystem



If the file system is its own mount point
unmount the file system
create the new mount point name
edit /etc/fstab and change the mount point name to the new name
run mount -a to mount the file system on the new name

If the file system is not its own mount point, simply use mv
A. Clay Stephenson
Acclaimed Contributor

Re: Renaming a vxfs filesystem

As a Plan B, create a symbolic link from the oldmountpoint to the new and declare victory.

ln -s /xxx/yyy/olddir /aaa/bbb/newdir
If it ain't broke, I can fix that.
Gavin Clarke
Trusted Contributor

Re: Renaming a vxfs filesystem

I find bdf to be the easiest way to remind myself of the logical volume name, if you don't know it already.

For the change of mount point I think you've got lots of answers above.

Cheers
Zinky
Honored Contributor

Re: Renaming a vxfs filesystem

Or you can use a soft link:

If say your have an existing filesystem named /data123. And your new application needs to address the data at a new filesystem called /data456, you can simply:

ln -s /data123 /data456

No interruption to your filesystem whatsoever. /data123 will still be available. /data456 will ne there but will point to /data123.

;^)

Peace and Clean Air.





Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Ken Englander
Regular Advisor

Re: Renaming a vxfs filesystem

Thanks everyone. You might be able to guess I am a novice. It makes perfect sense now that I think about it.
Ken Englander
Regular Advisor

Re: Renaming a vxfs filesystem

Thanks