Migrar rootFS de UFS a ZFS

Page last edited hace 2059 días 13 horas
De Solaris-ES
Saltar a: navegación, buscar

De Root UFS a ZFS[editar]

root@sol01 # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c0d0 <DEFAULT cyl 2085 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
       1. c0d1 <DEFAULT cyl 2085 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0
root@sol01 # df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0d0s0         15G    11G   3.3G    78%    /


root@sol01 # zpool create rpool c0d1s0


root@sol01 # lucreate -c c0d0s0 -n new-zfsBE -p rpool


root@sol01 # lustatus
Boot Environment           Is       Active Active    Can    Copy      
Name                       Complete Now    On Reboot Delete Status    
-------------------------- -------- ------ --------- ------ ----------
c0d0s0                     yes      yes    yes       no     -         
new-zfsBE                  yes      no     no        yes    -         
root@sol01 # luactivate new-zfsBE
root@sol01 # lustatus
Boot Environment           Is       Active Active    Can    Copy      
Name                       Complete Now    On Reboot Delete Status    
-------------------------- -------- ------ --------- ------ ----------
c0d0s0                     yes      yes    no        no     -         
new-zfsBE                  yes      no     yes       no     - 
root@sol01 # init 6
updating /platform/i86pc/boot_archive
propagating updated GRUB menu
Saving existing file </boot/grub/menu.lst> in top level dataset for BE <new-zfsBE> as <mount-point>//boot/grub/menu.lst.prev.
File </boot/grub/menu.lst> propagation successful
File </etc/lu/GRUB_backup_menu> propagation successful
File </etc/lu/menu.cksum> propagation successful
File </sbin/bootadm> propagation successful


root@sol01 # df -h
Filesystem             size   used  avail capacity  Mounted on
rpool/ROOT/new-zfsBE    16G    10G   3.4G    76%    /
rpool                   16G    35K   3.4G     1%    /rpool
rpool/ROOT              16G    21K   3.4G     1%    /rpool/ROOT


Vuelta atras[editar]

root@sol01 # lustatus
Boot Environment           Is       Active Active    Can    Copy      
Name                       Complete Now    On Reboot Delete Status    
-------------------------- -------- ------ --------- ------ ----------
c0d0s0                     yes      no     no        yes    -         
new-zfsBE                  yes      yes    yes       no     -  
root@sol01 # luactivate c0d0s0
System has findroot enabled GRUB


root@sol01 # init 6
updating /platform/i86pc/boot_archive
propagating updated GRUB menu
File </boot/grub/menu.lst> propagation successful
File </etc/lu/GRUB_backup_menu> propagation successful
File </etc/lu/menu.cksum> propagation successful
File </sbin/bootadm> propagation successful


--! EL REBOOT ES LENTO!!! !--


root@sol01 # ludelete -f new-zfsBE
System has findroot enabled GRUB
Updating GRUB menu default setting
GRUB menu default setting is unaffected
File </etc/lu/GRUB_backup_menu> propagation successful
Successfully deleted entry from GRUB menu
Determining the devices to be marked free.
Updating boot environment configuration database.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.
Boot environment <new-zfsBE> deleted.


root@sol01 # lustatus 
Boot Environment           Is       Active Active    Can    Copy      
Name                       Complete Now    On Reboot Delete Status    
-------------------------- -------- ------ --------- ------ ----------
c0d0s0                     yes      yes    yes       no     -         


root@sol01 # zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  15.9G  1.00G  14.9G     6%  ONLINE  -


root@sol01 # zpool destroy rpool