Other SCSI Error after doing hyperv checkpoint beta 4 release 11

Hello, after doing a checkpoint in Hyper-V beta 4 release 11 gave the following error:
Code:
(da0:blkvsc0:0:0:0): storvsc scsi_status =2
(da0:blkvsc0:0:0:0): WRITE(10). CDB: 2a 00 02 3a a4 98 00 00 08 00
(da0:blkvsc0:0:0:0): CAM status: SCSI Status Error
(da0:blkvsc0:0:0:0): SCSI status: Check Condition
(da0:blkvsc0:0:0:0): SCSI status: UNIT ATTENTION asc:3f,2 (Changed operating system
defition)
(da0:blkvsc0:0:0:0): Retrying command (per sense data)
I know many may not be using Hyper-V and its features but this is virtual machine I am using to test the OS :)
nedry
 
The error message is a SCSI WRITE command. That means when you take a checkpoint, the FreeBSD is still writing something to disk. In other words, that checkpoint cannot be used a recovery point. It may cause disk corrupt.
 
I know you want to get a checkpoint which guarantees file system consistency. I suggest you build FreeBSD head (not FreeBSD 11) by yourself. FreeBSD head (svn r308664) has included VSS (Volume Shadow Copy). Another way is checking whether VSS is supported before taking checkpoint. If VSS is not supported, never take checkpoint. It is easy to check whether VSS is supported through one power shell command (Get-VMIntegrationService)
Get-VMIntegrationService -VMName hz_FreeBSD11.0_publish_image -ComputerName localhost
If VSS is not supported, the output is:
Code:
VMName                       Name                    Enabled PrimaryStatusDescription SecondaryStatusDescription
------                       ----                    ------- ------------------------ --------------------------
hz_FreeBSD11.0_publish_image Guest Service Interface False   OK
hz_FreeBSD11.0_publish_image Heartbeat               True    OK
hz_FreeBSD11.0_publish_image Key-Value Pair Exchange True    OK                       The protocol version of the co..
hz_FreeBSD11.0_publish_image Shutdown                True    OK
hz_FreeBSD11.0_publish_image Time Synchronization    True    OK                       The protocol version of the co..
hz_FreeBSD11.0_publish_image VSS                     True    No Contact
 
There's new implementation in hyperv/vss that enable the freeze and thaw on UFS during the checkpoints and backups in Hyper-V host. I suppose that the programs that accessing the storage also must receive notification about running backup so they can finish it's writing to the file system. When i test it now on the 11.0-CURRENT or 12.0-CURRENT i still get unfinished corrupted files during the simple copy process that lead to unusable Hyper-V backups.
 
There's new implementation in hyperv/vss that enable the freeze and thaw on UFS during the checkpoints and backups in Hyper-V host. I suppose that the programs that accessing the storage also must receive notification about running backup so they can finish it's writing to the file system. When i test it now on the 11.0-CURRENT or 12.0-CURRENT i still get unfinished corrupted files during the simple copy process that lead to unusable Hyper-V backups.

man hv_vss

on stable-11 or current. It has detailed description about how userland application should handle VSS.

Thanks,
sephe
 
Thanks for the respond Sepherosa.

Is there's any userland application that is aware of the VSS implementation?
The simple test that i make was to copy a file using "cp" and during the copy process i make a checkpoint from Hyper-V host. When i restored the checkpoint the copied file was corrupted (half) to the moment of the checkpoint, so i suppose that the "cp" command was not aware of the snapshot that was been made in any way.

I hope to see this in feature it will make the life a lot easy with the backup process.
 
Thanks for the respond Sepherosa.

Is there's any userland application that is aware of the VSS implementation?
The simple test that i make was to copy a file using "cp" and during the copy process i make a checkpoint from Hyper-V host. When i restored the checkpoint the copied file was corrupted (half) to the moment of the checkpoint, so i suppose that the "cp" command was not aware of the snapshot that was been made in any way.

I hope to see this in feature it will make the life a lot easy with the backup process.

Well, you can add a wrap for your simple cp testing. Nothing in the base aware of userland VSS; you will have to nock it out by yourself.
 
Thanks for the respond Sepherosa.

Is there's any userland application that is aware of the VSS implementation?
The simple test that i make was to copy a file using "cp" and during the copy process i make a checkpoint from Hyper-V host. When i restored the checkpoint the copied file was corrupted (half) to the moment of the checkpoint, so i suppose that the "cp" command was not aware of the snapshot that was been made in any way.

I hope to see this in feature it will make the life a lot easy with the backup process.
There is an userland example in "man hv_vss". You can compile and run it in your environment if you want to do some experiment.
 
I don't know if it's possible hv_vss_daemon first to issue sync(); then to freeze the file system writes. Maybe it's worth a look at dump.c how the snap is done there.
 
Yes and this lead to not consistent file system snapshot that can't be used after restore. I'm not a developer that's why i only suggest to look at how the file system snapshot is taken within dump command witch require the journaled soft updates to be disabled (SU+J).
 
Thanks for your reminder. I have read the code of "dump" which explicitly calls 'sync' before backup. For VSS implementation, I have already considered 'sync' in order to make consistent file system backup. The hv_vss_daemon does not explicitly invoke 'sync' because the UFSSUSPEND ioctl has already included this functionality. If you still have concerns, please check the UFSSUSPEND ioctl code in sys/ufs/ffs/ffs_suspend.c: "ffs_susp_suspend->vfs_write_suspend->VFS_SYNC". So, VSS guarantees that all 'dirty' buffers were flushed.

Anyway, if you have any other issues, please do not hesitate to let me know. Welcome to send email to bsdic@microsoft.com.
 
Back
Top