首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    AIX系统镜像(RAID1)制作和故障恢复

    AIX系统镜像(RAID1) 对操作系统做镜像,防止硬盘坏掉时,不影响系统正常运行,起到容灾的作用。 制作 rootvg 的标准步骤 1.  extendvg 2.  chvg –Qn 3.  mirrorvg –s 4.  syncvg –v 5.  bosboot –a 6.  bootlist 7.  shutdown –Fr 8.  bootinfo –b 1.首先将1个空闲的物理磁盘加入到rootvg中,例如:hdisk1. #extendvg rootvg hdisk1 如果vg中仅包含2个pv(如:hdisk0,hdisk1),且1个pv是另1个pv的镜像,称为单镜像(single mirroring),那么QUORUM是不需要的,请执行该命令关闭它. #chvg –Qn rootvg 此情况称之为单镜像(single mirroring),一般单镜像的卷组都需要将 quorum 关闭,否则卷组中拥有2份VGDA的磁盘不可用时,受quorum制约,整个卷组无法激活,从而失去镜像意义. 对于rootvg镜像更加需要关闭quorum,否则一旦包含2份VGDA的磁盘不可用时,系统在引导过程中将不能激活 rootvg,从而引起启动失败。 该命令可在系统正常运行时随时补充执行,但需要重新启动才能生效.如果始终没有执行过,当系统启动失败时。 2.建立rootvg所有lv的镜像,你可以使用mklvcopy一个一个去建立,当然更加简单的方法是使用卷组镜像命令. #mirrorvg –S rootvg  (这里的s为大写,即指定后台同步vg,如果是小写,后台不同步vg) # mirrorvg -c 3 rootvg hdisk1,hdisk2 (-c指定镜像数及硬盘,2块硬盘无需指定) 或者 # mklvcopy hd1 2 hdisk1 # mklvcopy hd2 2 hdisk1 # mklvcopy hd3 2 hdisk1 # mklvcopy hd4 2 hdisk1 # mklvcopy hd5 2 hdisk1 # mklvcopy hd6 2 hdisk1 # mklvcopy hd8 2 hdisk1 # mklvcopy hd9var 2 hdisk1 # mklvcopy hd10opt 2 hdisk1 3.接着需要进行镜像间的数据同步. (如果2步骤,写的是大S,则这步可不执行) #syncvg –v rootvg 4.为了使rootvg中的任一pv都能够完成系统启动任务,需要执行bosboot. #bosboot -a  或者 #bosboot -ad hdisk0;bosboot -ad hdisk1;

    02

    python 日志记录

    #!/bin/env python #--*-- coding=utf8 --*-- # # Author: ablozhou # E-mail: ablozhou@gmail.com # # Copyright 2010 ablozhou # # Distributed under the terms of the GPL (GNU Public License) # # hzdq is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # 2010.3.14 写文件,log级别常数定义 import datetime import sys import traceback import codecs import types #log编码全部按utf8处理 loglevels = {'stdout':['info','debug','warn','error','fatal'], 'file':['info','debug','warn','error','fatal'] } logfile = 'logs.txt' class log4py: def __init__(self,modulename='gloabal', loglevel=loglevels, filename='log4py.txt'): self.filename = filename #self.flag = set(loglevel['stdout']+loglevel['file']) self.loglevel = loglevel self.modulename = modulename self.fcname = None class function(): def __init__(self,fcname,parent): parent.debug('enter ',fcname) self.fcname = fcname self.parent = parent def __del__(self): self.parent.debug('exit ',self.fcname) def dbgfc(self,fcname): '''set debug function name''' f = None if 'debug' in self.flag: f = self.function(fcname,self) return f def _gettime(self): return datetime.datetime.now().isoformat() def outstd(self,*fmt): s = self.fmtstr(*fmt) print s def outfile

    01

    MindSponge分子动力学模拟——定义Collective Variables(2024.02)

    在前面的几篇博客中,我们介绍了MindSponge分子动力学模拟框架的基本安装和使用和MindSponge执行分子动力学模拟任务的方法。这里我们介绍一个在增强采样领域非常常用的工具:Collective Variable(CV),或者我们也可以直接称呼其为一个物理量。因为像化学反应或者是蛋白质折叠等问题中,经常会存在一个“路径(Path)”,使得反应沿着这个路径来进行。其中最简单的一种形式,就是成键断键。换句话说,我们可以通过调控这根键的键长,进而去调控这其中的化学反应,这也是分子力学层面的增强采样的一个基本思想。而随着增强采样技术的发展,越来越多的形式的CV被应用在不同的领域和问题当中。本文将会介绍,如何在基于深度学习框架MindSpore的分子动力学模拟软件MindSponge中,去定义一个CV。

    01
    领券