Hello, I am currently trying to implement an iscsi target driver for a remote storage space with tgt.
At first, the driver was slow (quite normal), but worked quite well, with a testing script i wrote. Then, I added some features for it to get faster, and thus the problem appeared. Actually, after the login to the target with iscsiadm, I partition the disk, create some filesystem, and then make a copy of a random file tree, before umounting the partition, and logout. When i try to mount the partition again (after all required manipulations with iscsiadm), i stumble upon a series of IO Errors, meaning that my filesystem is totally corrupted, and that some of the data weren't saved by my driver (be it that i didnt receive it or that i could not save it) When I use the sync command before umounting, I actually succeed to read the whole file system again afterwards. While searching a solution, I found this in another thread of this mailing list (http://groups.google.com/group/open-iscsi/browse_thread/ thread/e445471fab2af459/b8fae3dfb6e6c68f?pli=1) : >> is the Sync cache that occurs at logout actually sending data? or is >> it just sending a scsi msg to flush/checkpoint the target side? > >No data. It is just telling the target side to basically flush what it >has in its cache. For example tgt does a sync() to write out data to the >backing store. I believe IET does the equivalent of a sync() but it is >done from the kernel since IET is implemented there. Look at the source >for IET or just fire off a mail to that list if you want to know all the >details of what it does. If i'm not misunderstanding what's written here, That means that when i type the command $ iscsiadm --mode node --targetname mytarget --logout All that is done is actually sending a sync command to the target (tgt in my case) without sending any data relating to the system/iscsid cache ? My hypothesis is thus that my problem originates from this behavior of the iscsiadm logout action. If I'm not wrong about that, how can i make it so that a synchronization is done before the iscsi logout ? Or I am completely wrong, and then do you have any insight as to what my problem really is ? Thanks for your help in advance ! -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.
