<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4554570650221083776</id><updated>2012-02-16T12:02:55.846-08:00</updated><category term='linux'/><category term='partitions'/><category term='hba'/><category term='solaris'/><title type='text'>Delving Unix</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://delvingunix.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4554570650221083776/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://delvingunix.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shay</name><uri>http://www.blogger.com/profile/07708278241773586873</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4554570650221083776.post-614722484693351710</id><published>2009-11-17T15:20:00.000-08:00</published><updated>2009-11-17T15:56:06.055-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='hba'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>HBAs on Solaris/ Linux</title><content type='html'>In case of servers connected to Fiber Channel Storage, sometimes you are required to provide informations about the &lt;a href="http://en.wikipedia.org/wiki/Host_adapter"&gt;Host Bus Adapters&lt;/a&gt; like WWN. There are two types of WWNs on a HBA; a node WWN (WWNN), which is shared by all ports on a host bus adapter, and a port WWN (WWPN), which is unique to each port.&lt;br /&gt;&lt;br /&gt;On &lt;span style="font-weight: bold;"&gt;Solaris&lt;/span&gt;, you can use &lt;a href="http://manpages.unixforum.co.uk/man-pages/unix/solaris-10-11_06/1M/fcinfo-man-page.html"&gt;fcinfo&lt;/a&gt;.&lt;br /&gt;&lt;blockquote&gt;root@testhost ~$ fcinfo hba-port&lt;br /&gt;HBA Port WWN: 10000000c9722f6a&lt;br /&gt;      OS Device Name: /dev/cfg/c5&lt;br /&gt;      Manufacturer: Emulex&lt;br /&gt;      Model: LPe11002-S&lt;br /&gt;      Firmware Version: 2.80a4 (Z3F2.80A4)&lt;br /&gt;      FCode/BIOS Version: 1.50a9&lt;br /&gt;      Serial Number: 0999BG0-07510003DZ&lt;br /&gt;      Driver Name: emlxs&lt;br /&gt;      Driver Version: 2.31o (2008.10.20.14.00)&lt;br /&gt;      Type: unknown&lt;br /&gt;      State: offline&lt;br /&gt;      Supported Speeds: 1Gb 2Gb 4Gb&lt;br /&gt;      Current Speed: not established&lt;br /&gt;      Node WWN: 20000000c9722f6a&lt;br /&gt;HBA Port WWN: 10000000c9722f69&lt;br /&gt;      OS Device Name: /dev/cfg/c3&lt;br /&gt;      Manufacturer: Emulex&lt;br /&gt;      Model: LPe11002-S&lt;br /&gt;      Firmware Version: 2.80a4 (Z3F2.80A4)&lt;br /&gt;      FCode/BIOS Version: 1.50a9&lt;br /&gt;      Serial Number: 0999BG0-07510003DZ&lt;br /&gt;      Driver Name: emlxs&lt;br /&gt;      Driver Version: 2.31o (2008.10.20.14.00)&lt;br /&gt;      Type: N-port&lt;br /&gt;      State: online&lt;br /&gt;      Supported Speeds: 1Gb 2Gb 4Gb&lt;br /&gt;      Current Speed: 4Gb&lt;br /&gt;      Node WWN: 20000000c9722f69&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;So there you have it, all needed informations. As you can see one is online and one is offline. The offline can mean that it has been unconfigured trough &lt;a href="http://prefetch.net/blog/index.php/2005/05/02/replacing-failed-disk-devices-with-the-solaris-volume-manager/"&gt;cfgadm&lt;/a&gt; or there is no link. See cfgadm link on how to unconfigure and configure a disk.&lt;br /&gt;&lt;br /&gt;You can also do prtconf -vp or prtpicl -v and search for the need information by looking for wwn.&lt;br /&gt;&lt;br /&gt;On &lt;span style="font-weight: bold;"&gt;Linux&lt;/span&gt; you can just use &lt;a href="http://linux.die.net/man/1/systool"&gt;systool&lt;/a&gt;. As you can see below, Linux stores alot of useful information in /sys/class/ that can all be viewed with systool -av -c [class]&lt;br /&gt;&lt;blockquote&gt;root@testhost# systool -av -c fc_host&lt;br /&gt;Class = "fc_host"&lt;br /&gt;&lt;br /&gt;Class Device = "host3"&lt;br /&gt;Class Device path = "/sys/class/fc_host/host3"&lt;br /&gt;  active_fc4s         = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "&lt;br /&gt;  fabric_name         = "0x1000080088a04a7f"&lt;br /&gt;  issue_lip           = &lt;store&gt;&lt;br /&gt;  maxframe_size       = "2048 bytes"&lt;br /&gt;  node_name           = "0x20000000c9775d9c"&lt;br /&gt;  port_id             = "0x651813"&lt;br /&gt;  port_name           = "0x10000000c9775d9c"&lt;br /&gt;  port_state          = "Online"&lt;br /&gt;  port_type           = "NPort (fabric via point-to-point)"&lt;br /&gt;  speed               = "2 Gbit"&lt;br /&gt;  supported_classes   = "Class 3"&lt;br /&gt;  supported_fc4s      = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "&lt;br /&gt;  supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit"&lt;br /&gt;  tgtid_bind_type     = "wwpn (World Wide Port Name)"&lt;br /&gt;  uevent              = &lt;store&gt;&lt;br /&gt;&lt;br /&gt;  Device = "host3"&lt;br /&gt;  Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/host3"&lt;br /&gt;    uevent              = store method only&lt;/store&gt;&lt;/store&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4554570650221083776-614722484693351710?l=delvingunix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://delvingunix.blogspot.com/feeds/614722484693351710/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://delvingunix.blogspot.com/2009/11/hbas-on-solaris-linux.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4554570650221083776/posts/default/614722484693351710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4554570650221083776/posts/default/614722484693351710'/><link rel='alternate' type='text/html' href='http://delvingunix.blogspot.com/2009/11/hbas-on-solaris-linux.html' title='HBAs on Solaris/ Linux'/><author><name>Shay</name><uri>http://www.blogger.com/profile/07708278241773586873</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4554570650221083776.post-623607055752353884</id><published>2009-11-13T09:13:00.000-08:00</published><updated>2009-11-13T11:53:52.115-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='partitions'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Soft Partitions</title><content type='html'>As you might know, in Solaris trough the usual method of formatting your drives/storage you can only make 8 slices ( usually 2 represents the whole disk).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_UvYsComvLlg/Sv2VWzI-34I/AAAAAAAAAAU/7Swv2zf36PY/s1600-h/1.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 128px;" src="http://1.bp.blogspot.com/_UvYsComvLlg/Sv2VWzI-34I/AAAAAAAAAAU/7Swv2zf36PY/s400/1.JPG" alt="" id="BLOGGER_PHOTO_ID_5403639346832007042" border="0" /&gt;&lt;/a&gt;The problem comes when you don't actually know how many partitions you will need in the future.  This is where Soft Partitions come in.&lt;br /&gt;&lt;br /&gt;Using &lt;a href="http://docs.sun.com/app/docs/doc/816-0211/6m6nc66vo?a=view"&gt;metain&lt;/a&gt;&lt;a href="http://docs.sun.com/app/docs/doc/816-0211/6m6nc66vo?a=view"&gt;it&lt;/a&gt; you can have up to 8192 Soft Partitions,but by default  you can have d0-d127. To have more you would have to change the Solaris Volume Manager( SVM) configurations. More details &lt;a href="http://docs.sun.com/app/docs/doc/817-2530/6mi6gg8c5?a=view"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There are 2 ways to create Soft Partitions:&lt;br /&gt;1.&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;#metainit &lt;metadevice_name&gt;metadevice_name -e c#t#d#s# size&lt;/metadevice_name&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;font-family:times new roman;font-size:100%;"  &gt;&lt;metadevice_name&gt;&lt;c&gt; &lt;/c&gt;&lt;/metadevice_name&gt;&lt;/span&gt;&lt;/blockquote&gt;With this you can assign a metadevice to a portion of the maximum storage a slice has. So a good idea is to create with format a single mountable ( wm flags ) slice that stores all the storage and then allocate it to different metadevices as needed. Let's say you have 10GB of space and you want 3 partitions each of 3GB and 1GB leftover. Simple:&lt;br /&gt;ex:&lt;br /&gt;&lt;blockquote  style="font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;#metainit d30 -p c1t0d0s0 3G&lt;br /&gt;#metainit d31 -p c1t0d0s0 3G&lt;br /&gt;#metainit d32 -p c1t0d0s0 3G&lt;/span&gt;&lt;/blockquote&gt;You can check it all afterwards with metastat. Downside is it doesn't tell you how much storage you have used out of your total storage. When you will run out of storage, it will just say:&lt;br /&gt;&lt;blockquote  style="font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;metainit: testhost: d39: not enough space available for request&lt;/span&gt;&lt;/blockquote&gt;You can grow your soft partitions size later as explained below. Don't forget to newfs the partitions and mount and add them to /etc/vfstab&lt;br /&gt;&lt;br /&gt;&lt;p&gt;2.&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;#metainit &lt;metadevice_name&gt;metadevice_name -p -e c#t#d# size&lt;/metadevice_name&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;With the -e option you assign the whole disk device to one Soft Partition. Let's say you have /dev/dsk/c0t0d0 with 10GB of space, but initially you only want to use 2GB of space&lt;br /&gt;ex:&lt;blockquote  style="font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;#metainit d3 -p -e /dev/d&lt;/span&gt;&lt;span style="font-size:100%;"&gt;sk/c0t0d0 2G&lt;/span&gt;&lt;/blockquote&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_UvYsComvLlg/Sv248dZ6ivI/AAAAAAAAAAc/q0eFdIPbyng/s1600-h/1.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 128px;" src="http://3.bp.blogspot.com/_UvYsComvLlg/Sv248dZ6ivI/AAAAAAAAAAc/q0eFdIPbyng/s400/1.JPG" alt="" id="BLOGGER_PHOTO_ID_5403678476739447538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This will create 2 slices on the disk: one with almost all the storage and another that one with at least 4MB of data containing a "state database replica"&lt;br /&gt;&lt;br /&gt;Later on you can expand this soft partition using&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:100%;"&gt;#mount /dev/md/dsk/d3 /data&lt;br /&gt;#metattach d3 8g&lt;br /&gt;#growfs -M /data /dev/md/rdsk/d3&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4554570650221083776-623607055752353884?l=delvingunix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://delvingunix.blogspot.com/feeds/623607055752353884/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://delvingunix.blogspot.com/2009/11/soft-partitions.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4554570650221083776/posts/default/623607055752353884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4554570650221083776/posts/default/623607055752353884'/><link rel='alternate' type='text/html' href='http://delvingunix.blogspot.com/2009/11/soft-partitions.html' title='Soft Partitions'/><author><name>Shay</name><uri>http://www.blogger.com/profile/07708278241773586873</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_UvYsComvLlg/Sv2VWzI-34I/AAAAAAAAAAU/7Swv2zf36PY/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
