Sun Microsystems, Inc.
spacer spacer
spacer SunSolve Online gabrielc :  Edit Account  
spacer
black dot
Simple |  Advanced |  Product |  Tips
black fade
spacer
  
Printer Friendly Page ] [ Was this document useful? Yes or No ]
Notify if Document Changes ] [ Mark Document for Download ]
View/Edit Notifications ] [ View/Edit Marked Documents ]

Jump to

Infodoc ID   Synopsis   Date
19241   VxFS - How to convert a UFS filesystem to a VxFS filesystem?   11 Jan 2000

Description Top
The only real answer to this involves a backup of the UFS data
and a restore of the data in a new VxFS filesystem.  It is
impossible to "convert" a filesystem without some downtime.

One way to convert is to simply backup & restore.  This example assumes
that 'vol01' contains a UFS fileystem and you want to "convert" it to
be a VxFS filesystem.  This example shows the backup being done to a
tape.  You could, of course, backup to a datafile if you so desire.

	1.  Unmount the UFS filesystem and backup the filesystem.
		umount /data
		ufsdump 0f /dev/rmt/0c /dev/vx/rdsk/vol01

	2.  Create a VxFS on the disk or volume.
		mkfs -F vxfs /dev/vx/rdsk/vol01

	3.  Mount the new/empty VxFS filesystem
		mount -F vxfs /dev/vx/dsk/vol01 /data

	4.  Restore the data from tape
		cd /data
		ufsrestore xf /dev/rmt/0c

	5.  Change the /etc/vfstab file appropriately:

	       from: /dev/vx/dsk/vol01 /dev/vx/rdsk/vol01 /data ufs  1 yes -
   	       to:   /dev/vx/dsk/vol01 /dev/vx/rdsk/vol01 /data vxfs 1 yes -


If you have enought storage on your system to have two copies of the
data simultaneously, you could follow the following generic example.
This example assumes that 'vol01' contains a UFS fileystem and 'vol02'
will contain the new VxFS filesystem.

	1.  Create a VxFS filesystem on the new disk or volume.
		mkfs -F vxfs /dev/vx/rdsk/vol02
	
	2.  Unmount the original UFS filesystem.
		umount /data

	3.  Mount this empty VxFS filesystem on the mountpoint.
		mount -F vxfs /dev/vx/dsk/vol02 /data

	4.  Run the 'ufsdump' command and pipe the output to 'ufsrestore'
	    to "copy" the data from the UFS filesystem to the VxFS filesystem.
		ufsdump 0f - /dev/vx/rdsk/vol01 | (cd /data; ufsrestore xf -)

	5.  Change the /etc/vfstab file appropriately:

	       from: /dev/vx/dsk/vol01 /dev/vx/rdsk/vol01 /data ufs  1 yes -
   	       to:   /dev/vx/dsk/vol02 /dev/vx/rdsk/vol02 /data vxfs 1 yes -

	6.  You can now safely remove the "old" (vol01) volume now.


NOTE: Many people get confused that they are using 'ufsrestore' to
      restore data to a VxFS filesystem.  Realize that the backup was
      created with 'ufsdump', so you must use 'ufsrestore' to read that
      backup.  'ufsrestore' will restore data not filesytem structure.  
      Please don't let this confuse you... it works, and it's supported.

ADDITIONAL INFO:
	Veritas has a utility that reportedly converts a UFS filesystem
	to a VxFS filesystem in place (that is to say, without having
	to do a backup and restore).  This utility can be run ONLY by
	Veritas engineers as a consulting agreement (in other words,
	you'll most likely pay extra for this service).  Contact
	Veritas directly if this option appeals to you.
Applies To (none)
Attachments (none)

Top


 

SunSolve Online:  Edit Account Patches Submit a Service Order Diagnostic Tools Support Documents Security Information SunSolve WorldWide SupportForum About SunSolve Feedback Site Map /etc Help

    
Copyright 1994-2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA. All rights reserved.
Terms of Use. Privacy Policy. Feedback