On 08/04/2009 11:04 AM, Mike Christie wrote: > Ty! Boyack wrote: > >> Folks, >> >> I really fear this one is a FAQ somewhere, but I can't find the answer >> to it. >> >> My problem is that discovering new targets overwrites any custom >> settings that have been applied to targets that already exist on a given >> portal. >> >> Here is the sequence of events I'd like to do: >> >> 1) Create an iscsi target in our iscsi SAN (based on IET). >> 2) On the server that wants to use that target, do 'iscsiadm -m >> discovery...' to discover the target. >> 3) We use chap, so set the username/password with 'iscsiadm -m node >> -T... -o update...' >> 4) Log in and use that target. >> (Up to here everything is great) >> 5) Sometime in the future (hours to months) add a new target in the >> iscsi SAN. >> 6) On the same server, do a discovery to discover this new target. >> 7) Set the username/password for the new target. >> 8) Log in to the new target and use the new target. >> >> The problem is that when we do the discovery in step 6, it wipes out the >> username/password and any other customizations we've put in the record >> for the target that was discovered in step 2. When we have only a few >> targets it's easy enough to reset all the username/passwords, but this >> is going to get cumbersome when we have quite a few targets. >> >> Is there a way to discover a new target without overwriting the existing >> target database? >> >> > > What version of open-iscsi are you using? In newer versions you can do: > > iscsiadm -m discovery -t st -ip -o new -o delete > > This will add new records for portals not in the db using iscsid.conf > info and delete portals that are not returned by the target. > >
Thanks, Mike -- that is exactly what I needed! For what it's worth, I had seen the 'new' option in the man page but hadn't used it, just because I misunderstood the man page. The man page states that: 'new creates a new database record for a given portal (IP address and port number). In discovery mode, iscsiadm will create new records for portals returned by the target.' I wanted to keep my old records, so I didn't want it to create new records for me, hence my confusion. After your explanation I can see that it really creates new records for any NEW targets on the portal, is that right? (I know this means I should probably submit a patch on the man page if I'm making such suggestions, but I'd really prefer if someone more familiar with the details would look at that) Thanks again, -Ty! -- -===========================- Ty! Boyack NREL Unix Network Manager [email protected] (970) 491-1186 -===========================- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
