{"id":2012,"date":"2010-03-15T20:26:06","date_gmt":"2010-03-15T10:26:06","guid":{"rendered":"http:\/\/nsrd.info\/blog\/?p=2012"},"modified":"2018-12-11T18:52:42","modified_gmt":"2018-12-11T08:52:42","slug":"basics-bypassing-networker-for-media-movement","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2010\/03\/15\/basics-bypassing-networker-for-media-movement\/","title":{"rendered":"Basics \u2013\u00a0Bypassing NetWorker for media movement"},"content":{"rendered":"<p>Sometimes NetWorker may not want to cooperate when it comes to moving media in and out of drives, or around in a tape library. While <em>nsrjb -n<\/em> will do the trick for some media load operations where you don&#8217;t want to mount media, it&#8217;s not always available. Sometimes you will need to do a media move operation without NetWorker \u2013 either in situations where NetWorker isn&#8217;t running, or at times when NetWorker is disagreeing with the output of <em>sjirdtag<\/em>.<\/p>\n<p>In these cases, you want to work with <em>sjimm<\/em>.<\/p>\n<p>The usage for <em>sjimm<\/em> is:<\/p>\n<pre>[root@tara ~]# sjimm\n1642:sjimm: usage: sjimm jukebox {drive|slot|inlt|mt} src {drive|slot|inlt|mt} dst<\/pre>\n<p>In this case, &#8216;jukebox&#8217; will be the <em>x.y.z<\/em> component of the SCSI device ID as output from <em>inquire<\/em> (or as determined by checking the control port field for the jukebox.)<\/p>\n<p>For instance, on my lab system, inquire shows me:<\/p>\n<pre>[root@tara ~]# inquire -l | grep Autochanger\nscsidev@0.0.0:SPECTRA PYTHON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5500|Autochanger (Jukebox), \/dev\/sg6<\/pre>\n<p>So I know then that the <em>jukebox<\/em> component of my <em>sjimm<\/em> command will be <em>0.0.0<\/em>.<\/p>\n<p>So say I wanted to move the tape in slot 23 into the first drive in my autochanger. I&#8217;d use the command:<\/p>\n<pre>[root@tara ~]# sjimm 0.0.0 slot 23 drive 1<\/pre>\n<p>Note though that this doesn&#8217;t <em>mount<\/em> the tape. If I then run nsrjb, for my drive area I see:<\/p>\n<pre>drive 1 (\/dev\/nst0) slot&nbsp;&nbsp; :&nbsp; &nbsp;\ndrive 2 (\/dev\/nst1) slot&nbsp;&nbsp; :&nbsp; &nbsp;\ndrive 3 (\/dev\/nst2) slot&nbsp;&nbsp; :&nbsp; &nbsp;\ndrive 4 (\/dev\/nst3) slot&nbsp;&nbsp; :&nbsp; &nbsp;\ndrive 5 (\/dev\/nst4) slot&nbsp;&nbsp; :&nbsp; &nbsp;\ndrive 6 (\/dev\/nst5) slot&nbsp;&nbsp; :<\/pre>\n<p>Note too that I didn&#8217;t give the drive to load the tape into as a operating system device, but instead a device number as per the autochanger&#8217;s definition. (I&#8217;ll get to tracing that in a minute.)<\/p>\n<p>I can verify that there is a tape in the given drive at this point by running the command:<\/p>\n<pre>[root@tara ~]# nsrmm -p -f \/dev\/nst0\nVerified LTO Ultrium-4 tape 800823L4 on \/dev\/nst0<\/pre>\n<p>When you&#8217;re done with the tape, you can then move it back:<\/p>\n<pre>[root@tara ~]# sjimm 0.0.0 drive 1 slot 23<\/pre>\n<p>Note that depending on the drive type, it may be necessary before issuing the above command to issue the <em>mt<\/em> command to take the media &#8220;offline&#8221;, which usually issues an eject command to the drive &#8211; e.g.,:<\/p>\n<pre>[root@tara ~]# mt -f \/dev\/nst0 rewoff<\/pre>\n<p>Other than that, there&#8217;s actually not a lot to <em>sjimm<\/em>. You can move tapes from slots to drives, slots to CAP slots, drives to slots, slots to slots, etc.<\/p>\n<p>However, I did mention that I&#8217;d help you work out what drive number corresponds to what operating system device. Obviously if you&#8217;ve got the library configured, you can just use nsrjb&#8217;s output to see see the autochanger device &lt;-&gt; OS device path mapping. If you don&#8217;t yet have a tape library configured in NetWorker, or the issue is determining which drive is currently mapped to which path (after say, a tape drive replacement), you need to do a little more digging.<\/p>\n<p>So, in this case you&#8217;d run <em>sjisn<\/em> \u2013 which is designed to report serial numbers and device details for tape library components. Like <em>sjimm<\/em>, <em>sjisn<\/em> takes the control port of the tape library we want to communicate with &#8211; e.g.:<\/p>\n<pre>\n<pre>[root@tara ~]# sjisn 0.0.0<\/pre>\n<p>Serial Number data for 0.0.0 (SPECTRA&nbsp; PYTHON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ):<br \/>\nLibrary:<br \/>\nSerial Number: XYZZY<br \/>\nSCSI-3 Device Identifiers:<br \/>\nATNN=SPECTRA PYTHON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XYZZY<br \/>\nWWNN=11223344ABCDEF00<br \/>\nDrive at element address 1:<br \/>\nSCSI-3 Device Identifiers:                         ATNN=ZF7584364<br \/>\nDrive at element address 2:<br \/>\nSCSI-3 Device Identifiers:<br \/>\nATNN=ZF7584366<br \/>\nDrive at element address 3:<br \/>\nSCSI-3 Device Identifiers:<br \/>\nATNN=ZF7584368<br \/>\nDrive at element address 4:<br \/>\nSCSI-3 Device Identifiers:<br \/>\nATNN=ZF7584370<br \/>\nDrive at element address 5:<br \/>\nSCSI-3 Device Identifiers:<br \/>\nATNN=ZF7584372<br \/>\nDrive at element address 6:<br \/>\nSCSI-3 Device Identifiers:<br \/>\nATNN=ZF7584374<br \/>\nThe number given in the \"Drive at element address\" line for each drive represents, literally, the drive number according to the tape library itself. I.e., when it refers to drive 1, it means the drive with serial number ZF7584364.<\/p>\n<p>Moving on, we can then run <em>inquire -l<\/em> to provide the device details so as to align internal library drive numbers to operating system paths, cross-referencing by the serial numbers (or WWNs when using a fibre-channel tape library).&nbsp; In this case, I'll just show the details for two of the tape drives:<\/p>\n<pre>scsidev@0.3.0:IBM&nbsp;&nbsp;&nbsp;&nbsp; ULT3580-TD4&nbsp;&nbsp;&nbsp;&nbsp; 5500|Tape, \/dev\/nst2\n                                           S\/N:&nbsp;&nbsp; &nbsp;ZF7584368\n                                           ATNN=IBM&nbsp;&nbsp;&nbsp;&nbsp; ULT3580-TD4&nbsp;&nbsp;&nbsp;&nbsp; ZF7584368\n                                           WWNN=11223344ABCDEF03\nscsidev@0.4.0:IBM&nbsp;&nbsp;&nbsp;&nbsp; ULT3580-TD4&nbsp;&nbsp;&nbsp;&nbsp; 5500|Tape, \/dev\/nst3\n                                           S\/N:&nbsp;&nbsp; &nbsp;ZF7584370\n                                           ATNN=IBM&nbsp;&nbsp;&nbsp;&nbsp; ULT3580-TD4&nbsp;&nbsp;&nbsp;&nbsp; ZF7584370\n                                           WWNN=11223344ABCDEF04<\/pre>\n<p>So, you can see from the above that we can map the drives as follows:<\/p>\n<ul>\n<li>The drive known to the OS as \/dev\/nst2, which has a serial number of ZF7584368 maps to the library device number 3.<\/li>\n<li>The drive known to the OS as \/dev\/nst3, which has a serial number of ZF7584370 maps to the library device number 4.<\/li>\n<\/ul>\n<p>So this would give us the drive numbers to use in <em>sjimm<\/em> if we needed to move tapes in or out of those drives without using NetWorker's NMC or <em>nsrjb<\/em>.<\/p>\n<p>As a side-note, that's also how you'd go about identifying the correct device order for a manual <em>jbconfig<\/em> operation when the library device order is out of sync with the operating system devices \u2013 cross-checking via <em>sjisn<\/em> and <em>inquire<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes NetWorker may not want to cooperate when it comes to moving media in and out of drives, or around&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6,16],"tags":[483,506,892,894],"class_list":["post-2012","post","type-post","status-publish","format-standard","hentry","category-basics","category-networker","tag-inquire","tag-jbconfig","tag-sjimm","tag-sjisn"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-ws","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/2012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/comments?post=2012"}],"version-history":[{"count":1,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/2012\/revisions"}],"predecessor-version":[{"id":7568,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/2012\/revisions\/7568"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=2012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=2012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=2012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}