AIX Backup rootvg with tape 4mm(DDS) and scan/delete tape device after finished (Share Tape with other machine)

** Myself
#Scan device
/usr/sbin/cfgmgr ;
TAPE=$(lsdev -C | grep 4mm | awk {'print$1'})
/usr/sbin/chdev -l ${TAPE} -a block_size=1024 ;

#Backup by mksysb
/usr/bin/mksysb -i /dev/${TAPE} ;
 
#Remove tape device
/usr/sbin/rmdev -dl $(lsdev -C | grep "PCI-XDDR Dual Channel" | awk '{print $1}') -R
/usr/sbin/lsdev -C | grep "PCI Bus" | awk '{print $1}' | while read LINE;
   do
      /usr/sbin/rmdev -dl ${LINE};
   done

0 comments:

Loading