{"id":47,"date":"2008-07-18T00:51:12","date_gmt":"2008-07-17T16:51:12","guid":{"rendered":"http:\/\/blog.lolyco.com\/sean\/?p=47"},"modified":"2008-08-29T09:54:38","modified_gmt":"2008-08-29T01:54:38","slug":"ethernet-card-problem-eth2_rena","status":"publish","type":"post","link":"https:\/\/blog.lolyco.com\/sean\/2008\/07\/18\/ethernet-card-problem-eth2_rena\/","title":{"rendered":"Ethernet card problem &#8211; &#8216;eth2_rena&#8217;"},"content":{"rendered":"<p>This is the sort of <strong>problem<\/strong> I expect that only happens to people who <strong>muck about<\/strong> with already working kit. Another evening spent regretting ever shutting down a running system &#8216;for <strong>just a few minutes<\/strong> while I add some hardware&#8217;.<\/p>\n<p><a title=\"Dell PowerEdge SC440 tower server\" href=\"http:\/\/www1.ap.dell.com\/content\/products\/productdetails.aspx\/pedge_sc440?c=my&amp;cs=mybsd1&amp;l=en&amp;s=bsd\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" style=\"float: right; margin-left: 8px; margin-right: 8px;\" src=\"http:\/\/i.dell.com\/images\/global\/products\/superview\/sc440_main_155x220.jpg\" alt=\"Dell PowerEdge SC440\" width=\"180\" height=\"220\" \/><\/a>I run a few websites on a <strong>Dell PowerEdge SC440 tower server<\/strong>. I must write in detail about it sometime: I love it &#8211; it&#8217;s dirt cheap, fast enough for almost anything I want to use it for, very quiet and when I put it on a power meter, I get a reading of <strong>53W<\/strong>. It replaced a noisy, hot, bag of nails that would hardly run for a month without something going wrong. That previous <strong>POS<\/strong> was <strong>consuming<\/strong> <strong>186W<\/strong> on the power meter, so the SC440 will probably pay for itself in a couple of years. We set up the SC440, switched it on, and then <strong>forgot<\/strong> it existed for <strong>8 months<\/strong> &#8211; and it&#8217;s right here, between all our desks.<\/p>\n<p>A new application I&#8217;m working on reminded me the SC440 existed &#8211; a <strong>rapidly growing<\/strong> database (adding Gigabytes a day), and several <strong>data-mining applications<\/strong> running <strong>concurrently<\/strong> on the same data. A few rough calcs tell me the cheapest way to cope with the extra load for a few months (until I know whether the project is <strong>worth<\/strong> <strong>investing<\/strong> heavily in) is to buy a couple more SC440s and connect them to the first via <strong>Gigabit<\/strong> <strong>ethernet<\/strong>.<\/p>\n<p>I have <strong>terrible taste<\/strong> in <strong>network<\/strong> <strong>equipment<\/strong>, <a title=\"dynamic DNS update script\" href=\"http:\/\/blog.lolyco.com\/sean\/2008\/06\/13\/zoneeditcom-dynamic-dns-update-script\/\" target=\"_self\">as I&#8217;ve mentioned before<\/a>, so I decided to connect the two new SC440s <strong>direct<\/strong> to the original one with <strong>extra<\/strong> ethernet <strong>cards<\/strong>. So, I posted a &#8216;down for maintenance for a few minutes&#8217; page on another server, <strong>mapped<\/strong> the <strong>HTTP<\/strong> <strong>port<\/strong> to that server, switched off the SC440 for the first time in 8 months, popped it open, <strong>admired<\/strong> the <strong>forethought<\/strong> that&#8217;s gone into adding cards, inserted the two ethernet cards, closed it all up, switched it on.<\/p>\n<p><strong>Disaster<\/strong>! Elation at seeing <strong>eth0<\/strong>, <strong>eth1<\/strong> and <strong>eth2<\/strong> in the <strong>startup<\/strong> messages soon turns to <strong>panic<\/strong> when the link lights won&#8217;t light on inserting the cable from the router. One of the sockets has lights, so that one gets <strong>hastily<\/strong> <strong>configured<\/strong> as the port incoming HTTP traffic is usually routed to, just to get the websites back <strong>online<\/strong>. A quick look at the output from <strong>ifconfig<\/strong> tells me that eth0, eth1 and eth2 are now eth2, eth1 and <em><strong>eth2_rena<\/strong><\/em>.<\/p>\n<p><a title=\"Broadcom Ethernet NIC support\" href=\"http:\/\/www.broadcom.com\/support\/ethernet_nic\/\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" style=\"float: right; margin-left: 8px; margin-right: 8px;\" src=\"http:\/\/www.broadcom.com\/images\/logo_broadcom.gif\" alt=\"Broadcom\" width=\"156\" height=\"76\" \/><\/a>I searched for help on &#8216;eth2_rena&#8217;, and found the very handy &#8216;<strong>ip link<\/strong>&#8216; command &#8211; ifconfig was <strong>truncating<\/strong> the device name to 9 characters and the name of the device was &#8216;<strong>eth2_rename<\/strong>&#8216;. I imagine the ports are <strong>enumerated<\/strong> first by the driver <strong>module<\/strong> as it loads &#8211; my cards (and the <strong>embedded<\/strong> <strong>adapter<\/strong>) are all <strong>Broadcom<\/strong> <strong>NetXtreme<\/strong> Gigabit Ethernet, so rely on the <strong>tg3<\/strong> <strong>kernel<\/strong> module. Later in the boot sequence, <strong>udev<\/strong> works its magic on the adapters and <strong>renames<\/strong> them according to rules in (on my setup)<\/p>\n<p><code>\/etc\/udev\/rules.d\/75-network-devices.rules<\/code><\/p>\n<p>If I wasn&#8217;t still <strong>reeling<\/strong> from the unexpected problem, I&#8217;d have a go at <strong>removing<\/strong> the network card naming rules altogether (though leaving the file in place &#8211; there&#8217;s a comment that says it&#8217;ll be <strong>regenerated<\/strong> if the file is <strong>deleted<\/strong>). Since all my cards are the <strong>same<\/strong>, I could just put up with the order the module picks when it loads. For some reason, the naming rules <strong>attempted<\/strong> to rename some of the cards, based on <strong>MAC address<\/strong>, but I&#8217;m <strong>guessing<\/strong> the &#8216;eth2_rename&#8217; is the result of naming eth0 to eth2 when the name eth2 is <strong>assigned<\/strong> to another card. My <strong>hastily concocted solution<\/strong> was to give them all new names:<br \/>\n<code><br \/>\nKERNEL==\"eth?\", ATTR{address}==\"00:1d:09:ff:ff:ff\", NAME=\"eth_bc0\"<br \/>\nKERNEL==\"eth?\", ATTR{address}==\"00:10:18:ff:ff:fe\", NAME=\"eth_bc1\"<br \/>\nKERNEL==\"eth?\", ATTR{address}==\"00:10:18:ff:ff:fd\", NAME=\"eth_bc2\"<\/code><\/p>\n<p>I had to edit <strong>\/etc\/rc.d\/rc.inet1.conf<\/strong> to update the network card names there, and <strong>\/etc\/rc.d\/rc.inet1<\/strong> for a <strong>regular expression<\/strong> for setting up the cards, but once this was done, it all <strong>worked like a charm<\/strong>. My <strong>preconceived<\/strong> (and <strong>ultimately silly<\/strong>, I realise) notion that my cards should be numbered 0, 1, 2 from the top is <strong>satisfied<\/strong> too!<\/p>\n<p>I hope that&#8217;s <strong>useful<\/strong> to someone, if only to increase the number of results you get from a search when your &#8216;<strong>only take a second<\/strong>&#8216; job suddenly becomes <strong>indefinite<\/strong>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the sort of problem I expect that only happens to people who muck about with already working kit. Another evening spent regretting ever shutting down a running system &#8216;for just a few minutes while I add some hardware&#8217;. I run a few websites on a Dell PowerEdge SC440 tower server. I must write [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,20,31],"tags":[110,34,18,22],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-broken","category-fixed","category-hardware","tag-hardware","tag-network","tag-server","tag-slackware"],"_links":{"self":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":1,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/posts\/47\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lolyco.com\/sean\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}