本文共 3009 字,大约阅读时间需要 10 分钟。
IBM提供了3种copy service的高级特性
1、flashcopy
2、volumecopy
3、Enhanced remote mirroring(ERM)
本篇主要讲述flashcopy,volumecopy和ERM会在接下来的篇章中讲述。
(1)、先来看下flashcopy在redbook中的描述
A FlashCopy is a virtual logical drive that is a point-in-time (PiT) image of a real logical drive. The FlashCopy is the logical equivalent of its complete physical source, at the time created, but it requires less physical disk space and is created quickly when compared to the time required to create a full copy of the source.(Flashcopy是一个真实lun的PiT image,它只需要很少的物理磁盘空间,和创建完整的copy相比,flashcopy创建的很快,因为repository只用于存储自从它创建以来改变操作)。
The real logical drive that is copied is known as the base logical drive. You can create up to four FlashCopies from each base logical drive. When you create a FlashCopy, the controller suspends write operations to the base logical drive for a few seconds as it creates a FlashCopy repository logical drive. The repository is a physical logical drive where FlashCopy metadata and copy-on-write data are stored.【当创建flashcopy时,控制器暂停源卷的写操作几秒钟,因为它在创建flashcopy repository lun。这个repository是储存flashcopy元数据和copy-on-write数据的物理LUN】
Using the FlashCopy feature requires less disk space, because the repository logical drive is used for storing only data change operations that have been made since its creation. Because the FlashCopy is not a full physical copy, if the source logical drive is damaged, the FlashCopy logical drive itself cannot be used for recovery.【flashcopy只占用磁盘很少空间,因为flashcopy不是完整的物理拷贝,因此如果源卷damaged,flashcopy也不能用于恢复】
(2)、Flashcopy能用于以下一些目的:
----Performing backup images
----Creating a temporary test image
----Creating a source image for a VolumeCopy operation that can be copied without extended effects to the production operations.
(3)、具体原理如下图,正如上面所说的,repository lun只存储了一些metadata pointer map和copy-on-wirte的数据。由于不是真正的copy数据,因此创建速度很快。
当创建flashcopy时,控制器暂停源卷的写操作几秒钟,因为它在创建flashcopy repository lun。这个repository是储存flashcopy元数据和copy-on-write数据的物理LUN。 由此我们可以猜测,如果base lun的数据改变较频繁,那么repository lun增长的也会较快,在创建flashcopy时默认大小是base lun的20%,但是这个数值可以调整,也可在flashcopy创建完成之后调整。但是万一repository 满了,但管理员还不知道怎么办呢?会有两种策略:
1、base Lun继续写,flashcopy lun不再valid,这是默认策略,这种方式可以保证应用继续写数据。
2、base lun不能写,flashcopy lun 依旧是valid,因为没有新的copy-on-write数据生成,这种方式为了保证repository lun是可用于恢复的,就禁止主机应用再往base lun上继续写数据。
(4)、对base lun 使用defragmentation,会导致base lun每个数据块的copy-on-write,这会导致当defragmentation完成时,flashcopy repository lun满了。为了阻止这种情况发生,在base lun defragmentation时,要保证flashcopy repository lun是base lun的105%。这是保证 base lun每个数据块copy-on-write的最小值。
注:defragmentation,按照字面意思即“碎片整理”,但这不是我们经常听说的文件系统层面的碎片整理,具体的内容会在《IBM DS Storage Other function》中讲述。
(5)、recreate flashcopy
如果不需要flashcopy了,可以disable它,不一定非得删除。如果哪一天想对同样的base lun创建flashcopy,可以使用re-create
recreate flashcopy会删除原先repository lun上所有的copy-on-write数据。
recreating flashcopy invalidates the current FlashCopy and creates a new point-in time copy。
PS:flashcopy做起来很简单,具体的操作及其用于恢复的步骤请见下篇《IBM copy service-Flashcopy 实验》