Blog

  • 备份术语

    RTO(Recovery Time Objective)

    一种业务切换策略,是容灾切换时间最短的策略。以恢复时间点为目标,确保容灾机能够快速接管业务。

    RPO(Recovery Point Objective)

    一种业务切换策略,是数据丢失最少的容灾切换策略。以数据恢复点为目标,确保容灾切换所使用的数据为最新的备份数据。

    备份窗口

    对数据进行备份而不严重影响使用该数据的应用程序时,进行数据备份的时间间隔。

    (more…)

  • vmware虚拟机打开电源慢的排查思路

    文章来源:Solved: Problems with slow Power-on

    1. Run esxtop on the host where you start it up and look for high ready times on cpu, disk latencies for storage, or memory limits. Or check these values on the performance tab in vCenter – I prefer esxtop – it samples 4x as often by default and you can adjust the sample rate. Check vm properties in vClient as well as .vmx to make sure you do not have any limits set for this vm.

    2. Are these hosts all part of the same cluster?

    3. Do you use resource pools?

    4. Have you checked the logs on your host (var/log/… vmkernel, vmkwarning, as well as the vmware.log in the vm directory) ?

    5. What about the VM’s swap file? If the creation of that is slow, then the VM may take a long time to boot as well. Check to see where that is stored.

    6. Compare all of this VM’s settings to another VM that is not experiencing the problem.

    7. Does this happen with only 1 VM, a specific group of VM’s, or all of them? Does the slow boot vary across different VM types (cpus, memory, storage location, OS)?

    8. How many disks does this VM have? To power on the VM, the host has to write a lock entry on each lun the VM has disks on. Normally this takes a (1-2) MS, but if there is contention for lun meta updates (VMotions, VM power on, VM creation, snapshots growing) then this could delay the boot as well.

    9. What is the VM hardware version?

    10. VMTools up to date?
    11. Does the HAL match # of CPU’s?
  • for循环给字符数组赋值.踩坑

    遇上懵逼bug。

    在程序初始化了一个字符数组.然后使用for循环给字符数组赋值(一开始没想起来strcopy).结果赋值之后转化成字符串,程序在有的机器能正常运行,有的机器报错.

    debug发现这个字符数组转化成的字符串比原来的多了一截.

    原因是:字符数组初始化的时候是有长度,并且是再栈里分配的. 估计不同机器上的初始化出来的字符数组是不同的,可能是重用了.字符串拷贝还是要使用标准函数比较好.

  • vmware 无法删除快照

    vmware无法删除快照.

    使用vcenter 6.0 测试,关机情况下备份,出现:创建快照层次过深.
    尝试删除快照出现错误:

    A general system error occurred: vim.fault.GenericVmConfigFault

    解决方法

    1. 打开存储进入虚拟机所在目录.
    2. 创建临时目录,备份快照文件.
      mkdir ./tmp/
      mv *.vmsn ./tmp/
      mv *.vmsd ./tmp/
    3. 界面上点击删除全部快照.如果失败,重试
    4. 如果步骤3成功.进行磁盘整合.

    (more…)

  • iscsiadm用法

    iscsiadm 用法


    data from

    Understanding iscsiadm Utility in CentOS / RHEL
    Discovering iSCSI targets using Send Targets

    mode

    Use the iscsiadm utility to update, delete, insert, and query the persistent database. Also use this utility to establish a session between a target and an initiator. Several different operational modes are available for the command.

    • discoverydb: Updates or queries the Open-iSCSI database records
    • discovery: Performs a discovery operation
    • node: Performs an operation on a portal (IP:port) on an iSCSI target
    • session: Performs an operation on a TCP connection between an initiator and a target
    • iface: Performs an operation on a network interface

    Additional options to iscsiadm include:

    • -type – Specify the discover type.
    • -portal – Specify the iSCSI target portal.

    (more…)