노성후 wrote: > Hello, > > While I was mounting a target, > I unbinded what I was mounting and I found the mounted file system turn > into readonly mode about 2 minutes later. > > [EMAIL PROTECTED] ~]# tgtadm --lld iscsi --op bind --mode target --tid 2 -I > 10.1.1.0/24 > > [EMAIL PROTECTED] 10.1.1.146,3260]# time dd if=/dev/zero of=/mnt/sda5/1G > bs=1024K > count=1000 > dd: opening `/mnt/sda5/1G': Read-only file system > > real 0m0.001s > user 0m0.000s > sys 0m0.001s > [EMAIL PROTECTED] 10.1.1.146,3260]# > > > Is there timeout for the mounted target which has been unbinded? How can I > fix the timeout?
For all connection type of problems, like if you pull a cable or where the target would disconnect us because the access binding changes, you can set: node.session.timeo.replacement_timeout You can set this in the iscsi.conf file (you have to rerun the discovery command to pick this up), or if you have a node discovered run iscsiadm -m node -T target -p ip:port -o update -n node.session.timeo.replacement_timeout -v $SECONDS node.session.timeo.replacement_timeout will have the initiator try to reconnect to the target for that many seconds. After that time, you will get IO errors and a read-only FS. I would also strongly suggest that you use dm-multipath instead. With stgt if you have multiple nics on that box just run the iscsiadm discovery command to each one. Then log into each portal that is returned. You can then set queue_if_no_path or no_path_retry in the multipath conf which offers more control over handling of errors. > I also would like to know how can I recover from Read-only file system > without restart iscsi or tgtd service. > You have to unmount the FS and remount it. You might have to restart the iscsi service. It depends on what the target sends to us when it logs us out and we try to log back in. If it tells us that the target is gone or that we do not have access, the initiator might give up and stop retrying the login. In this case the replacement_timeout does not come into play, and you have to restart the iscsi service (you can actually just run iscsiadm by hand to log into the specific portal). If the target just returns some generic error or fails the network connection attempt, then we will retry the login for the replacement_timeout seconds and in this case you do have to restart the iscsi service, and when the target comes back we will log in. In both cases you have to remount the FS though. > Thank you. > -Sean > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to email@example.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~----------~----~----~----~------~----~------~--~---