Skip to content

Instantly share code, notes, and snippets.

@yilas
Last active February 16, 2016 08:50
Show Gist options
  • Select an option

  • Save yilas/db311fb7055772e5d853 to your computer and use it in GitHub Desktop.

Select an option

Save yilas/db311fb7055772e5d853 to your computer and use it in GitHub Desktop.
## Before restart
mkdir /opt/data/ramdisk_backup
rsync -av /mnt/dss/ramdisk/scocache /opt/data/ramdisk_backup
rsync -av /mnt/dss/ramdisk/tlogs /opt/data/ramdisk_backup
## Reboot
reboot
## After restart
rsync -av /opt/data/ramdisk_backup/scocache /mnt/dss/ramdisk
rsync -av /opt/data/ramdisk_backup/tlogs /mnt/dss/ramdisk
## restart volumdriver (q5)
q.dss.voldrv.start()
## Start to attach all SCSI disk to the volumedriver
vols_failed = []
for volid in vols_saved:
print 'Trying to mount volid %s'% volid
try:
q.dss.voldrv.volume.restart(volid, restartLocal=True, prefetch=False)
except:
print 'Error in trying to mount volumes'
vols_failed.append(volid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment