從disksafe.log可以看到DiskSafe的細部動作,了解log可以讓你更加認識DiskSafe的行為,以及協助troubleshouting。
從disksafe.log可以看到DiskSafe的細部動作,了解log可以讓你更加認識DiskSafe的行為,以及協助troubleshouting。
建立policy的指令我們已經介紹過,譬如我們要protect /dev/sdb:
dscli disk protect primary=sdb server=172.30.10.23 protocol=iscsi
從disksafe.log中我們可以看到以下一連串的動作:
2011-10-12 16:30:51 (T99330960) |W| Assigning mirror disk with sectors: 31457280
2011-10-12 16:30:52 (T99330960) |W| Successfully assigned mirror disk over protocol 0(2:FC, 4:iSCSI). Disk No: 2224, WWID: 6000d77cf548439b761e00004e954e5d
2011-10-12 16:30:54 (T99330960) |I| Refresh disks information begin...
2011-10-12 16:30:54 (T99330960) |I| Getting disks information from kernel driver...
2011-10-12 16:30:54 (T99330960) |R| Disk 2208(/dev/sdk) arrived, ID: FALCON__IPSTOR_DISK_____6000d77cf548439b761e00004e954e5d, capacity: 16106127360, number of partitions: 0, is dynamic disk: no
2011-10-12 16:30:54 (T99330960) |I| Refresh disks information end
2011-10-12 16:30:54 (T99330960) |W| dsksaferpc_createipstordisk_1_svc, successfully cleaned meta data on disk /dev/sdk
2011-10-12 16:30:54 (T99330960) |I| dsksaferpc_enablemirror_1_svc IN
2011-10-12 16:30:54 (T99330960) |W| Enable mirror, Primary device /dev/sdb is NOT PV. Not checking if UMAP device is an LV.
2011-10-12 16:30:54 (T99330960) |I| Succeeded to add policy to registry for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:54 (T148482960) |R| Protection thread for disk /dev/sdb with mirror disk /dev/sdk started
2011-10-12 16:30:54 (T148482960) |R| Begin to wait for driver prepare umap for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:54 (T41180048) |R| Protection statistic thread for disk /dev/sdb with mirror disk /dev/sdk started.
2011-10-12 16:30:55 (T99330960) |E| Scanning file system to create UMAP for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:55 (T99330960) |R| It's time for initial synchronization for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:55 (T99330960) |I| Succeeded to change state from idle to sync-snapshot for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:55 (T99330960) |R| Start daily initial sync-snapshot for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:55 (T99330960) |R| Succeeded to create protection for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:55 (T99330960) |C| [INFO] Disk /dev/sdb:0 is protected with mirror disk /dev/sdk. Mode: Periodic. Initial sync time: 2011-10-12 16:30:54. Initial sync option: Copy only sectors used by file system.
2011-10-12 16:30:56 (T148482960) |R| Driver prepare umap for disk /dev/sdb with mirror disk /dev/sdk successfully
2011-10-12 16:30:56 (T148482960) |I| Command sync-snapshot received for disk /dev/sdb with mirror disk /dev/sdk
2011-10-12 16:30:56 (T148482960) |C| [INFO] Disk /dev/sdb:0 initial synchronization started.
2011-10-12 16:33:45 (T148482960) |C| [INFO] Disk /dev/sdb:0 synchronization completed. Total data processed: 8769 MB. Total changed data transmitted: 8769 MB. Total time: 169 seconds. Average speed: 53133 KB/s.
2011-10-12 16:33:49 (T148482960) |R| Succeeded to take disk /dev/sdb with mirror disk /dev/sdk to in-sync state
2011-10-12 16:33:49 (T148482960) |I| Policy disk /dev/sdb with mirror disk /dev/sdk syncing cycle count is 0
2011-10-12 16:33:49 (T148482960) |D| Syncing file system before taking snapshot of a disk.
2011-10-12 16:33:49 (T148482960) |R| Skip snapshot agent initiation as no disks in policy {58c19944-5f35-4145-bb5d-c27dccfb1c41} are mounted
2011-10-12 16:33:49 (T148482960) |R| Protection disk /dev/sdb with mirror disk /dev/sdk is IN_SYNC, state, 2, delta, 0, before taking disk snapshot
2011-10-12 16:33:49 (T148482960) |E| Waiting for protection disk /dev/sdb with mirror disk /dev/sdk to come to OUT-OF-SYNC after suspending in-sync mirror.
2011-10-12 16:33:56 (T148482960) |C| [INFO] Disk /dev/sdb:0 scheduled snapshot created. Timestamp: 2011-10-12 16:33:50.
2011-10-12 16:33:56 (T148482960) |R| Succeeded to take scheduled snapshot for disk /dev/sdb with mirror disk /dev/sdk in SyncingAndSnapshotProc, disksafe timestamp: 1318408430(2011-10-12 16:33:50)
從以上我們可以看到DiskSafe在建立policy時會進行以下動作: