Thursday, April 23, 2009

Move File System from ZFS to UFS

# zpool create rootpool c0t1d0s1
# zfs create rootpool/rootfs
# zfs set mountpoint=legacy rootpool/rootfs
# mkdir /zfsroot
# mount -F zfs rootpool/rootfs /zfsroot

add this entry in /etc/vfstab:

rootpool/rootfs   -                       /backup zfs     1  yes     -


Moving back from ZFS to UFS:

Identify which disk was used from zfs, in our case it was "c0t1d0s1"

#zpool destroy -R rootpool
#newfs /dev/dsk/c0t0d0s1

Check the file system

# fstyp /dev/dsk/c0t0d0s1
ufs

and mount it to use

#mount /dev/dsk/c0t0d0s1 /dirname

plz note that above mount is temporary, to make it permanent make entry in /etc/vfstab.

Comment the /etc/vfstab entry from zfs and uncomment the entry for the above partition and give

#mount -a



Some additional command for adding/deleting & setting mount point for ZFS filesystem.

# zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
newpool 11.0G 123G 94K /newpool
newpool/ROOT 4.43G 123G 18K legacy
newpool/ROOT/solaris10_8 4.43G 123G 4.43G /
newpool/dump 1.50G 123G 1.50G -
newpool/export 142K 123G 20K /export
newpool/export/home 122K 123G 122K /export/home
newpool/opt 18K 123G 18K /opt
newpool/swap 1G 124G 16K -
newpool/u01 4.08G 123G 4.08G /u01
#zfs destroy -rf newpool/export
#zfs create newpool/export_home
#zfs set mountpoint=/export/home newpool/export_home
# zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
newpool 14.8G 119G 94K /newpool
newpool/ROOT 3.99G 119G 18K legacy
newpool/ROOT/solaris10_8 3.99G 119G 3.99G /
newpool/dump 1.50G 119G 1.50G -
newpool/export_home 158M 119G 158M /export/home
newpool/opt 4.08G 119G 4.08G /opt
newpool/swap 1G 120G 16K -
newpool/u01 4.08G 119G 4.08G /u01



Reference

http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home