zfs migration checklist

From Leo, 7 Years ago, written in Plain Text, viewed 270 times.
URL https://paste.steamr.com/view/4b8e7220 Embed
Download Paste or View Raw
  1.  
  2. *** Do this on UGB (NSF) ***
  3.  
  4. 0. stop samba and NFS
  5.  
  6. 1. rsync data to uga (nsb)
  7.  root@nsf:~$ rsync -avh --progress --delete /export/ug/ root@nsb:/export/ugb/
  8.  
  9. 2. umount /export/ug  umount /export/ug1
  10. 3. recreate vdisks
  11.         x) PATH=$PATH:/opt/dell/srvadmin/bin
  12.        
  13.         a) check controller's disks
  14.                 omreport storage pdisk controller=0 | grep -E '^(ID|Status|Capacity|Sector Size|Bus|Power|Media)'
  15.        
  16.         b) delete old vdisk
  17.                 omreport storage vdisk controller=0 | grep -E '^(ID|Name)'
  18.                 omconfig storage vdisk action=deletevdisk controller=0 vdisk=six
  19.                
  20.         b) create disks
  21.                 omconfig storage controller controller=0 action=createvdisk raid=r0 size=max pdisk=0:1:6 writepolicy=fwb name=disk06
  22.                
  23.                 root@nsf:/$ omconfig storage controller controller=0 action=createvdisk raid=r0 size=max pdisk=0:1:2 writepolicy=fwb name=disk01
  24.                 Command successful!
  25.                 root@nsf:/$ omconfig storage controller controller=0 action=createvdisk raid=r0 size=max pdisk=0:1:3 writepolicy=fwb name=disk02
  26.                 Command successful!
  27.                 root@nsf:/$ omconfig storage controller controller=0 action=createvdisk raid=r0 size=max pdisk=0:1:4 writepolicy=fwb name=disk03
  28.                 Command successful!
  29.                 root@nsf:/$ omconfig storage controller controller=0 action=createvdisk raid=r0 size=max pdisk=0:1:5 writepolicy=fwb name=disk04
  30.                 Command successful!
  31.                 root@nsf:/$ omconfig storage controller controller=0 action=createvdisk raid=r0 size=max pdisk=0:1:6 writepolicy=fwb name=disk05
  32.                 Command successful!
  33.                 root@nsf:/$ omconfig storage controller controller=0 action=createvdisk raid=r0 size=max pdisk=0:1:7 writepolicy=fwb name=disk06
  34.                 Command successful!
  35.  
  36.                
  37.                 fdisk each disk,
  38.                 u
  39.                 2048 start
  40.                 sdc sdd
  41.                 sde sdf
  42.                 sdg sdh
  43.                
  44. 4. create zfs pool. 3x mirrors
  45.         zpool create -f ugb mirror /dev/disk/by-id... ... mirror ... ... mirror ... ...
  46.        
  47.         `zpool status` should look like:
  48.             uga                                               ONLINE       0     0     0
  49.           mirror-0                                        ONLINE       0     0     0
  50.             scsi-36848f690ec946a001f4604200a61a9c4-part1  ONLINE       0     0     0
  51.             scsi-36848f690ec946a001f46042f0b49a2bb-part1  ONLINE       0     0     0
  52.           mirror-1                                        ONLINE       0     0     0
  53.             scsi-36848f690ec946a001f4604460ca4d664-part1  ONLINE       0     0     0
  54.             scsi-36848f690ec946a001f46043c0c144593-part1  ONLINE       0     0     0
  55.           mirror-2                                        ONLINE       0     0     0
  56.             scsi-36848f690ec946a001f4604520d5ff888-part1  ONLINE       0     0     0
  57.             scsi-36848f690ec946a001f46045c0df837ce-part1  ONLINE       0     0     0
  58.  
  59.                        
  60. 5. create the pool with the compress option
  61.         zfs create -o compress=lz4 ugb/ugb
  62.        
  63.         zfs set mountpoint=/export ugb
  64.         zfs set compression=lz4 ugb
  65.         zfs set exec=off ugb
  66.  
  67.  
  68. 5. zfs import from uga(nsb) to ugb(nfs)
  69.  
  70.         uga (nsb)# zfs snapshot -r uga/ugb@transfer
  71.         uga (nsb)# zfs send -R uga/ugb@transfer | ssh ugb (nsf) "zfs recv -vFd ugb"
  72.        
  73.        
  74.         rename ugb/ugb to ugb/ug
  75.        
  76.         enable sharenfs, otherwise nested mounts don't work (WTF?)
  77.         zfs set sharenfs=on ugb
  78.        
  79.        
  80. 6. Ensure zfs gets mounted properly on reboot
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  

Reply to "zfs migration checklist"

Here you can reply to the paste above