<?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-5037711197124915796</id><updated>2011-11-27T15:21:56.619-08:00</updated><title type='text'>My Job As Sys Admin</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5037711197124915796.post-6964298153393139740</id><published>2010-10-21T05:38:00.000-07:00</published><updated>2010-10-21T05:43:26.144-07:00</updated><title type='text'>Growing a RAID5 array – MDADM</title><content type='html'>In this example, I've created a RAID-5(/dev/sdc1,sdd1,sde1) array with LVM&lt;br /&gt;&lt;br /&gt;fdisk /dev/sdc&lt;br /&gt;fdisk /dev/sdd&lt;br /&gt;fdisk /dev/sde - create 5G partition with fd (raid)&lt;br /&gt;partprobe /dev/sd[c,d,e]&lt;br /&gt;mdadm --create --verbose /dev/md1 --level=5 --raid-devices=3 /dev/sdc1 /dev/sdd1 /dev/sde1&lt;br /&gt;cat /proc/mdstat&lt;br /&gt;pvcreate /dev/md1&lt;br /&gt;pvdisplay&lt;br /&gt;vgcreate vg00 /dev/md1&lt;br /&gt;vgdisplay&lt;br /&gt;lvcreate -L 2000M -n data1_raid5 /dev/vg00&lt;br /&gt;lvdisplay&lt;br /&gt;mkdir /data1_raid5&lt;br /&gt;mke2fs /dev/vg00/data1_raid5&lt;br /&gt;tune2fs -j /dev/vg00/data1_raid5&lt;br /&gt;mount -t ext3 /dev/vg00/data_raid5 /data1_raid5/&lt;br /&gt;dd if=/dev/zero of=bigfile bs=1024M count=1&lt;br /&gt;lvextend +8G /dev/vg00/data1_raid5&lt;br /&gt;lvdisplay&lt;br /&gt;resize2fs /dev/vg00/data1_raid5&lt;br /&gt;df -h&lt;br /&gt;&lt;br /&gt;Growing a RAID5 array – MDADM&lt;br /&gt;&lt;br /&gt;With the release of kernel 2.6.17, there’s new functionality to add a device (partition) to a RAID 5 array and make this new device part of the actual array rather than a spare.&lt;br /&gt;&lt;br /&gt;creating a new RAID partition /dev/sdf1&lt;br /&gt;&lt;br /&gt;mdadm --manage /dev/md1 --add /dev/sdf1&lt;br /&gt;mdadm --detail /dev/md1&lt;br /&gt;mdadm --grow /dev/md1 --raid-devices=4&lt;br /&gt;cat /proc/mdstat&lt;br /&gt;&lt;br /&gt;(reshaping is taking in place...)&lt;br /&gt;cat /proc/mdstat&lt;br /&gt;pvdisplay&lt;br /&gt;pvresize /dev/md1&lt;br /&gt;pvdisplay &lt;br /&gt;vgdisplay&lt;br /&gt;now the newly added partition will be the part of RAID5 array and available for extend.&lt;br /&gt;lvextend -L +3G /dev/vg00/data1_raid5&lt;br /&gt;&lt;br /&gt;that extended LV few more gigs,,,&lt;br /&gt;&lt;br /&gt;that'sall&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-6964298153393139740?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/6964298153393139740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2010/10/growing-raid5-array-mdadm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6964298153393139740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6964298153393139740'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2010/10/growing-raid5-array-mdadm.html' title='Growing a RAID5 array – MDADM'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-3390464901076157114</id><published>2010-10-17T00:50:00.000-07:00</published><updated>2010-10-20T04:26:35.755-07:00</updated><title type='text'>mdadm: A Tool For Linux Software RAID Management</title><content type='html'>Raidtools has been the standard software RAID management package for Linux since the inception of the software RAID driver. Over the years, raidtools have proven cumbersome to use, mostly because they rely on a configuration file (/etc/raidtab) that is difficult to maintain, and partly because its features are limited. In August 2001, Neil Brown, a software engineer at the University of New South Wales and a kernel developer, released an alternative. His mdadm  (multiple devices admin) package provides a simple, yet robust way to manage software arrays.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mdadm has five major modes of operation. The first two modes, Create and Assemble, are used to configure and activate arrays. Manage mode is used to manipulate devices in an active array. Follow or Monitor mode allows administrators to configure event notification and actions for arrays. Build mode is used when working with legacy arrays that use an old version of the md driver. I will not cover build mode in this article. The remaining options are used for various housekeeping tasks and are not attached to a specific mode of operation, although the mdadm documentation calls these options Misc mode. mdadm by default comes with the newer versions of Red hat Linux. Alternately, you can download one from,&lt;br /&gt;&lt;br /&gt;ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/&lt;br /&gt;&lt;br /&gt;Creating an Array:&lt;br /&gt;&lt;br /&gt;Create (mdadm --create) mode is used to create a new array. In this example I use mdadm to create a RAID-0 at /dev/md0 made up of /dev/sdb1 and /dev/sdc1&lt;br /&gt;&lt;br /&gt;#mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sdb1 /dev/sdbc1&lt;br /&gt;&lt;br /&gt;The --level option specifies which type of RAID to create. Valid choices are 0,1,4 and 5 for RAID-0, RAID-1, RAID-4, RAID-5 respectively. Linear (--level=linear) is also a valid choice for linear mode.&lt;br /&gt;&lt;br /&gt;In general, mdadm commands take the format:&lt;br /&gt;&lt;br /&gt;mdadm [mode] &lt;raiddevice&gt; [options] &lt;component disks&gt;&lt;br /&gt;&lt;br /&gt;Each of mdadm's options also has a short form that is less descriptive but shorter to type. For example, the following command uses the short form of each option but is identical to the example I showed above,&lt;br /&gt;&lt;br /&gt;#mdadm -Cv /dev/md0 -l0 -n2 -c128 /dev/sdb1 /dev/sdc1&lt;br /&gt;&lt;br /&gt;C selects Create mode, and I have also included the -v option here to turn on verbose output. -l and -n specify the RAID level and number of member disks.You can change the default chunk size (64KB) using the --chunk or -c option. In this previous example I changed the chunk size to 128KB. mdadm also supports shell expansions, so you don't have to type in the device name for every component disk if you are creating a large array. In this example, I'll create a RAID-5 with five member disks and a chunk size of 128KB:&lt;br /&gt;&lt;br /&gt;#mdadm -Cv /dev/md0 -l5 -n5 -c128 /dev/sd{a,b,c,d,e}1&lt;br /&gt;mdadm: layout defaults to left-symmetric&lt;br /&gt;mdadm: array /dev/md0 started.&lt;br /&gt;&lt;br /&gt;This example creates an array at /dev/md0 using SCSI disk partitions /dev/sda1, /dev/sdb1, /dev/sdc1, /dev/sdd1, and /dev/sde1. Notice that I have also set the chunk size to 128 KB using the -c128 option. When creating a RAID-5, mdadm will automatically choose the left-symmetric parity algorithm, which is the best choice&lt;br /&gt;&lt;br /&gt;Use the --stop or -S command to stop running array:&lt;br /&gt;#mdadm -S /dev/md0&lt;br /&gt;&lt;br /&gt;/etc/mdadm.conf:&lt;br /&gt;&lt;br /&gt;/etc/mdadm.conf is mdadms' primary configuration file. Unlike /etc/raidtab, mdadm does not rely on /etc/mdadm.conf to create or manage arrays. Rather, mdadm.conf is simply an extra way of keeping track of software RAIDs. Using a configuration file with mdadm is useful, but not required. Having one means you can quickly manage arrays without spending extra time figuring out what array properties are and where disks belong. For example, if an array wasn't running and there was no mdadm.conf file describing it, then the system administrator would need to spend time examining individual disks to determine array properties and member disks.&lt;br /&gt;&lt;br /&gt;Unlike the configuration file for raidtools, mdadm.conf is concise and simply lists disks and arrays. The configuration file can contain two types of lines each starting with either the DEVICE or ARRAY keyword. Whitespace separates the keyword from the configuration information. DEVICE lines specify a list of devices that are potential member disks. ARRAY lines specify device entries for arrays as well as identifier information. This information can include lists of one or more UUIDs, md device minor numbers, or a listing of member devices.&lt;br /&gt;&lt;br /&gt;A simple mdadm.conf file might look like this:&lt;br /&gt;&lt;br /&gt;DEVICE  /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1&lt;br /&gt;ARRAY  /dev/md0 devices=/dev/sda1,/dev/sdb1&lt;br /&gt;ARRAY  /dev/md1 devices=/dev/sdc1,/dev/sdd1&lt;br /&gt;&lt;br /&gt;In general, it's best to create an /etc/mdadm.conf file after you have created an array and update the file when new arrays are created. Without an /etc/mdadm.conf file you'd need to specify more detailed information about an array on the command in order to activate it.That means you'd have to remember which devices belonged to which arrays, and that could easily become a hassle on systems with a lot of disks. mdadm even provides an easy way to generate ARRAY lines. The output is a single long line, but I have broken it here to fit the page:&lt;br /&gt;&lt;br /&gt;# mdadm --detail --scan&lt;br /&gt;ARRAY /dev/md0 level=raid0 num-devices=2   \&lt;br /&gt;    UUID=410a299e:4cdd535e:169d3df4:48b7144a&lt;br /&gt;&lt;br /&gt;If there were multiple arrays running on the system, then mdadm would generate an array line for each one. So after you're done building arrays you could redirect the output of mdadm --detail --scan to /etc/mdadm.conf. Just make sure that you manually create a DEVICE entry as well. Using the example I've provided above we might have an /etc/mdadm.conf that looks like:&lt;br /&gt;&lt;br /&gt;DEVICE /dev/sdb1 /dev/sdc1&lt;br /&gt;ARRAY  /dev/md0 level=raid0 num-devices=2 \                 &lt;br /&gt; UUID=410a299e:4cdd535e:169d3df4:48b7144a&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Starting an Array:&lt;br /&gt;&lt;br /&gt;Assemble mode is used to start an array that already exists. If you created an /etc/mdadm.conf you can automatically start an array listed there with the following command:&lt;br /&gt;&lt;br /&gt;#mdadm -As /dev/md0&lt;br /&gt;mdadm: /dev/md0 has been started with 2 drives&lt;br /&gt;&lt;br /&gt;The -A option denotes assemble mode. You can also use --assemble. The -s or --scan option tells mdadm to look in /etc/mdadm.conf for information about arrays and devices. If you want to start every array listed in /etc/mdadm.conf, don't specify an md device on the command line&lt;br /&gt;&lt;br /&gt;#mdadm -As&lt;br /&gt;&lt;br /&gt;If you didn't create an /etc/mdadm.conf file, you will need to specify additional information on the command line in order to start an array. For example, this command attempts to start /dev/md0 using the devices listed on the command line:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#mdadm -A /dev/md0 /dev/sdb1 /dev/sdc1&lt;br /&gt;&lt;br /&gt;Since using mdadm -A in this way assumes you have some prior knowledge about how arrays are arranged, it might not be useful on systems that have arrays that were created by someone else. So you may wish to examine some devices to gain a better picture about how arrays should be assembled. The examine options (-E or --examine) allows you to print the md superblock (if present) from a block device that could be an array component.&lt;br /&gt;&lt;br /&gt;#mdadm -E /dev/sdc1&lt;br /&gt;/dev/sdc1:&lt;br /&gt;          Magic : a92b4efc&lt;br /&gt;        Version : 00.90.00&lt;br /&gt;           UUID : 84788b68:1bb79088:9a73ebcc:2ab430da&lt;br /&gt;  Creation Time : Mon Sep 23 16:02:33&lt;br /&gt;     Raid Level : raid0&lt;br /&gt;    Device Size : 17920384 (17.09 GiB 18.40 GB)&lt;br /&gt;   Raid Devices : 4&lt;br /&gt;  Total Devices : 4&lt;br /&gt;Preferred Minor : 0&lt;br /&gt;&lt;br /&gt;    Update Time : Mon Sep 23 16:14:52 2002&lt;br /&gt;          State : clean, no-errors&lt;br /&gt; Active Devices : 4&lt;br /&gt;Working Devices : 4&lt;br /&gt; Failed Devices : 0&lt;br /&gt;  Spare Devices : 0&lt;br /&gt;       Checksum : 8ab5e437 - correct&lt;br /&gt;         Events : 0.10&lt;br /&gt;&lt;br /&gt;     Chunk Size : 128K&lt;br /&gt;&lt;br /&gt;      Number   Major   Minor   RaidDevice State&lt;br /&gt;this     1       8       33        1      active sync   /dev/sdc1&lt;br /&gt;   0     0       8       17        0      active sync   /dev/sdb1&lt;br /&gt;   1     1       8       33        1      active sync   /dev/sdc1&lt;br /&gt;   2     2       8       49        2      active sync   /dev/sdd1&lt;br /&gt;   3     3       8       65        3      active sync   /dev/sde1&lt;br /&gt;&lt;br /&gt;mdadm's examine option displays quite a bit of useful information about component disks. In this case we can tell that /dev/sdc1 belongs to a RAID-0 made up of a total of four member disks. What I want to specifically point out is the line of output that contains the UUID. A UUID is a 128-bit number that is guaranteed to be reasonably unique on both the local system and across other systems. It is a randomly generated using system hardware and timestamps as part of its seed. UUIDs are commonly used by many programs to uniquely tag devices. See the uuidgen and libuuid manual pages for more information.&lt;br /&gt;&lt;br /&gt;When an array is created, the md driver generates a UUID for the array and stores it in the md superblock. You can use the UUID as criteria for array assembly. In the next example I am going to activate the array to which /dev/sdc1 belongs using its UUID&lt;br /&gt;&lt;br /&gt;#mdadm -Av /dev/md0 --uuid=84788b68:1bb79088:9a73ebcc:2ab430da /dev/sd*&lt;br /&gt;&lt;br /&gt;This command scans every SCSI disk (/dev/sd*) to see if it's a member of the array with the UUID 84788b68:1bb79088:9a73ebcc:2ab430da and then starts the array, assuming it found each component device. mdadm will produce a lot of output each time it tries to scan a device that does not exist. You can safely ignore such warnings.&lt;br /&gt;&lt;br /&gt;Managing Arrays&lt;br /&gt;Using Manage mode you can add and remove disks to a running array. This is useful for removing failed disks, adding spare disks, or adding replacement disks. Manage mode can also be used to mark a member disk as failed. &lt;br /&gt;&lt;br /&gt;For example, to add a disk to an active array,&lt;br /&gt;&lt;br /&gt;#mdadm /dev/md0 --add /dev/sdc1&lt;br /&gt;&lt;br /&gt;Or, to remove /dev/sdc1 from /dev/md0 try&lt;br /&gt;&lt;br /&gt;#mdadm /dev/md0 --fail /dev/sdc1 --remove /dev/sdc1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Notice that I first mark /dev/sdc1 as failed and then remove it. It's fine to combine add, fail, and remove options on a single command line as long as they make sense in terms of array management. So you have to fail a disk before removing it, for example.&lt;br /&gt;&lt;br /&gt;Monitoring Arrays:&lt;br /&gt;&lt;br /&gt;Follow, or Monitor, mode provides some of mdadm's best and most unique features. Using Follow/Monitor mode you can daemonize mdadm and configure it to send email alerts to system administrators when arrays encounter errors or fail. You can also use Follow mode to arbitrarily execute commands when a disk fails. For example, you might want to try removing and reinserting a failed disk in an attempt to correct a non-fatal failure without user intervention.&lt;br /&gt;&lt;br /&gt;The following command will monitor /dev/md0 (polling every 300 seconds) for critical events. When a fatal error occurs, mdadm will send an email to sysadmin. You can tailor the polling interval and email address to meet your needs.&lt;br /&gt;&lt;br /&gt;# mdadm --monitor --mail=sysadmin --delay=300 /dev/md0&lt;br /&gt;&lt;br /&gt;When using monitor mode, mdadm will not exit, so you might want to wrap it around nohup and ampersand:&lt;br /&gt;&lt;br /&gt;# nohup mdadm --monitor --mail=sysadmin --delay=300 /dev/md0 &amp;&lt;br /&gt;&lt;br /&gt;Follow/Monitor mode also allows arrays to share spare disks, a feature that has been lacking in Linux software RAID since its inception. That means you only need to provide one spare disk for a group of arrays or for all arrays. It also means that system administrators don't have to manually intervene to shuffle around spare disks when arrays fail. Previously this functionality was available only using hardware RAID. When Follow/Monitor mode is invoked, it polls arrays at regular intervals. When a disk failure is detected on an array without a spare disk, mdadm will remove an available spare disk from another array and insert it into the array with the failed disk. To facilitate this process, each ARRAY line in /etc/mdadm.conf needs to have a spare-group defined.&lt;br /&gt;&lt;br /&gt;DEVICE /dev/sd*&lt;br /&gt;ARRAY  /dev/md0 level=raid1 num-devices=3 spare-group=database \&lt;br /&gt;   UUID=410a299e:4cdd535e:169d3df4:48b7144a&lt;br /&gt;ARRAY /dev/md1 level=raid1 num-device=2 spare-group=database \&lt;br /&gt;   UUID=59b6e564:739d4d28:ae0aa308:71147fe7&lt;br /&gt;&lt;br /&gt;In this example, both /dev/md0 and /dev/md1 are part of the spare group database. Just assume that /dev/md0 is a two-disk RAID-1 with a single spare disk. If mdadm is running in monitor mode (as I showed earlier), and a disk in /dev/md1 fails, mdadm will remove the spare disk from /dev/md0 and insert it into /dev/md1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the actual testing I did:&lt;br /&gt;================================&lt;br /&gt;&lt;br /&gt;Created a raid 1 array with two devices (/dev/sda8, /dev/sdb1) of 10GB each.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm ~]# fdisk /dev/sda&lt;br /&gt;&lt;br /&gt;The number of cylinders for this disk is set to 2610.&lt;br /&gt;There is nothing wrong with that, but this is larger than 1024,&lt;br /&gt;and could in certain setups cause problems with:&lt;br /&gt;1) software that runs at boot time (e.g., old versions of LILO)&lt;br /&gt;2) booting and partitioning software from other OSs&lt;br /&gt;   (e.g., DOS FDISK, OS/2 FDISK)&lt;br /&gt;&lt;br /&gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 21.4 GB, 21474836480 bytes&lt;br /&gt;255 heads, 63 sectors/track, 2610 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1   *           1          16      128488+  83  Linux&lt;br /&gt;/dev/sda2              17         408     3148740   83  Linux&lt;br /&gt;/dev/sda3             409         800     3148740   83  Linux&lt;br /&gt;/dev/sda4             801        2610    14538825    5  Extended&lt;br /&gt;/dev/sda5             801        1061     2096451   83  Linux&lt;br /&gt;/dev/sda6            1062        1192     1052226   83  Linux&lt;br /&gt;/dev/sda7            1193        1323     1052226   82  Linux swap / Solaris&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;/dev/sda8            1324        2540     9775521   fd  Linux raid autodetect&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm ~]# fdisk /dev/sdb&lt;br /&gt;&lt;br /&gt;The number of cylinders for this disk is set to 1435.&lt;br /&gt;There is nothing wrong with that, but this is larger than 1024,&lt;br /&gt;and could in certain setups cause problems with:&lt;br /&gt;1) software that runs at boot time (e.g., old versions of LILO)&lt;br /&gt;2) booting and partitioning software from other OSs&lt;br /&gt;   (e.g., DOS FDISK, OS/2 FDISK)&lt;br /&gt;&lt;br /&gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/sdb: 11.8 GB, 11811160064 bytes&lt;br /&gt;255 heads, 63 sectors/track, 1435 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;/dev/sdb1               1        1217     9775521   fd  Linux raid autodetect&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#partprobe /dev/sda&lt;br /&gt;#partprobe /dev/sdb&lt;br /&gt;&lt;br /&gt;Creating an arry,&lt;br /&gt;----------------&lt;br /&gt;&lt;br /&gt;#mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda8 /dev/sdb1&lt;br /&gt;&lt;br /&gt;This process will take some time to build an raid-1 and then execute to see the status,&lt;br /&gt; &lt;br /&gt;[root@lnx-rhel5-vm ~]# cat /proc/mdstat&lt;br /&gt;Personalities : [raid1]&lt;br /&gt;md0 : active raid1 sdb1[1] sda8[0]&lt;br /&gt;      9775424 blocks [2/2] [UU]&lt;br /&gt;&lt;br /&gt;unused devices: &lt;none&gt;&lt;br /&gt;&lt;br /&gt;Creating a File system,&lt;br /&gt;&lt;br /&gt;#mkfs.ext3 /dev/md0&lt;br /&gt;#mkdir /raid1&lt;br /&gt;&lt;br /&gt;Mounting,&lt;br /&gt;#mount -t ext3 /dev/md0 /raid1&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm ~]# df -h&lt;br /&gt;Filesystem            Size  Used Avail Use% Mounted on&lt;br /&gt;/dev/sda3             3.0G  273M  2.5G  10% /&lt;br /&gt;/dev/sda6             996M   73M  872M   8% /var&lt;br /&gt;/dev/sda5             2.0G   36M  1.9G   2% /home&lt;br /&gt;/dev/sda2             3.0G  2.0G  838M  71% /usr&lt;br /&gt;/dev/sda1             122M   12M  105M  10% /boot&lt;br /&gt;tmpfs                 252M     0  252M   0% /dev/shm&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;/dev/md0              9.2G  159M  8.6G   2% /raid1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm ~]#  mdadm --detail /dev/md0&lt;br /&gt;/dev/md0:&lt;br /&gt;        Version : 00.90.03&lt;br /&gt;  Creation Time : Wed Oct 20 02:02:46 2010&lt;br /&gt;     Raid Level : raid1&lt;br /&gt;     Array Size : 9775424 (9.32 GiB 10.01 GB)&lt;br /&gt;  Used Dev Size : 9775424 (9.32 GiB 10.01 GB)&lt;br /&gt;   Raid Devices : 2&lt;br /&gt;  Total Devices : 2&lt;br /&gt;Preferred Minor : 0&lt;br /&gt;    Persistence : Superblock is persistent&lt;br /&gt;&lt;br /&gt;    Update Time : Wed Oct 20 02:36:56 2010&lt;br /&gt;          State : clean&lt;br /&gt; Active Devices : 2&lt;br /&gt;Working Devices : 2&lt;br /&gt; Failed Devices : 0&lt;br /&gt;  Spare Devices : 0&lt;br /&gt;&lt;br /&gt;           UUID : c42a6efb:849197a4:4935bd46:a423f66f&lt;br /&gt;         Events : 0.40&lt;br /&gt;&lt;br /&gt;    Number   Major   Minor   RaidDevice State&lt;br /&gt;       0       8        8        0      active sync   /dev/sda8&lt;br /&gt;       1       8       17        1      active sync   /dev/sdb1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, we can copy some data into /raid1 and then fail the one of the device (/dev/sdb1) in array to see if it works,&lt;br /&gt;&lt;br /&gt;Failing a disk or partition on array,&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm raid1]# mdadm --manage /dev/md0 --fail /dev/sda8&lt;br /&gt;mdadm: set /dev/sda8 faulty in /dev/md0&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm raid1]# cat /proc/mdstat&lt;br /&gt;Personalities : [raid1]&lt;br /&gt;md0 : active raid1 sdb1[1] sda8[2](F)&lt;br /&gt;      9775424 blocks [2/1] [_U]&lt;br /&gt;&lt;br /&gt;unused devices: &lt;none&gt;&lt;br /&gt;&lt;br /&gt;Above [_U] means, one of the disk is in failed state.&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm raid1]# mdadm --detail /dev/md0&lt;br /&gt;/dev/md0:&lt;br /&gt;        Version : 00.90.03&lt;br /&gt;  Creation Time : Wed Oct 20 02:02:46 2010&lt;br /&gt;     Raid Level : raid1&lt;br /&gt;     Array Size : 9775424 (9.32 GiB 10.01 GB)&lt;br /&gt;  Used Dev Size : 9775424 (9.32 GiB 10.01 GB)&lt;br /&gt;   Raid Devices : 2&lt;br /&gt;  Total Devices : 2&lt;br /&gt;Preferred Minor : 0&lt;br /&gt;    Persistence : Superblock is persistent&lt;br /&gt;&lt;br /&gt;    Update Time : Wed Oct 20 02:40:03 2010&lt;br /&gt;          State : clean, degraded&lt;br /&gt; Active Devices : 1&lt;br /&gt;Working Devices : 1&lt;br /&gt;&lt;span style="font-weight:bold;"&gt; Failed Devices : 1&lt;/span&gt;&lt;br /&gt;  Spare Devices : 0&lt;br /&gt;&lt;br /&gt;           UUID : c42a6efb:849197a4:4935bd46:a423f66f&lt;br /&gt;         Events : 0.42&lt;br /&gt;&lt;br /&gt;    Number   Major   Minor   RaidDevice State&lt;br /&gt;       0       0        0        0      removed&lt;br /&gt;       1       8       17        1      active sync   /dev/sdb1&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;     2       8        8        -      faulty spare   /dev/sda8&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You could also see the disk failure messages in /var/log/messages:&lt;br /&gt;&lt;br /&gt;#tail /var/log/messages&lt;br /&gt;&lt;br /&gt;Oct 20 02:39:43 lnx-rhel5-vm kernel: md: cannot remove active disk sda8 from md0 ...&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel: raid1: Disk failure on sda8, disabling device.&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel:    Operation continuing on 1 devices&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel: RAID1 conf printout:&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel:  --- wd:1 rd:2&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel:  disk 0, wo:1, o:0, dev:sda8&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel:  disk 1, wo:0, o:1, dev:sdb1&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel: RAID1 conf printout:&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel:  --- wd:1 rd:2&lt;br /&gt;Oct 20 02:40:03 lnx-rhel5-vm kernel:  disk 1, wo:0, o:1, dev:sdb1&lt;br /&gt;&lt;br /&gt;Now, we are going to remove the failed disk from the array,&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm raid1]# mdadm --manage /dev/md0 --remove /dev/sda8&lt;br /&gt;mdadm: hot removed /dev/sda8&lt;br /&gt;[root@lnx-rhel5-vm raid1]# cat /proc/mdstat&lt;br /&gt;Personalities : [raid1]&lt;br /&gt;md0 : active raid1 sdb1[1]&lt;br /&gt;      9775424 blocks [2/1] [_U]&lt;br /&gt;&lt;br /&gt;unused devices: &lt;none&gt;&lt;br /&gt;&lt;br /&gt;Check the status after removal,&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm raid1]# mdadm --detail /dev/md0&lt;br /&gt;/dev/md0:&lt;br /&gt;        Version : 00.90.03&lt;br /&gt;  Creation Time : Wed Oct 20 02:02:46 2010&lt;br /&gt;     Raid Level : raid1&lt;br /&gt;     Array Size : 9775424 (9.32 GiB 10.01 GB)&lt;br /&gt;  Used Dev Size : 9775424 (9.32 GiB 10.01 GB)&lt;br /&gt;   Raid Devices : 2&lt;br /&gt;  Total Devices : 1&lt;br /&gt;Preferred Minor : 0&lt;br /&gt;    Persistence : Superblock is persistent&lt;br /&gt;&lt;br /&gt;    Update Time : Wed Oct 20 02:41:20 2010&lt;br /&gt;          State : clean, degraded&lt;br /&gt; Active Devices : 1&lt;br /&gt;Working Devices : 1&lt;br /&gt; Failed Devices : 0&lt;br /&gt;  Spare Devices : 0&lt;br /&gt;&lt;br /&gt;           UUID : c42a6efb:849197a4:4935bd46:a423f66f&lt;br /&gt;         Events : 0.44&lt;br /&gt;&lt;br /&gt;    Number   Major   Minor   RaidDevice State&lt;br /&gt;       0       0        0        0      removed&lt;br /&gt;       1       8       17        1      active sync   /dev/sdb1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can just shutdown the server and pull the failed disk and replaced with the brand new disk of same size. Once the server back online, issue the following command to add new disk under raid array,&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm raid1]# mdadm --manage /dev/md0 --add /dev/sda8&lt;br /&gt;mdadm: re-added /dev/sda8&lt;br /&gt;&lt;br /&gt;[root@lnx-rhel5-vm raid1]# cat /proc/mdstat&lt;br /&gt;Personalities : [raid1]&lt;br /&gt;md0 : active raid1 sda8[0] sdb1[1]&lt;br /&gt;      9775424 blocks [2/1] [_U]&lt;br /&gt;      [&gt;....................]  recovery =  1.0% (98752/9775424) finish=6.5min speed=24688K/sec&lt;br /&gt;&lt;br /&gt;unused devices: &lt;none&gt;&lt;br /&gt;&lt;br /&gt;As you can see above, the reconstruction of array has started working after adding a new one.&lt;br /&gt;&lt;br /&gt;References,&lt;br /&gt;http://www.gagme.com/greg/linux/raid-lvm.php&lt;br /&gt;http://scotgate.org/2006/07/03/growing-a-raid5-array-mdadm/&lt;br /&gt;http://lkml.org/lkml/2006/3/20/105&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-3390464901076157114?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/3390464901076157114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2010/10/mdadm-new-tool-for-linux-software-raid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3390464901076157114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3390464901076157114'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2010/10/mdadm-new-tool-for-linux-software-raid.html' title='mdadm: A Tool For Linux Software RAID Management'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-6385465129209721350</id><published>2010-10-02T03:46:00.000-07:00</published><updated>2010-10-02T04:05:25.417-07:00</updated><title type='text'>How to connect VM's from a host OS</title><content type='html'>This procedure was tested on VMware workstation 6.0 under Windows 7 (Dell Latitude laptop). &lt;br /&gt;&lt;br /&gt;1. Install VMware workstation on Window 7.&lt;br /&gt;2. Set up a Bridged Network and create a VM or two VM's of Red Hat Linux 5.2&lt;br /&gt;&lt;br /&gt;These VMs having the IP addresses of,&lt;br /&gt;1st VM - 192.168.0.1&lt;br /&gt;2nd VM - 192.168.0.2&lt;br /&gt;&lt;br /&gt;Once they have installed and configured, you can connect both the VM through their Linux terminal konsole. So you can ping and SSH them vice versa.&lt;br /&gt;&lt;br /&gt;3. Now, you would like to connect these VM's from a host machine (windows 7) through a software called PuTTY. In order to do so, you would need to set up a Windows Loop back Adapter and configure the IP address as 192.168.0.3 ( of a same VM's sub net).&lt;br /&gt;&lt;br /&gt;To install a  Microsoft Loopback adapter in WIndows 7,&lt;br /&gt;&lt;br /&gt;1. Click Start – Search for cmd, right-click cmd and select “Run as Administrator”&lt;br /&gt;2. From the command prompt, run “hdwwiz.exe“. This should launch the “Add Hardware Wizard“&lt;br /&gt;3. Select “Install the hardware that I manually select from a list (Advanced)” and click Next.&lt;br /&gt;4. Now from the list select Network Adapters and click Next&lt;br /&gt;5. Under Manufacturers, select Microsoft and select “Microsoft Loopback Adapter” under Network Adapter and click Next. This should start the installation. Click Finish when the installation completes.&lt;br /&gt;&lt;br /&gt;To confirm the loopback adapter installed, right-click Computer, select properties. Click Device Manager and expand Network Adapters and you can see the Loopback adapter installed there. Now, configure a new IP for this network as 192.168.0.3&lt;br /&gt;&lt;br /&gt;Once its done, try ping to any of your VM (ex, 192.168.0.1) and check if you're able to ping. If it works, you can then connect using puTTy. Isn't so kool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-6385465129209721350?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/6385465129209721350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2010/10/how-to-connect-vms-from-host.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6385465129209721350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6385465129209721350'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2010/10/how-to-connect-vms-from-host.html' title='How to connect VM&apos;s from a host OS'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-6475066978486781998</id><published>2009-09-08T22:49:00.001-07:00</published><updated>2009-09-08T22:49:51.242-07:00</updated><title type='text'>Kernel Panic and system hang senarios</title><content type='html'>Kernel Panic and system hang senarios&lt;br /&gt;=====================================&lt;br /&gt;&lt;br /&gt;If you are using 64 bit AMD/Intel EM64T based kerne. Then, many servers have problem to boot 64bit SMP servers so boot into single UP mode server. Type following two parameters at Grub prompt&lt;br /&gt;&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;nosmp maxcpu=1&lt;br /&gt;&lt;br /&gt;In addition, boot system into single UP mode then update your kernel and try it out again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You need to enter nosmp and maxcpus parameter at Grub or Lilo boot prompt. For example if you are using Grub as a boot loader, at Grub prompt press 'e' to edit command before booting.&lt;br /&gt;&lt;br /&gt;1) Select second line&lt;br /&gt;2) Again, press 'e' to edit selected command&lt;br /&gt;3) Go to end of line and type two parameters&lt;br /&gt;&lt;br /&gt;nosmp maxcpu=1&lt;br /&gt;&lt;br /&gt;4) Press enter twice and b to boot system&lt;br /&gt;5) This will prevent the kernel panic and system hang scenario. &lt;br /&gt;&lt;br /&gt;Once your system is up using single CPU then you can run diagnostic commands such as:&lt;br /&gt;&lt;br /&gt;Get all boot message:&lt;br /&gt;&lt;br /&gt;dmesg | less&lt;br /&gt;&lt;br /&gt;Find out problem with PCI cards&lt;br /&gt;&lt;br /&gt;lspci&lt;br /&gt;&lt;br /&gt;Find out what device drivers loaded (if something is missing then your driver will not get loaded)&lt;br /&gt;&lt;br /&gt;lsmod&lt;br /&gt;&lt;br /&gt;Get memory info (is memory detected correctly?)&lt;br /&gt;&lt;br /&gt;free&lt;br /&gt;cat /proc/meminfo&lt;br /&gt;&lt;br /&gt;Get CPU info (see if your CPU hit by any bug):&lt;br /&gt;&lt;br /&gt;top&lt;br /&gt;cat /proc/cpuinfo&lt;br /&gt;&lt;br /&gt;Find out kernel version&lt;br /&gt;&lt;br /&gt;uname -a&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-6475066978486781998?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/6475066978486781998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/kernel-panic-and-system-hang-senarios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6475066978486781998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6475066978486781998'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/kernel-panic-and-system-hang-senarios.html' title='Kernel Panic and system hang senarios'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-7633018517767045987</id><published>2009-09-08T22:48:00.000-07:00</published><updated>2009-09-08T22:49:00.418-07:00</updated><title type='text'>JAVA OUT OF MEMORY ERROR</title><content type='html'>:::JAVA OUT OF MEMORY ERROR::::&lt;br /&gt;==========================================================================================&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;05:35:34,193 ERROR [[/embarqcc].[jsp]] Servlet.service() for servlet jsp threw exception&lt;br /&gt;java.lang.OutOfMemoryError&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This issue seems not related to the OS and it related to setting up Java VM pool settings. In your JBoss file, you need to specify the Java VM memory allocation pool parameters as per your requirement. Please recheck them once.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Go to your JBOSS run.bat or run.sh file,&lt;br /&gt;&lt;br /&gt;check for JAVA_OPTS, you find this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;rem Sun JVM memory allocation pool parameters. Modify as appropriate.&lt;br /&gt;set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m&lt;br /&gt;&lt;br /&gt;here Xms128m is the minimum java memory allocated and it go up to max 512m and you can increase this value if your hardware supports according to java specs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-7633018517767045987?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/7633018517767045987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/java-out-of-memory-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7633018517767045987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7633018517767045987'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/java-out-of-memory-error.html' title='JAVA OUT OF MEMORY ERROR'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-6491260205634433151</id><published>2009-09-08T22:47:00.001-07:00</published><updated>2009-09-08T22:47:57.944-07:00</updated><title type='text'>Install Mysql Server on Windows</title><content type='html'>Install Mysql Server on Windows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;when you receive following error while installing mysql on windows:&lt;br /&gt;&lt;br /&gt;"Cannot Create Windows Service for MySQL. Error:0"&lt;br /&gt;&lt;br /&gt;What you need to do is to open command line (Start -&gt; Run -&gt; cmd) and type the following:&lt;br /&gt;&lt;br /&gt;sc delete mysql&lt;br /&gt;&lt;br /&gt;You should receive a message like this:&lt;br /&gt;&lt;br /&gt;[SC] DeleteService SUCCESS&lt;br /&gt;&lt;br /&gt;Then uninstall MySQL completely using "Add or Remove Programs". After it has been uninstalled, install it again using installation wizard. When it ends, don't choose to configure MySQL right away, instead just uncheck the box and click OK.&lt;br /&gt;&lt;br /&gt;Open command line (Start -&gt; Run -&gt; cmd) and type this:&lt;br /&gt;&lt;br /&gt;C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe --install MySQL50 --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\bin\my.ini"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: 'MySQL50' is the name of the MySQL service and it needs to be different than 'MySQL'.&lt;br /&gt;&lt;br /&gt;Hit enter and restart your Mysql service by going to Admin tools --&gt; services. MySQL should be running fine now.&lt;br /&gt;&lt;br /&gt;To work mysql, go to cmd and type:&lt;br /&gt;&lt;br /&gt;mysql -u root -p &lt;br /&gt;password: just hit enter&lt;br /&gt;&lt;br /&gt;To make mysql binary to your path do this,&lt;br /&gt;&lt;br /&gt;Right click on My computer &gt;&gt; Properties &gt;&gt; Advanced &gt;&gt; Environment Variables &gt;&gt; click on path and edit &gt;&gt; add the path&lt;br /&gt;&lt;br /&gt;C:\Program Files\MySQL\MySQL Server 5.0\bin&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;under system variables &gt;&gt; click on new &lt;br /&gt;&lt;br /&gt;mysql&lt;br /&gt;C:\Program Files\MySQL\MySQL Server 5.0\bin&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;click ok...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-6491260205634433151?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/6491260205634433151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/install-mysql-server-on-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6491260205634433151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6491260205634433151'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/install-mysql-server-on-windows.html' title='Install Mysql Server on Windows'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-6172208349969521037</id><published>2009-09-08T22:46:00.000-07:00</published><updated>2009-09-08T22:47:38.904-07:00</updated><title type='text'>Installing Perl Modules using CPAN</title><content type='html'>There are several ways to get Perl modules from CPAN installed on your unix-based system. Keep in mind that there is always more than one way to do it with Perl, and this is no different. Before embarking upon any installation, it's a good idea to download the module, unzip it and check out the documentation. In general, though, most modules are installed in the same method.&lt;br /&gt;The simplest way to get Perl modules installed is to use the CPAN module itself. If you are the system administrator and want to install the module system-wide, you'll need to switch to your root user. To fire up the CPAN module, just get to your command line and run this:&lt;br /&gt;&lt;br /&gt;    perl -MCPAN -e shell &lt;br /&gt;&lt;br /&gt;If this is the first time you've run CPAN, it's going to ask you a series of questions - in most cases the default answer is fine. Once you find yourself staring at the cpan&gt; command prompt, installing a module is as easy as install MODULE::NAME - for example, to install the HTML::Template module you'd type:&lt;br /&gt;&lt;br /&gt;    cpan&gt; install HTML::Template &lt;br /&gt;&lt;br /&gt;CPAN should take it from there and you'll wind up with the module installed into your Perl library.&lt;br /&gt;Let's say you're on your system command line and you just want to install a module as quickly as possible - you can run the Perl CPAN module via command line perl and get it installed in a single line:&lt;br /&gt;&lt;br /&gt;    perl -MCPAN -e 'install HTML::Template' &lt;br /&gt;&lt;br /&gt;As I mentioned earlier, it's always advisable to download a module yourself, especially if you're having problems installing with CPAN. If you're on the command line, you can use something like wget to grab the file. Next you'll want to unzip it with something like:&lt;br /&gt;&lt;br /&gt;    tar -zxvf HTML-Template-2.8.tar.gz &lt;br /&gt;&lt;br /&gt;This will unzip the module into a directory, then you can move in and poke around - look for the README or INSTALL files. In most cases, installing a module by hand is still pretty easy, though (although not as easy as CPAN). Once you've switched into the base directory for the module, you should be able to get it installed by typing:&lt;br /&gt;&lt;br /&gt;    perl Makefile.PL&lt;br /&gt;    make&lt;br /&gt;    make test&lt;br /&gt;    make install&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-6172208349969521037?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/6172208349969521037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/installing-perl-modules-using-cpan.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6172208349969521037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/6172208349969521037'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/installing-perl-modules-using-cpan.html' title='Installing Perl Modules using CPAN'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-5551647363340813366</id><published>2009-09-08T22:45:00.001-07:00</published><updated>2009-09-08T22:46:05.553-07:00</updated><title type='text'>Installing a BASH shell on HP-UX - PA-RISC 11.23</title><content type='html'>Installing a BASH shell on HP-UX - PA-RISC 11.23&lt;br /&gt;&lt;br /&gt;Please go to this site and download the BASH shell and it's dependencies,&lt;br /&gt;&lt;br /&gt;http://hpux.cs.utah.edu/hppd/cgi-bin/search?package=on&amp;description=on&amp;term=bash&amp;Search=Search&lt;br /&gt;http://hpux.cs.utah.edu/hppd/cgi-bin/redirect?hpux/Shells/bash-3.2/bash-3.2-hppa-11.23.depot.gz&lt;br /&gt;&lt;br /&gt;Depedencies,&lt;br /&gt;&lt;br /&gt;libiconv:&lt;br /&gt;http://hpux.cs.utah.edu/hppd/cgi-bin/redirect?hpux/Development/Libraries/libiconv-1.12/libiconv-1.12-hppa-11.23.depot.gz&lt;br /&gt;&lt;br /&gt;gettext:&lt;br /&gt;http://hpux.cs.utah.edu/hppd/cgi-bin/redirect?hpux/Gnu/gettext-0.17/gettext-0.17-hppa-11.23.depot.gz&lt;br /&gt;&lt;br /&gt;termcap:&lt;br /&gt;http://hpux.cs.utah.edu/hppd/cgi-bin/redirect?hpux/Development/Libraries/termcap-1.3.1/termcap-1.3.1-hppa-11.23.depot.gz&lt;br /&gt;&lt;br /&gt;under /:&lt;br /&gt;&lt;br /&gt;first install all dependencies,&lt;br /&gt;&lt;br /&gt;gunzip libiconv-1.12-hppa-11.23.depot.gz&lt;br /&gt;swinstall -s /libiconv-1.12-hppa-11.23.depot&lt;br /&gt;&lt;br /&gt;In the window, select the package and then go to Actions --&gt; Install. Do the same for all dependencies&lt;br /&gt;&lt;br /&gt;Now, install bash&lt;br /&gt;&lt;br /&gt;gunzip bash-3.2-hppa-11.23.depot.gz&lt;br /&gt;swinstall -s /bash-3.2-hppa-11.23.depot&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once installed, appened to the path&lt;br /&gt;&lt;br /&gt;find / -name bash&lt;br /&gt;&lt;br /&gt;PATH=$PATH:/usr/local/bin&lt;br /&gt;export PATH&lt;br /&gt;&lt;br /&gt;that's all !!!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-5551647363340813366?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/5551647363340813366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/installing-bash-shell-on-hp-ux-pa-risc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/5551647363340813366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/5551647363340813366'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/installing-bash-shell-on-hp-ux-pa-risc.html' title='Installing a BASH shell on HP-UX - PA-RISC 11.23'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-7503294917003108817</id><published>2009-09-08T22:44:00.000-07:00</published><updated>2009-09-08T22:45:28.060-07:00</updated><title type='text'>How to install GRUB on MBR</title><content type='html'>To install GRUB on MBR :&lt;br /&gt;&lt;br /&gt;(First of all, enter your BIOS setup and in BOOT Sequence window choose to boot with CDROM first.)&lt;br /&gt;&lt;br /&gt;1) Boot with your Fedora Core Installation CD 1 (or your Redhat Distro).&lt;br /&gt;&lt;br /&gt;2) Type "linux rescue" at the prompt.&lt;br /&gt;&lt;br /&gt;3) Answer the questions about keyboard and language.&lt;br /&gt;&lt;br /&gt;4) Tell the rescue mode to use your proper partition to mount (the one that you want to get booted into)&lt;br /&gt;&lt;br /&gt;5) When you come to the console prompt type: chroot /mnt/sysimage&lt;br /&gt;&lt;br /&gt;6) Type grub&lt;br /&gt;&lt;br /&gt;7) Set the GRUB's root device to the partition containing the boot directory like this:&lt;br /&gt;&lt;br /&gt;grub&gt; root (hd0,0)&lt;br /&gt;&lt;br /&gt;Filesystem type is ext2fs, partition type 0x83&lt;br /&gt;&lt;br /&gt;I have Windows 98 in hd0,0 ; Windows XP in hd0,1, Fedora Core /boot partition in hd0,2 and Mandrake /boot partition in hd0,6. So in my case the command should be: &gt; root (hd0,2)&lt;br /&gt;&lt;br /&gt;If you are not sure which partition actually holds this directory, use the command 'find' like this:&lt;br /&gt;&lt;br /&gt;grub&gt; find /boot/grub/stage1&lt;br /&gt;&lt;br /&gt;This will search for the file name '/boot/grub/stage1' and show the devices which contain the file.&lt;br /&gt;Once you've set the root device correctly, run the command 'setup'.&lt;br /&gt;&lt;br /&gt;8) Then, run the command setup&lt;br /&gt;&lt;br /&gt;grub&gt; setup (hd0)&lt;br /&gt;Checking if "/boot/grub/stage1" exists....... no&lt;br /&gt;Checking if "/grub/stage1" exists....... yes&lt;br /&gt;Checking if "/grub/stage2" exists....... yes&lt;br /&gt;Checking if "/grub/e2fs_stage1_5" exists....... yes&lt;br /&gt;Running "embed /grub/e2fs_stage1_5 (hd0)"....... 15 sectors are embedded&lt;br /&gt;succeded&lt;br /&gt;Running "install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf....... succeded&lt;br /&gt;Done&lt;br /&gt;&lt;br /&gt;This command will install GRUB boot loader on the Master Boot Record (MBR) of the first drive.&lt;br /&gt;&lt;br /&gt;9) Type quit&lt;br /&gt;&lt;br /&gt;grub&gt; quit&lt;br /&gt;&lt;br /&gt;GRUB is now in the MBR.&lt;br /&gt;&lt;br /&gt;10) Finally, you'll have to edit your /boot/grub/grub.conf, for example whith nano:&lt;br /&gt;&lt;br /&gt;&gt; nano /boot/grub/grub.conf&lt;br /&gt;&lt;br /&gt;(/etc/grub.conf or /boot/grub/grub.conf or /boot/grub/menu.lst, they are the same file) This file has the boot partitions of the disk/s.&lt;br /&gt;&lt;br /&gt;11) Restart your PC without the Fedora Core CD 1 Installation. (or your Redhat Distro)&lt;br /&gt;Reply With Quote&lt;br /&gt;&lt;br /&gt;OR ALSO&lt;br /&gt;&lt;br /&gt;you can also use this command&lt;br /&gt;&lt;br /&gt;grub-install --recheck /dev/hda or /dev/sda.. it will correct the entries in grub.conf..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-7503294917003108817?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/7503294917003108817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/how-to-install-grub-on-mbr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7503294917003108817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7503294917003108817'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/how-to-install-grub-on-mbr.html' title='How to install GRUB on MBR'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-9055579709228899089</id><published>2009-09-08T22:43:00.000-07:00</published><updated>2009-09-08T22:44:23.490-07:00</updated><title type='text'>How to increase file descriptors max limit on Linux</title><content type='html'>How to increase file descriptors max limit on Linux&lt;br /&gt;===================================================&lt;br /&gt;&lt;br /&gt;How do I increase the maximum number of open files under CentOS Linux? How do I open more file descriptors under Linux?&lt;br /&gt;&lt;br /&gt;ulimit command provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The maximum number of open file descriptors displayed with following command (login as the root)&lt;br /&gt;&lt;br /&gt;cat /proc/sys/fs/file-max&lt;br /&gt;&lt;br /&gt;output: 101703&lt;br /&gt;&lt;br /&gt;The number of maximum files was reached, how do I fix this problem? &lt;br /&gt;&lt;br /&gt;Increase file descriptor limit under Linux to prevent java.net.SocketException: Too many open files&lt;br /&gt;&lt;br /&gt;Many application such as Oracle database server needs this range quite higher. So you can increase the maximum number of open files by setting new value in kernel variable /proc/sys/fs/file-max as follows (login as the root):&lt;br /&gt;&lt;br /&gt;sysctl -w fs.file-max=200000&lt;br /&gt;&lt;br /&gt;Above command forces the limit to 200000 files. You need to edit /etc/sysctl.conf file and put following line so that after reboot the setting will remain as it is:&lt;br /&gt;&lt;br /&gt;vi /etc/sysctl.conf&lt;br /&gt;&lt;br /&gt;and Append a config directive as follows:&lt;br /&gt;&lt;br /&gt;fs.file-max = 200000&lt;br /&gt;&lt;br /&gt;Save and close the file. Users need to log out and log back in again to changes take effect or just type command:&lt;br /&gt;&lt;br /&gt;sysctl -p ( sysctl -p /etc/sysctl.conf)&lt;br /&gt;&lt;br /&gt;Verify your settings with command:&lt;br /&gt;&lt;br /&gt;cat /proc/sys/fs/file-max&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;sysctl fs.file-max&lt;br /&gt;&lt;br /&gt;View how many files are open. The number returned might defer as 1 file descriptor can have multiple open files attached to it.&lt;br /&gt;&lt;br /&gt;lsof | wc -l&lt;br /&gt;&lt;br /&gt;Increase the limit:&lt;br /&gt;&lt;br /&gt;Edit /etc/security/limits.conf&lt;br /&gt;&lt;br /&gt;username hard nofile 32768&lt;br /&gt;&lt;br /&gt;Detailed:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Max Processes per user limit , check this ulimit -a ( check the value next to max user processes  )&lt;br /&gt;&lt;br /&gt;max user processes            (-u) 7168&lt;br /&gt;&lt;br /&gt;To increase this value, go in to /root/.bashrc and type&lt;br /&gt;&lt;br /&gt;ulimit -u unlimited&lt;br /&gt;&lt;br /&gt;ou must exit and re-login from your terminal for the change to take effect.&lt;br /&gt;&lt;br /&gt;check again, ulimit -a&lt;br /&gt;&lt;br /&gt;max user processes         unlimited &lt;br /&gt;&lt;br /&gt;The above procedure will apply for all users since you edited root's bashrc file. If you want limit for a single user, then go in users bashrc file and change the limit as you want&lt;br /&gt;&lt;br /&gt;You may also do ulimit -u unlimited at the command prompt instead of adding it to the /root/.bashrc file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;II) Increases the system limit on open files for instance a process. Means, a process on a system can open at least 10000 file descriptors.&lt;br /&gt;&lt;br /&gt;To see the number of open files per process, ulimit -a&lt;br /&gt;&lt;br /&gt;open files                      (-n) 1024&lt;br /&gt;&lt;br /&gt;To apply, go to /root/.bashrc and type&lt;br /&gt;&lt;br /&gt;ulimit -n 5120&lt;br /&gt;&lt;br /&gt;check the limit, ulimit -a&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;first I add the line&lt;br /&gt;fs.file-max = 65536&lt;br /&gt;into /etc/sysctl.conf and I reload with sysctl -p&lt;br /&gt;then I add into /etc/security/limits the lines&lt;br /&gt;* soft nofile 1024&lt;br /&gt;* hard nofile 65535&lt;br /&gt;&lt;br /&gt;third I add in /etc/pam.d/login the line&lt;br /&gt;&lt;br /&gt;session required /lib/security/pam_limits.so&lt;br /&gt;&lt;br /&gt;fourth I do&lt;br /&gt;&lt;br /&gt;echo 65535 &gt; /proc/sys/fs/file-max&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-9055579709228899089?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/9055579709228899089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/how-to-increase-file-descriptors-max.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/9055579709228899089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/9055579709228899089'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/how-to-increase-file-descriptors-max.html' title='How to increase file descriptors max limit on Linux'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-3567920080425966763</id><published>2009-09-08T22:42:00.001-07:00</published><updated>2009-09-08T22:43:15.646-07:00</updated><title type='text'>HP-UX: Boot Into Single User Mode</title><content type='html'>HP-UX: Boot Into Single User Mode&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First, you need to interrupt the boot process when prompted. This is useful to reset password and other tasks.&lt;br /&gt;&lt;br /&gt;First, you need to tell HP-UX box to boot primary, it should give you a prompt to interact with the ISL. You should reply 'y' to this. Once at ISL&gt; prompt type hpux -is or hpux -iS /stand/vmunix to boot into single user mode&lt;br /&gt;&lt;br /&gt;Interrupt the boot process when prompted by pressing [ESCAPE] key. You will see message as follows:&lt;br /&gt;&lt;br /&gt;Selecting a system to boot. To stop selection process, press and hold the ESCAPE key... &lt;br /&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;Autoboot from primary boot path enabled.&lt;br /&gt;To override, press any key within 10 seconds&lt;br /&gt;&lt;br /&gt;Type boot pri isl at the prompt:&lt;br /&gt;&lt;br /&gt;  boot pri&lt;br /&gt;&lt;br /&gt;At the ISL&gt; prompt:, type&lt;br /&gt;  hpux -is /stand/vmunix&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;   hpux -is&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;or simply use, shutdown without any option will go to single user mode...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-3567920080425966763?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/3567920080425966763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/09/hp-ux-boot-into-single-user-mode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3567920080425966763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3567920080425966763'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/09/hp-ux-boot-into-single-user-mode.html' title='HP-UX: Boot Into Single User Mode'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-7093276298556249019</id><published>2009-08-26T23:00:00.000-07:00</published><updated>2009-08-26T23:01:59.593-07:00</updated><title type='text'>LINUX LVM :: How To...</title><content type='html'>All these steps were tested on RHEL 5.3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Creating Physical Volumes:::&lt;br /&gt;&lt;br /&gt;#fdisk /dev/sda&lt;br /&gt;The number of cylinders for this disk is set to 4307.&lt;br /&gt;There is nothing wrong with that, but this is larger than 1024,&lt;br /&gt;and could in certain setups cause problems with:&lt;br /&gt;1) software that runs at boot time (e.g., old versions of LILO)&lt;br /&gt;2) booting and partitioning software from other OSs&lt;br /&gt;   (e.g., DOS FDISK, OS/2 FDISK)&lt;br /&gt;&lt;br /&gt;Command (m for help):p&lt;br /&gt;Disk /dev/sda: 35.4 GB, 35433480192 bytes&lt;br /&gt;255 heads, 63 sectors/track, 4307 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1   *           1          16      128488+  83  Linux&lt;br /&gt;/dev/sda2              17        1928    15358140   8e  Linux LVM&lt;br /&gt;/dev/sda3            1929        2183     2048287+  82  Linux swap / Solaris&lt;br /&gt;&lt;br /&gt;I'm going to create a new partition about 5gb and use it as physical volume.&lt;br /&gt;&lt;br /&gt;Command (m for help): n&lt;br /&gt;Command action&lt;br /&gt;   e   extended&lt;br /&gt;   p   primary partition (1-4)&lt;br /&gt;p&lt;br /&gt;Selected partition 4&lt;br /&gt;First cylinder (2184-4307, default 2184):&lt;br /&gt;Using default value 2184&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (2184-4307, default 4307): +5g&lt;br /&gt;&lt;br /&gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 35.4 GB, 35433480192 bytes&lt;br /&gt;255 heads, 63 sectors/track, 4307 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1   *           1          16      128488+  83  Linux&lt;br /&gt;/dev/sda2              17        1928    15358140   8e  Linux LVM&lt;br /&gt;/dev/sda3            1929        2183     2048287+  82  Linux swap / Solaris&lt;br /&gt;/dev/sda4            2184        2792     4891792+  83  Linux&lt;br /&gt;&lt;br /&gt;Command (m for help): t&lt;br /&gt;Partition number (1-4): 4&lt;br /&gt;Hex code (type L to list codes): 8e&lt;br /&gt;&lt;br /&gt;Changed system type of partition 4 to 8e (Linux LVM)&lt;br /&gt;&lt;br /&gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 35.4 GB, 35433480192 bytes&lt;br /&gt;255 heads, 63 sectors/track, 4307 cylinders&lt;br /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1   *           1          16      128488+  83  Linux&lt;br /&gt;/dev/sda2              17        1928    15358140   8e  Linux LVM&lt;br /&gt;/dev/sda3            1929        2183     2048287+  82  Linux swap / Solaris&lt;br /&gt;/dev/sda4            2184        2792     4891792+  8e  Linux LVM&lt;br /&gt;&lt;br /&gt;Command (m for help): wq&lt;br /&gt;The partition table has been altered!&lt;br /&gt;&lt;br /&gt;Calling ioctl() to re-read partition table.&lt;br /&gt;&lt;br /&gt;WARNING: Re-reading the partition table failed with error 16: Device or resource busy.&lt;br /&gt;The kernel still uses the old table.&lt;br /&gt;The new table will be used at the next reboot.&lt;br /&gt;Syncing disks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#partprobe&lt;br /&gt;&lt;br /&gt;To create a physical volume:::::::&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# pvcreate /dev/sda4&lt;br /&gt;  Physical volume "/dev/sda4" successfully created&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# pvs&lt;br /&gt;  PV         VG   Fmt  Attr PSize  PFree&lt;br /&gt;  /dev/sda2  vg00 lvm2 a-   14.62G 1.00G&lt;br /&gt;  /dev/sda4       lvm2 --    4.67G 4.67G&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# pvdisplay -v&lt;br /&gt;    Scanning for physical volume names&lt;br /&gt;    Wiping cache of LVM-capable devices&lt;br /&gt;  --- Physical volume ---&lt;br /&gt;  PV Name               /dev/sda2&lt;br /&gt;  VG Name               vg00&lt;br /&gt;  PV Size               14.65 GB / not usable 22.18 MB&lt;br /&gt;  Allocatable           yes&lt;br /&gt;  PE Size (KByte)       32768&lt;br /&gt;  Total PE              468&lt;br /&gt;  Free PE               32&lt;br /&gt;  Allocated PE          436&lt;br /&gt;  PV UUID               lDu5U5-ExhK-CNGK-jcH7-Koj3-CIhc-vRWCZo&lt;br /&gt;&lt;br /&gt;  "/dev/sda4" is a new physical volume of "4.67 GB"&lt;br /&gt;  --- NEW Physical volume ---&lt;br /&gt;  PV Name               /dev/sda4&lt;br /&gt;  VG Name&lt;br /&gt;  PV Size               4.67 GB&lt;br /&gt;  Allocatable           NO&lt;br /&gt;  PE Size (KByte)       0&lt;br /&gt;  Total PE              0&lt;br /&gt;  Free PE               0&lt;br /&gt;  Allocated PE          0&lt;br /&gt;  PV UUID               r4R03g-12qu-iRO5-56Fl-nCwa-mPoh-3zgy6n&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To remove a physical volume use::::::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# pvremove /dev/sda4&lt;br /&gt;    Labels on physical volume "/dev/sda4" successfully wiped&lt;br /&gt;[root@freedom ~]# pvs&lt;br /&gt;  PV         VG   Fmt  Attr PSize  PFree&lt;br /&gt;  /dev/sda2  vg00 lvm2 a-   14.62G 1.00G&lt;br /&gt;[root@freedom ~]# pvdisplay -v&lt;br /&gt;    Scanning for physical volume names&lt;br /&gt;  --- Physical volume ---&lt;br /&gt;  PV Name               /dev/sda2&lt;br /&gt;  VG Name               vg00&lt;br /&gt;  PV Size               14.65 GB / not usable 22.18 MB&lt;br /&gt;  Allocatable           yes&lt;br /&gt;  PE Size (KByte)       32768&lt;br /&gt;  Total PE              468&lt;br /&gt;  Free PE               32&lt;br /&gt;  Allocated PE          436&lt;br /&gt;  PV UUID               lDu5U5-ExhK-CNGK-jcH7-Koj3-CIhc-vRWCZo&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;we again create a same physical volume::::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# pvcreate -f /dev/sda4&lt;br /&gt;  Physical volume "/dev/sda4" successfully created&lt;br /&gt;&lt;br /&gt;let me create a couple more partition to make a physical volume&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# pvs&lt;br /&gt;  PV         VG   Fmt  Attr PSize  PFree&lt;br /&gt;  /dev/sda2  vg00 lvm2 a-   14.62G 1.00G&lt;br /&gt;  /dev/sda4       lvm2 --    4.67G 4.67G&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/dev/sda5            2184        2549     2939863+  83  Linux&lt;br /&gt;/dev/sda6            2550        2915     2939863+  83  Linux&lt;br /&gt;/dev/sda7            2916        3281     2939863+  83  Linux&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;the above are new physical volumes of 3 gb each.... ignore the above physical volume&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# pvcreate /dev/sda5 /dev/sda6 /dev/sda7&lt;br /&gt;  Physical volume "/dev/sda5" successfully created&lt;br /&gt;  Physical volume "/dev/sda6" successfully created&lt;br /&gt;  Physical volume "/dev/sda7" successfully created&lt;br /&gt;[root@freedom ~]#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lets create a volume group vg01 and two physical volumes to it (/dev/sda5,/dev/sda6)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# vgcreate vg01 /dev/sda5 /dev/sda6&lt;br /&gt;  Volume group "vg01" successfully created&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# vgs&lt;br /&gt;  VG   #PV #LV #SN Attr   VSize  VFree&lt;br /&gt;  vg00   1   6   0 wz--n- 14.62G 1.00G&lt;br /&gt;  vg01   2   0   0 wz--n-  5.60G 5.60G&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;on vg00 there is a free space about 1g left and on vg01 there is a free space left is  5g&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we are going to create a logical volume under vg01 and mount it....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# lvcreate -L 500M -n lvol_test /dev/vg01&lt;br /&gt;  Logical volume "lvol_test" created&lt;br /&gt;&lt;br /&gt;500m of new logical volume lvol_test has been created...check that&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# lvs&lt;br /&gt;  LV        VG   Attr   LSize   Origin Snap%  Move Log Copy%  Convert&lt;br /&gt;  lvol_home vg00 -wi-ao   1.94G&lt;br /&gt;  lvol_opt  vg00 -wi-ao 992.00M&lt;br /&gt;  lvol_root vg00 -wi-ao   2.91G&lt;br /&gt;  lvol_tmp  vg00 -wi-ao   1.97G&lt;br /&gt;  lvol_usr  vg00 -wi-ao   3.91G&lt;br /&gt;  lvol_var  vg00 -wi-ao   1.94G&lt;br /&gt;  lvol_test vg01 -wi-a- 500.00M&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now creating a file system on it....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# mkfs.ext3 /dev/vg01/lvol_test&lt;br /&gt;mke2fs 1.39 (29-May-2006)&lt;br /&gt;Filesystem label=&lt;br /&gt;OS type: Linux&lt;br /&gt;Block size=1024 (log=0)&lt;br /&gt;Fragment size=1024 (log=0)&lt;br /&gt;128016 inodes, 512000 blocks&lt;br /&gt;25600 blocks (5.00%) reserved for the super user&lt;br /&gt;First data block=1&lt;br /&gt;Maximum filesystem blocks=67633152&lt;br /&gt;63 block groups&lt;br /&gt;8192 blocks per group, 8192 fragments per group&lt;br /&gt;2032 inodes per group&lt;br /&gt;Superblock backups stored on blocks:&lt;br /&gt;        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409&lt;br /&gt;&lt;br /&gt;Writing inode tables: done&lt;br /&gt;Creating journal (8192 blocks): done&lt;br /&gt;Writing superblocks and filesystem accounting information: done&lt;br /&gt;&lt;br /&gt;This filesystem will be automatically checked every 35 mounts or&lt;br /&gt;180 days, whichever comes first.  Use tune2fs -c or -i to override.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mount it,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# mount -t ext3 /dev/vg01/lvol_test /test&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# df -h&lt;br /&gt;Filesystem            Size  Used Avail Use% Mounted on&lt;br /&gt;/dev/mapper/vg00-lvol_root&lt;br /&gt;                      2.9G  337M  2.4G  13% /&lt;br /&gt;/dev/mapper/vg00-lvol_home&lt;br /&gt;                      1.9G   36M  1.8G   2% /home&lt;br /&gt;/dev/mapper/vg00-lvol_tmp&lt;br /&gt;                      2.0G  759M  1.1G  41% /tmp&lt;br /&gt;/dev/mapper/vg00-lvol_var&lt;br /&gt;                      1.9G   91M  1.7G   5% /var&lt;br /&gt;/dev/mapper/vg00-lvol_opt&lt;br /&gt;                      961M   18M  895M   2% /opt&lt;br /&gt;/dev/mapper/vg00-lvol_usr&lt;br /&gt;                      3.8G  2.1G  1.6G  58% /usr&lt;br /&gt;/dev/sda1             122M   15M  101M  13% /boot&lt;br /&gt;tmpfs                 442M     0  442M   0% /dev/shm&lt;br /&gt;/dev/mapper/vg01-lvol_test&lt;br /&gt;                      485M   11M  449M   3% /test&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;we need to add this to /etc/fstab to make it permanent upon reboots&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/dev/vg01/lvol_test     /test                   ext3    defaults        1 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;we're now extending our file system since it is reached to its extend&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/dev/mapper/vg01-lvol_test&lt;br /&gt;                      485M  394M   66M  86% /test&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# lvextend -L +1G /dev/vg01/lvol_test&lt;br /&gt;&lt;br /&gt;  Extending logical volume lvol_test to 1.49 GB&lt;br /&gt;  Logical volume lvol_test successfully resized&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# resize2fs /dev/vg01/lvol_test&lt;br /&gt;&lt;br /&gt;resize2fs 1.39 (29-May-2006)&lt;br /&gt;Filesystem at /dev/vg01/lvol_test is mounted on /test; on-line resizing required&lt;br /&gt;Performing an on-line resize of /dev/vg01/lvol_test to 1560576 (1k) blocks.&lt;br /&gt;The filesystem on /dev/vg01/lvol_test is now 1560576 blocks long.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# df -h&lt;br /&gt;Filesystem            Size  Used Avail Use% Mounted on&lt;br /&gt;/dev/mapper/vg00-lvol_root&lt;br /&gt;                      2.9G  337M  2.4G  13% /&lt;br /&gt;/dev/mapper/vg00-lvol_home&lt;br /&gt;                      1.9G   36M  1.8G   2% /home&lt;br /&gt;/dev/mapper/vg00-lvol_tmp&lt;br /&gt;                      2.0G  759M  1.1G  41% /tmp&lt;br /&gt;/dev/mapper/vg00-lvol_var&lt;br /&gt;                      1.9G   91M  1.7G   5% /var&lt;br /&gt;/dev/mapper/vg00-lvol_opt&lt;br /&gt;                      961M   18M  895M   2% /opt&lt;br /&gt;/dev/mapper/vg00-lvol_usr&lt;br /&gt;                      3.8G  2.1G  1.6G  58% /usr&lt;br /&gt;/dev/sda1             122M   15M  101M  13% /boot&lt;br /&gt;tmpfs                 442M     0  442M   0% /dev/shm&lt;br /&gt;/dev/mapper/vg01-lvol_test&lt;br /&gt;                      1.5G  394M 1007M  29% /test&lt;br /&gt;&lt;br /&gt;kool, /test is now 1g free space..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now we are extending vg00 volume group (adding a physical volume /dev/sda7 to it)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# vgextend vg00 /dev/sda7&lt;br /&gt;  Volume group "vg00" successfully extended&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;vgdisplay -v vg00&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; --- Physical volumes ---&lt;br /&gt;  PV Name               /dev/sda2&lt;br /&gt;  PV UUID               lDu5U5-ExhK-CNGK-jcH7-Koj3-CIhc-vRWCZo&lt;br /&gt;  PV Status             allocatable&lt;br /&gt;  Total PE / Free PE    468 / 32&lt;br /&gt;&lt;br /&gt;  PV Name               /dev/sda7&lt;br /&gt;  PV UUID               LKfPTr-Z4Ts-KFYi-FPHM-Y0Lk-MEQz-jAITG6&lt;br /&gt;  PV Status             allocatable&lt;br /&gt;  Total PE / Free PE    89 / 89&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Shrink an LVM::::::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;we have a logical volume (/dev/vg-mirror/test) mounted on /test with 300MB size and we would like to reduce it by 100MB&lt;br /&gt;it should be reduced to 200Mb from 300Mb (less 100m).. here are the steps&lt;br /&gt;&lt;br /&gt;These are performed on rhel 5&lt;br /&gt;&lt;br /&gt;first unmount /test logical volume&lt;br /&gt;&lt;br /&gt;#umount /test&lt;br /&gt;&lt;br /&gt;perform a check of file system&lt;br /&gt;&lt;br /&gt;#e2fsck -f /dev/vg-mirror/test&lt;br /&gt;&lt;br /&gt;resize the file system first&lt;br /&gt;&lt;br /&gt;#resize2fs /dev/vg-mirror/test 200M&lt;br /&gt;&lt;br /&gt;Then reduce the size of the logical volume&lt;br /&gt;&lt;br /&gt;#lvreduce -L -100M /dev/vg-mirror/test&lt;br /&gt;&lt;br /&gt;then mount it back on /test and check for data..&lt;br /&gt;&lt;br /&gt;mount /dev/vg-mirror/test /test&lt;br /&gt;&lt;br /&gt;it is strongly recommended to backup your data before performing above steps for safe side...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mirroring::::::&lt;br /&gt;&lt;br /&gt;we do normally mirror logical volumes not the disks. The same even applied to HP-UX LVM... To mirror, you need atleast &lt;br /&gt;two disks (ex, /dev/sdd , /dev/sde). we create a large partition (or entire disk partition) on these two disks and use it as mirror for newly created&lt;br /&gt;logical volumes&lt;br /&gt;&lt;br /&gt;pvcreate /dev/sdd1 /dev/sde1&lt;br /&gt;&lt;br /&gt;now create a volume group&lt;br /&gt;&lt;br /&gt;vgcreate /dev/vg-mirror /dev/sdd1 /dev/sde1&lt;br /&gt;&lt;br /&gt;then create a logical volume&lt;br /&gt;&lt;br /&gt;lvcreate -L +1G -m1 -n mirror /dev/vg-mirror&lt;br /&gt;&lt;br /&gt;this should be a mirror lvm... mount this and test your self (by adding some files and destroying one physical volume and check for the data)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-7093276298556249019?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/7093276298556249019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/08/linux-lvm-how-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7093276298556249019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7093276298556249019'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/08/linux-lvm-how-to.html' title='LINUX LVM :: How To...'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-8869406637826493676</id><published>2009-08-19T03:54:00.000-07:00</published><updated>2009-08-19T03:55:01.930-07:00</updated><title type='text'>Setting up Veritas Volumes on HP</title><content type='html'>Setting up Veritas Volumes on HP&lt;br /&gt;&lt;br /&gt;Once the LUNs have been presented to the host from the CX:&lt;br /&gt;&lt;br /&gt;Step 1: Run ioscan and insf to build the hardware paths and load the device drivers for the new disks:&lt;br /&gt;&lt;br /&gt; ioscan -fnC disk&lt;br /&gt; insf -e&lt;br /&gt;&lt;br /&gt;Step 2: Run the ioscan, insf and powermt commands to make the LUNs visible to the OS&lt;br /&gt;&lt;br /&gt; powermt display&lt;br /&gt; powermt check&lt;br /&gt; powermt config&lt;br /&gt; powermt save&lt;br /&gt; powermt display&lt;br /&gt; vxdctl enable&lt;br /&gt;&lt;br /&gt;Step 3: Find a disk to add to the disk group&lt;br /&gt;&lt;br /&gt; vxdisk list&lt;br /&gt;&lt;br /&gt; DEVICE       TYPE      DISK         GROUP        STATUS&lt;br /&gt; c2t0d0       simple    rootdisk01   rootdg       online&lt;br /&gt; c2t1d0       simple    rootmirr01   rootdg       online&lt;br /&gt; c4t3d0       simple    -            -            error&lt;br /&gt; c8t0d0       simple    -            -            online invalid&lt;br /&gt; c8t0d1       simple    -            -            online invalid&lt;br /&gt; c8t0d2       simple    -            -            online invalid&lt;br /&gt; c8t0d3       simple    -            -            online invalid&lt;br /&gt; c8t0d4       simple    -            -            online invalid&lt;br /&gt; c8t0d5       simple    -            -            online invalid&lt;br /&gt; c8t0d6       simple    -            -            online invalid&lt;br /&gt; c8t0d7       simple    -            -            online invalid&lt;br /&gt; c8t1d0       simple    -            -            online invalid&lt;br /&gt; c8t1d1       simple    -            -            online invalid&lt;br /&gt;&lt;br /&gt; vxdisksetup -i c8t0d0&lt;br /&gt;&lt;br /&gt;Step 4: If a group is not set up for use, create a disk group:&lt;br /&gt;&lt;br /&gt; vxdg init bedvqa03fs bedvqa03fs01=c8t0d0&lt;br /&gt;&lt;br /&gt; If a group is set up for use, add the disk to the disk group:&lt;br /&gt;&lt;br /&gt; vxdg -g bedvqa03fs adddisk bedvqa03fs02=c8t0d1&lt;br /&gt;&lt;br /&gt;Step 5: confirm the work you just completed:&lt;br /&gt;&lt;br /&gt; vxdg list&lt;br /&gt; vxdg list bedvqa03fs&lt;br /&gt; vxprint -g bedvqa03fs&lt;br /&gt; vxdg -g bedvqa03fs free&lt;br /&gt;&lt;br /&gt;Step 6: Create a raw volume in the disk group:&lt;br /&gt;&lt;br /&gt; /usr/sbin/vxassist -g bedvqa03fs -U gen make sybsystemdb 64m layout=nolog user=sybase group=database mode=0755 bedvqa03fs01&lt;br /&gt;&lt;br /&gt;This completes the work of setting up Veritas Volumes on HP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-8869406637826493676?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/8869406637826493676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/08/setting-up-veritas-volumes-on-hp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/8869406637826493676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/8869406637826493676'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/08/setting-up-veritas-volumes-on-hp.html' title='Setting up Veritas Volumes on HP'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-1358342029679941149</id><published>2009-08-19T03:51:00.000-07:00</published><updated>2009-08-19T03:52:07.483-07:00</updated><title type='text'>Command line for volume manager</title><content type='html'>Command line for volume manager.&lt;br /&gt;&lt;br /&gt;Free space on the disk : vxdg free&lt;br /&gt;&lt;br /&gt;Rename disk:  vxedit –g (disk group name) rename disk_1 ( disk name ) test_1 ( disk name)&lt;br /&gt;&lt;br /&gt;Remove disk:  vxdg –g  testdg ( dg name) rmdisk testdg_02 ( disk name )&lt;br /&gt;&lt;br /&gt;Add disk:  vxdg –g testdg  ( dg name ) adddisk disk_1(disk name)=cxtxdx&lt;br /&gt;&lt;br /&gt;Deport disk:  vxdg –n rootdg deport testdg ( dg name).&lt;br /&gt;&lt;br /&gt;Create disk group: vxdg init testdg ( dg name) disk_01( disk nam)=cxtxdx&lt;br /&gt;&lt;br /&gt;Create volume:  vxassist –g testdg ( dg name) –U fsgen make vol01 ( volume name)100m: option layout=(stripe,nolog) user=xxxx group=xxx mode=755 disk_01 disk_02 …. ( disk name )&lt;br /&gt;&lt;br /&gt;Add mirror:  vxassist –g testdg ( dg name ) mirror vol01 ( volume name) layout=(stripe,simple)&lt;br /&gt;&lt;br /&gt;Remote log or mirror: vxedit –g testdg ( dg name) –r rm vol01-02 ( plex name)&lt;br /&gt;&lt;br /&gt;Create subdisk:  vxmake –g testdg (dg name) sd (subdisk name) dm_name=(disk name) dm_offset=0 ( start sector)  len=204800 (sectors, 1 sector =512byte )&lt;br /&gt;&lt;br /&gt;Create Plex:  vxmake –g testdg  ( dg name) plex pl-01 ( plex name) layout = STRIPE st_width=128 ncolume=3 ( number of subdisk join together) sd= disk_01, disk_02 ….( subdisk name)&lt;br /&gt;&lt;br /&gt;Join plex become mirror: vxplex –g testdg ( dg name) att vol01 ( volume name) pl-01 ( plex name)&lt;br /&gt;&lt;br /&gt;Enlarge volume:  vxassist –g testdg ( dg name) growto vol_01 ( volume name ) 300m ( new size)&lt;br /&gt;&lt;br /&gt;Stop and start volume: vxvol –g testdg ( dg name) start/ stop vol_01 ( volume name)&lt;br /&gt;&lt;br /&gt;Dissociate the plex: vxplex –g tesetdg ( dg name) dis pl-01 ( plex name)&lt;br /&gt;&lt;br /&gt;Remove volume:  vxedit –g testdg ( dg name ) –rf  rm vol_01 ( volume name) … ( -rf is the force option)&lt;br /&gt;&lt;br /&gt;Add log:   vxassist –g testdg ( dg name) addlog vol01 ( volume name) testdg_04 ( disk name)&lt;br /&gt;&lt;br /&gt;Remove disk from VM: vxdisk rm c1t0d0 &lt;br /&gt;&lt;br /&gt;Remove disk from VM totally: vxdiskunsetup –c c1t0d0&lt;br /&gt;&lt;br /&gt;To start vxconfigd: vxconfigd  -m boot  ( You have to wait for a while to complete its configuration file)&lt;br /&gt;&lt;br /&gt;To upgrade disk group: vxdg  upgrade testdg ( disk group name)&lt;br /&gt;&lt;br /&gt;All other:  vxdisk –s list,  vxserial –p , vxiod, vxprint –ht, vxdctl , vxlicense &lt;br /&gt;&lt;br /&gt;To create volume with plex: vxmake –U fsgen –g testdg vol ( volume name) read_pol=select user=root group=other mode=755 log_type=none  len=2048000( sector) plex=pl-01 ( plex name)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Fix plex in stale mode:  vxmend fix stale oradata_07-01 ( plex name, it should be brown at the time)&lt;br /&gt;&lt;br /&gt;Fix plex in clean stage: vxmend fix clean oraddata_07-01 ( plex name, after that it can start the volume and mount file system)&lt;br /&gt;&lt;br /&gt; Import the disk group by force: vxdg –f  import qaswb ( disk group name )&lt;br /&gt;&lt;br /&gt;Flush the disk group: vxdg  flush qaswb ( disk group name, it safe to do that.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Clean up volumes              vxconfigd  -k  cleartempdir&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-1358342029679941149?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/1358342029679941149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/08/command-line-for-volume-manager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/1358342029679941149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/1358342029679941149'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/08/command-line-for-volume-manager.html' title='Command line for volume manager'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-7746908674040497467</id><published>2009-08-19T03:44:00.000-07:00</published><updated>2009-08-19T03:50:47.078-07:00</updated><title type='text'>Move and Resize Live Filesystems on a VxVM disk</title><content type='html'>It is assumed that the new disks/LUNs are already installed in/presented to the host and initialised into VxVM.&lt;br /&gt;&lt;br /&gt;1. Verify that there is enough space on the VxVM disk(s):&lt;br /&gt;&lt;br /&gt;# vxdg -g diskgroup free disk-id&lt;br /&gt;eg.:&lt;br /&gt;root@freedom# vxdg -g filesystems free c1t3d0&lt;br /&gt;DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS&lt;br /&gt;c1t3d0       c1t3d0s2     c1t3d0       65024640  6298944   -&lt;br /&gt;c1t3d0       c1t3d0s2     c1t3d0       115365312 8385024   -&lt;br /&gt;c1t3d0       c1t3d0s2     c1t3d0       134241792 9076992   -&lt;br /&gt;&lt;br /&gt;2. If so, continue to step 4; otherwise verify that there is a disk with enough free space in the group:&lt;br /&gt;&lt;br /&gt;# vxdg -g diskgroup free | nawk '($1 ~ /^c/) {print $1, $5/2048 "MB"}'&lt;br /&gt;eg.:&lt;br /&gt;root@freedom# vxdg -g filesystems free | nawk '($1 ~ /^c/) {print $1, $5/2048 "MB"}'&lt;br /&gt;c1t2d0 61791.4MB&lt;br /&gt;c1t3d0 3075.66MB&lt;br /&gt;c1t3d0 4094.25MB&lt;br /&gt;c1t3d0 4432.12MB&lt;br /&gt;c1t4d0 3075.66MB&lt;br /&gt;c1t4d0 4094.25MB&lt;br /&gt;c1t4d0 4432.12MB&lt;br /&gt;c1t5d0 61791.4MB&lt;br /&gt;&lt;br /&gt;3. Then move the volume from the current disk:&lt;br /&gt;&lt;br /&gt;# vxassist -g diskgroup move volume \!current disk&lt;br /&gt;(do the same for any disk mirrors)&lt;br /&gt;eg:&lt;br /&gt;root@freedom# vxassist -g filesystems move oracle9 \!c1t3d0&lt;br /&gt;root@freedom# vxassist -g filesystems move oracle9 \!c1t4d0&lt;br /&gt;root@freedom# vxprint -htg filesystems | grep oracle9&lt;br /&gt;v  oracle9      -            ENABLED  ACTIVE   16777216 SELECT    -        fsgen&lt;br /&gt;pl oracle9-01   oracle9      ENABLED  ACTIVE   16780224 CONCAT    -        RW&lt;br /&gt;sd c1t5d0-01    oracle9-01   c1t5d0   0        6298944  0         c1t5d0s2 ENA&lt;br /&gt;sd c1t5d0-02    oracle9-01   c1t5d0   6298944  10481280 6298944   c1t5d0s2 ENA&lt;br /&gt;pl oracle9-02   oracle9      ENABLED  ACTIVE   16780224 CONCAT    -        RW&lt;br /&gt;sd c1t2d0-01    oracle9-02   c1t2d0   0        6298944  0         c2t2d0   ENA&lt;br /&gt;sd c1t2d0-02    oracle9-02   c1t2d0   6298944  10481280 6298944   c2t2d0   ENA&lt;br /&gt;&lt;br /&gt;4. Finally, grow the filesystem with:&lt;br /&gt;&lt;br /&gt;# vxresize -g diskgroup volume size&lt;br /&gt;eg.:&lt;br /&gt;root@freedom# vxresize -g filesystems oracle9 8192m&lt;br /&gt;root@freedom# df -k&lt;br /&gt;Filesystem            kbytes    used   avail capacity  Mounted on&lt;br /&gt;/dev/md/dsk/d100     4637056 1889665 2701021    42%    /&lt;br /&gt;/dev/md/dsk/d150     12096820 3130130 8845722    27%    /usr&lt;br /&gt;/proc                      0       0       0     0%    /proc&lt;br /&gt;mnttab                     0       0       0     0%    /etc/mnttab&lt;br /&gt;fd                         0       0       0     0%    /dev/fd&lt;br /&gt;/dev/md/dsk/d160     1984564  936477  988551    49%    /var&lt;br /&gt;swap                 10103888      24 10103864     1%    /var/run&lt;br /&gt;dmpfs                10103864       0 10103864     0%    /dev/vx/dmp&lt;br /&gt;dmpfs                10103864       0 10103864     0%    /dev/vx/rdmp&lt;br /&gt;swap                 10103976     112 10103864     1%    /tmp&lt;br /&gt;/dev/vx/dsk/filesystems/srcat&lt;br /&gt;                     20643785 13994542 6442806    69%    /srcat&lt;br /&gt;/dev/vx/dsk/filesystems/oracle&lt;br /&gt;                     7224765 3805306 3347212    54%    /oracle&lt;br /&gt;/dev/vx/dsk/filesystems/netbackup&lt;br /&gt;                     25804343 19320452 6225848    76%    /usr/openv&lt;br /&gt;/dev/vx/dsk/filesystems/patrol01&lt;br /&gt;                     4915164 1653364 2770284    38%    /opt/patrol&lt;br /&gt;/dev/md/dsk/d170     12096820 8397540 3578312    71%    /export/home&lt;br /&gt;/dev/vx/dsk/filesystems/oracle9&lt;br /&gt;                     7864272 4924788 2251361    69%    /apps/oracle&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-7746908674040497467?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/7746908674040497467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/08/move-and-resize-live-filesystems-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7746908674040497467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7746908674040497467'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/08/move-and-resize-live-filesystems-on.html' title='Move and Resize Live Filesystems on a VxVM disk'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-3319200707446486073</id><published>2009-08-19T03:38:00.001-07:00</published><updated>2009-08-19T03:39:11.833-07:00</updated><title type='text'>Solaris- Steps to gain root access without the root password</title><content type='html'>Step 1: Place the installation CD into the server and interrupt the boot sequence.&lt;br /&gt;&lt;br /&gt;Step 2: At the {OK} prompt boot to single user mode from the CD.&lt;br /&gt;&lt;br /&gt; {OK} boot cdrom –s&lt;br /&gt;&lt;br /&gt;Step 3: Once the server boots into single user mode, identify the root disk:&lt;br /&gt;&lt;br /&gt; # format&lt;br /&gt; Searching for disks…done&lt;br /&gt;&lt;br /&gt; AVAILABLE DISK SELECTIONS:&lt;br /&gt;0. c0t0d0 &lt;HDS728080PLAT20 cyl 38307 alt 2 hd 16 sec 255&gt;&lt;br /&gt;/pci@1f,0.ide@d/dad@0,0&lt;br /&gt;1. c0t2d0 &lt;ST380011A cyl 38307 alt 2 hd 16 sec 255&gt;&lt;br /&gt;/pci@1f,0/ide@d/dad@2,0&lt;br /&gt; Speecify disk (enter its number):&lt;br /&gt;&lt;br /&gt;Step 4: Mount the root (/) file system to /mnt&lt;br /&gt;&lt;br /&gt; # mount /dev/dsk/c0t0d0s0 /mnt&lt;br /&gt;&lt;br /&gt;Step 4: Edit the shadow file:&lt;br /&gt;&lt;br /&gt;# vi /mnt/etc/shadow&lt;br /&gt;&lt;br /&gt; root:rAAeloFlBGHwc:6445::::::&lt;br /&gt; daemon:NP:6445::::::&lt;br /&gt; bin:NP:6445::::::&lt;br /&gt; sys:NP:6445::::::&lt;br /&gt; adm:NP:6445::::::&lt;br /&gt; lp:NP:6445::::::&lt;br /&gt; uucp:NP:6445::::::&lt;br /&gt; nuucp:NP:6445::::::&lt;br /&gt; smmsp:NP:6445::::::&lt;br /&gt; listen:*LK*:6445::::::&lt;br /&gt; gdm:*LK*:6445::::::&lt;br /&gt; webservd:*LK*:6445::::::&lt;br /&gt; nobody:*LK*:6445::::::&lt;br /&gt; noaccess:*LK*:6445::::::&lt;br /&gt; nobody4:*LK*:6445::::::&lt;br /&gt;&lt;br /&gt; Change the root password entry to look like the following:&lt;br /&gt;&lt;br /&gt; root::6445::::::&lt;br /&gt;&lt;br /&gt;Step 5: Save your changes and reboot the server as you normally would.&lt;br /&gt;&lt;br /&gt; # reboot&lt;br /&gt;&lt;br /&gt;Step 6: Log on as root and change the root password:&lt;br /&gt;&lt;br /&gt;# passwd root&lt;br /&gt;&lt;br /&gt;These actions were performed on a Sun workstation, but the general procedure remains the same for most UNIX varieties.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-3319200707446486073?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/3319200707446486073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/08/solaris-steps-to-gain-root-access.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3319200707446486073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3319200707446486073'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/08/solaris-steps-to-gain-root-access.html' title='Solaris- Steps to gain root access without the root password'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-2480317193662284518</id><published>2009-08-16T00:58:00.000-07:00</published><updated>2009-08-16T01:52:06.070-07:00</updated><title type='text'>Setting up a NIS Server on LINUX (RHEL 5.3)</title><content type='html'>Network Information Services (NIS) enables you to create user accounts that can be shared across all systems on your network. The user account is created only on the NIS server. NIS clients download the necessary username and password data from the NIS server to verify each user login.&lt;br /&gt;&lt;br /&gt;This example we use NIS server, NFS server (to mount home directories) and NIS client.&lt;br /&gt;&lt;br /&gt;   1.  Configure freedom as an NFS server to make its /home directory available to the Linux workstations.&lt;br /&gt;   2. Configure wisdom as an NFS client that can access freedom's /home directory.&lt;br /&gt;   3. Configure freedom as an NIS server.&lt;br /&gt;   4. Create a user account (nisuser) on freedom that doesn't exist on wisdom. Convert the account to a NIS user account.&lt;br /&gt;   5. Configure wisdom as an NIS client.&lt;br /&gt;   6. Test a remote login from freedom to wisdom using the username and password of the account nisuser. &lt;br /&gt;&lt;br /&gt;In a Nutshell, freedom is configured as NIS and NFS server and wisdom is configured as NIS and NFS client. Both are LINUX boxes with RHEL 5.3 installed on it.&lt;br /&gt;&lt;br /&gt;First I am configuring a NIS server on freedom:::&lt;br /&gt;&lt;br /&gt;Packages:&lt;br /&gt;ypserv-2.19-5.el5&lt;br /&gt;yp-tools-2.9-0.1&lt;br /&gt;ypbind-1.19-11.el5&lt;br /&gt;&lt;br /&gt;Edit Your /etc/sysconfig/network File&lt;br /&gt;#/etc/sysconfig/network&lt;br /&gt;NISDOMAIN="free.com"&lt;br /&gt;&lt;br /&gt;Edit Your /etc/yp.conf File&lt;br /&gt;# /etc/yp.conf - ypbind configuration file&lt;br /&gt;ypserver 127.0.0.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Start The Key NIS Server Related Daemons&lt;br /&gt;service portmap start&lt;br /&gt;service yppasswdd start&lt;br /&gt;service ypserv start&lt;br /&gt;&lt;br /&gt;chkconfig portmap on&lt;br /&gt;chkconfig yppasswdd on&lt;br /&gt;chkconfig ypserv on&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Make sure they are all running before continuing to the next step. You can use the rpcinfo command to do this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# rpcinfo -p localhost&lt;br /&gt;   program vers proto   port&lt;br /&gt;    100000    2   tcp    111  portmapper&lt;br /&gt;    100000    2   udp    111  portmapper&lt;br /&gt;    100004    2   udp    660  ypserv&lt;br /&gt;    100004    1   udp    660  ypserv&lt;br /&gt;    100004    2   tcp    663  ypserv&lt;br /&gt;    100004    1   tcp    663  ypserv&lt;br /&gt;    100007    2   udp    876  ypbind&lt;br /&gt;    100007    1   udp    876  ypbind&lt;br /&gt;    100007    2   tcp    879  ypbind&lt;br /&gt;    100007    1   tcp    879  ypbind&lt;br /&gt; 600100069    1   udp    905  fypxfrd&lt;br /&gt; 600100069    1   tcp    907  fypxfrd&lt;br /&gt;    100011    1   udp    752  rquotad&lt;br /&gt;    100011    2   udp    752  rquotad&lt;br /&gt;    100011    1   tcp    755  rquotad&lt;br /&gt;    100011    2   tcp    755  rquotad&lt;br /&gt;    100003    2   udp   2049  nfs&lt;br /&gt;    100003    3   udp   2049  nfs&lt;br /&gt;    100003    4   udp   2049  nfs&lt;br /&gt;    100021    1   udp  41493  nlockmgr&lt;br /&gt;    100021    3   udp  41493  nlockmgr&lt;br /&gt;    100021    4   udp  41493  nlockmgr&lt;br /&gt;    100003    2   tcp   2049  nfs&lt;br /&gt;    100003    3   tcp   2049  nfs&lt;br /&gt;    100003    4   tcp   2049  nfs&lt;br /&gt;    100021    1   tcp  48865  nlockmgr&lt;br /&gt;    100021    3   tcp  48865  nlockmgr&lt;br /&gt;    100021    4   tcp  48865  nlockmgr&lt;br /&gt;    100005    1   udp    766  mountd&lt;br /&gt;    100005    1   tcp    769  mountd&lt;br /&gt;    100005    2   udp    766  mountd&lt;br /&gt;    100005    2   tcp    769  mountd&lt;br /&gt;    100005    3   udp    766  mountd&lt;br /&gt;    100005    3   tcp    769  mountd&lt;br /&gt;    100024    1   udp    823  status&lt;br /&gt;    100024    1   tcp    826  status&lt;br /&gt;    100009    1   udp    867  yppasswdd&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The ypbind and ypxfrd daemons won't start properly until after you initialize the NIS domain. You'll start these daemons after initialization is completed. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Initialize Your NIS Domain&lt;br /&gt;&lt;br /&gt;[root@freedom ~]#/usr/lib/yp/ypinit -m&lt;br /&gt;At this point, we have to construct a list of the hosts which will run NIS &lt;br /&gt;servers.  freedom is in the list of NIS server hosts.  Please continue to add&lt;br /&gt;the names for the other hosts, one per line.  When you are done with the&lt;br /&gt;list, type a &lt;control D&gt;.&lt;br /&gt;        next host to add:  freedom&lt;br /&gt;        next host to add:&lt;br /&gt;The current list of NIS servers looks like this:&lt;br /&gt; &lt;br /&gt;freedom&lt;br /&gt; &lt;br /&gt;Is this correct?  [y/n: y]  y&lt;br /&gt;We need a few minutes to build the databases...&lt;br /&gt;Building .........&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;freedom has been set up as a NIS master server.&lt;br /&gt; &lt;br /&gt;Now you can run ypinit -s freedom on all slave server.&lt;br /&gt;&lt;br /&gt;Start The ypbind and ypxfrd Daemons&lt;br /&gt;&lt;br /&gt;# service ypbind start&lt;br /&gt;# service ypxfrd start&lt;br /&gt;&lt;br /&gt;# chkconfig ypbind on&lt;br /&gt;# chkconfig ypxfrd on&lt;br /&gt;&lt;br /&gt;Make Sure The Daemons Are Running&lt;br /&gt;[root@freedom ~]# rpcinfo -p localhost&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Adding New NIS Users:&lt;br /&gt;&lt;br /&gt;#useradd nisuser&lt;br /&gt;#passwd nisuser&lt;br /&gt;&lt;br /&gt;#cd /var/yp&lt;br /&gt;#make&lt;br /&gt;&lt;br /&gt;whenever you add a new user, please make sure to go to /var/yp and run "make" command&lt;br /&gt;&lt;br /&gt;You can check to see if the user's authentication information has been updated by using the ypmatch command, which should return the user's encrypted password string. &lt;br /&gt;&lt;br /&gt;[root@freedom ~]# ypmatch nisuser passwd&lt;br /&gt;nisuser:$1$0TeJhdDy$HY.DWfJGdTEphrcJB5XAP/:507:507::/home/nisuser:/bin/bash&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# getent passwd nisuser&lt;br /&gt;nisuser:x:507:507::/home/nisuser:/bin/bash&lt;br /&gt;&lt;br /&gt;Configuration of NIS server is completed!!&lt;br /&gt;&lt;br /&gt;Configuring The NIS Client&lt;br /&gt;&lt;br /&gt;Run authconfig&lt;br /&gt;&lt;br /&gt;The authconfig or the authconfig-tui program automatically configures your NIS files after prompting you for the IP address and domain of the NIS server. &lt;br /&gt;&lt;br /&gt;#authconfig-tui&lt;br /&gt;&lt;br /&gt;Once finished, it should create an /etc/yp.conf file that defines, amongst other things, the IP address of the NIS server for a particular domain. It also edits the /etc/sysconfig/network file to define the NIS domain to which the NIS client belongs.&lt;br /&gt;&lt;br /&gt;# /etc/yp.conf - ypbind configuration file&lt;br /&gt;domain free.com server 192.168.1.3&lt;br /&gt;&lt;br /&gt;#/etc/sysconfig/network&lt;br /&gt;NISDOMAIN=free.com&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In addition, the authconfig program updates the /etc/nsswitch.conf file that lists the order in which certain data sources should be searched for name lookups, such as those in DNS, LDAP, and NIS. Here you can see where NIS entries were added for the important login files. &lt;br /&gt;&lt;br /&gt;#/etc/nsswitch.conf&lt;br /&gt;passwd:     files nis&lt;br /&gt;shadow:     files nis&lt;br /&gt;group:      files nis&lt;br /&gt;&lt;br /&gt;Start The NIS Client Related Daemons&lt;br /&gt;&lt;br /&gt;# service portmap start&lt;br /&gt;# service ypbind start&lt;br /&gt;# chkconfig ypbind on&lt;br /&gt;# chkconfig portmap on&lt;br /&gt;&lt;br /&gt;Note: Remember to use the rpcinfo -p localhost command to make sure they all started correctly. &lt;br /&gt;&lt;br /&gt;Test NIS Access To The NIS Server&lt;br /&gt;&lt;br /&gt;You can run the ypcat, ypmatch, and getent commands to make sure communication to the server is correct.&lt;br /&gt;&lt;br /&gt;[root@wisdom ~]# ypcat passwd&lt;br /&gt;nisuser:$1$0TeJhdDy$HY.DWfJGdTEphrcJB5XAP/:507:507::/home/nisuser:/bin/bash&lt;br /&gt;nis2:$1$94fzrnHN$DI16sL.ch51EbRPxujigI/:508:508::/home/nis2:/bin/bash&lt;br /&gt;&lt;br /&gt;[root@wisdom ~]# ypmatch nisuser passwd&lt;br /&gt;nisuser:$1$0TeJhdDy$HY.DWfJGdTEphrcJB5XAP/:507:507::/home/nisuser:/bin/bash&lt;br /&gt;&lt;br /&gt;[root@wisdom ~]# getent passwd nisuser&lt;br /&gt;nisuser:$1$0TeJhdDy$HY.DWfJGdTEphrcJB5XAP/:507:507::/home/nisuser:/bin/bash&lt;br /&gt;&lt;br /&gt;It looks all is well.&lt;br /&gt;&lt;br /&gt;NIS client configuration is completed!!&lt;br /&gt;&lt;br /&gt;We can now try connecting to wisdom server using nisuser/passwd that was set up on NIS server. The output is, we will be able to connect to the server fine and authentication was successful. But the problem is home directory, it tries to load the home directory from the local computer (wisdom) and gives an error.&lt;br /&gt;chroot unable to mount the /home directory..&lt;br /&gt;&lt;br /&gt;To fix this we need to set up a NFS server to mount all our nisuser home directories automatically (using automounter)&lt;br /&gt;&lt;br /&gt;Configuring The NFS Server&lt;br /&gt;&lt;br /&gt;1. Edit the /etc/exports file to allow NFS mounts of the /home directory with read/write access.&lt;br /&gt;&lt;br /&gt;/home                   *(rw,sync)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# exportfs -ra&lt;br /&gt;&lt;br /&gt;# chkconfig nfslock on&lt;br /&gt;# chkconfig nfs on&lt;br /&gt;# chkconfig portmap on&lt;br /&gt;# service portmap start&lt;br /&gt;# service nfslock start&lt;br /&gt;# service nfs start&lt;br /&gt;&lt;br /&gt;[root@freedom ~]# showmount -e localhost&lt;br /&gt;Export list for localhost:&lt;br /&gt;/home *&lt;br /&gt;/test 192.168.1.4&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Configuring The NFS Client:&lt;br /&gt;&lt;br /&gt;1. Make sure the required netfs, nfslock, and portmap daemons are running and configured to start after the next reboot. &lt;br /&gt;&lt;br /&gt;# chkconfig nfslock on&lt;br /&gt;# chkconfig netfs on&lt;br /&gt;# chkconfig portmap on&lt;br /&gt;# service portmap start&lt;br /&gt;# service netfs start&lt;br /&gt;# service nfslock start&lt;br /&gt;&lt;br /&gt;2. Keep a copy of the old /home directory, and create a new directory /home on which you'll mount the NFS server's directory.&lt;br /&gt;&lt;br /&gt;# mv /home /home.old&lt;br /&gt;# mkdir /home&lt;br /&gt;&lt;br /&gt;3. Make sure you can mount freedom's /home directory on the new /home directory you just created. Unmount it once everything looks correct. &lt;br /&gt;&lt;br /&gt;# mount 192.168.1.3:/home /home/&lt;br /&gt;&lt;br /&gt;# umount /home&lt;br /&gt;&lt;br /&gt;4. Start configuring autofs automounting. Edit your /etc/auto.master file to refer to file /etc/auto.misc for mounting information whenever the /home directory is accessed. After five minutes, autofs unmounts the directory.&lt;br /&gt;&lt;br /&gt;#/etc/auto.master&lt;br /&gt;/home      /etc/auto.misc --timeout 600&lt;br /&gt;&lt;br /&gt;5. Edit file /etc/auto.misc to do the NFS mount whenever the /home directory is accessed. &lt;br /&gt;&lt;br /&gt;*    -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp  192.168.1.3:/home/&amp;&lt;br /&gt;&lt;br /&gt;Start autofs and make sure it starts after the next reboot with the chkconfig command. &lt;br /&gt;&lt;br /&gt;#chkconfig autofs on&lt;br /&gt;#service autofs restart&lt;br /&gt;&lt;br /&gt;Now the NIS user was able to login and mount the home directoy..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-2480317193662284518?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/2480317193662284518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/08/setting-up-nis-server-on-linux-rhel-53.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/2480317193662284518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/2480317193662284518'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/08/setting-up-nis-server-on-linux-rhel-53.html' title='Setting up a NIS Server on LINUX (RHEL 5.3)'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-5191280275200768547</id><published>2009-07-24T04:10:00.000-07:00</published><updated>2009-07-24T04:14:19.590-07:00</updated><title type='text'>How to find the WWN (World Wide Name) in Sun Solaris</title><content type='html'>World Wide Name (WWN) are unique 8 byte (64-bit) identifiers in SCSI or fibre channel similar to that of MAC Addresses on a Network Interface Card (NIC).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Talking about the WWN names, there are also&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;World Wide port Name (WWpN), a WWN assigned to a port on a Fabric which is what you would be looking for most of the time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;World Wide node Name (WWnN), a WWN assigned to a node/device on a Fibre Channel fabric.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To find the WWN numbers of your HBA card in Sun Solaris, you can use one the following procedures&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using fcinfo (Solaris 10 only)&lt;br /&gt;&lt;br /&gt;This is probably the easiest way to find the WWN numbers on your HBA card. Here you can see the HBA Port WWN (WWpN) and the Node WWN (WWnN) of the two ports on the installed Qlogic HAB card.&lt;br /&gt;&lt;br /&gt;This is also useful in finding the Model number, Firmwar version FCode, supported and current speeds and the port status of the HBA card/port&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;root@ sunserver:/root# fcinfo hba-port | grep WWN&lt;br /&gt;HBA Port WWN: 2100001b32xxxxxx&lt;br /&gt;Node WWN: 2000001b32xxxxxx&lt;br /&gt;HBA Port WWN: 2101001b32yyyyyy&lt;br /&gt;Node WWN: 2001001b32yyyyyy&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using scli:&lt;br /&gt;&lt;br /&gt;bash-3.00# /opt/QLogic_Corporation/SANsurferCLI/scli -i | egrep "Node Name|Port Name"&lt;br /&gt;Error: Cannot open/read the menu configuration file - /etc/menu.properties!&lt;br /&gt;Node Name                  : 20-00-00-E0-8B-8A-5D-1E&lt;br /&gt;Port Name                  : 21-00-00-E0-8B-8A-5D-1E&lt;br /&gt;Node Name                  : 20-00-00-E0-8B-19-2B-A0&lt;br /&gt;Port Name                  : 21-00-00-E0-8B-19-2B-A0&lt;br /&gt;&lt;br /&gt;Using prtconf:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bash-3.00# prtconf -vp | grep -i wwn&lt;br /&gt;            adapter-wwn:  210000e0.8b8a5d1e&lt;br /&gt;            adapter-wwn:  210000e0.8b192ba0&lt;br /&gt;&lt;br /&gt;Using prtpicl:&lt;br /&gt;&lt;br /&gt;bash-3.00# prtpicl -v | grep wwn&lt;br /&gt;              :adapter-wwn       21  00  00  e0  8b  8a  5d  1e&lt;br /&gt;              :adapter-wwn       21  00  00  e0  8b  19  2b  a0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to find the WWN (World Wide Name) in Sun Solaris&lt;br /&gt;February 10, 2009 · Filed Under hardware &lt;br /&gt;&lt;br /&gt;World Wide Name (WWN) are unique 8 byte (64-bit) identifiers in SCSI or fibre channel similar to that of MAC Addresses on a Network Interface Card (NIC).&lt;br /&gt;&lt;br /&gt;Talking about the WWN names, there are also&lt;br /&gt;&lt;br /&gt;World Wide port Name (WWpN), a WWN assigned to a port on a Fabric which is what you would be looking for most of the time.&lt;br /&gt;&lt;br /&gt;World Wide node Name (WWnN), a WWN assigned to a node/device on a Fibre Channel fabric.&lt;br /&gt;&lt;br /&gt;To find the WWN numbers of your HBA card in Sun Solaris, you can use one the following procedures&lt;br /&gt;&lt;br /&gt;Using fcinfo (Solaris 10 only)&lt;br /&gt;&lt;br /&gt;This is probably the easiest way to find the WWN numbers on your HBA card. Here you can see the HBA Port WWN (WWpN) and the Node WWN (WWnN) of the two ports on the installed Qlogic HAB card.&lt;br /&gt;&lt;br /&gt;This is also useful in finding the Model number, Firmwar version FCode, supported and current speeds and the port status of the HBA card/port.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root# fcinfo hba-port | grep WWN&lt;br /&gt;    HBA Port WWN: 2100001b32xxxxxx&lt;br /&gt;    Node WWN: 2000001b32xxxxxx&lt;br /&gt;    HBA Port WWN: 2101001b32yyyyyy&lt;br /&gt;    Node WWN: 2001001b32yyyyyy&lt;br /&gt;&lt;br /&gt;For detailed info including Make &amp; model number, Firmware, Fcode and current status and supported/current speeds then&lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root# fcinfo hba-port&lt;br /&gt;    HBA Port WWN: 2100001b32xxxxxx&lt;br /&gt;    OS Device Name: /dev/cfg/c2&lt;br /&gt;    Manufacturer: QLogic Corp.&lt;br /&gt;    Model: 375-3356-02&lt;br /&gt;    Firmware Version: 4.04.01&lt;br /&gt;    FCode/BIOS Version:  BIOS: 1.24; fcode: 1.24; EFI: 1.8;&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: 2000001b32xxxxxx&lt;br /&gt;    HBA Port WWN: 2101001b32yyyyyy&lt;br /&gt;    OS Device Name: /dev/cfg/c3&lt;br /&gt;    Manufacturer: QLogic Corp.&lt;br /&gt;    Model: 375-3356-02&lt;br /&gt;    Firmware Version: 4.04.01&lt;br /&gt;    FCode/BIOS Version:  BIOS: 1.24; fcode: 1.24; EFI: 1.8;&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: 2001001b32yyyyyy&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Using scli&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root# scli -i | egrep “Node Name|Port Name”&lt;br /&gt;    Node Name                  : 20-00-00-1B-32-XX-XX-XX&lt;br /&gt;    Port Name                  : 21-00-00-1B-32-XX-XX-XX&lt;br /&gt;    Node Name                  : 20-01-00-1B-32-YY-YY-YY&lt;br /&gt;    Port Name                  : 21-01-00-1B-32-YY-YY-YY&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;For more detailed info on the HBA Cards run as follows: Similar to fcinfo but also provides Model Name and serial number.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root# scli -i&lt;br /&gt;    ——————————————————————————&lt;br /&gt;    Host Name                  : sunserver&lt;br /&gt;    HBA Model                  : QLE2462&lt;br /&gt;    HBA Alias                  :&lt;br /&gt;    Port                       : 1&lt;br /&gt;    Port Alias                 :&lt;br /&gt;    Node Name                  : 20-00-00-1B-32-XX-XX-XX&lt;br /&gt;    Port Name                  : 21-00-00-1B-32-XX-XX-XX&lt;br /&gt;    Port ID                    : 11-22-33&lt;br /&gt;    Serial Number              : AAAAAAA-bbbbbbbbbb&lt;br /&gt;    Driver Version             : qlc-20080514-2.28&lt;br /&gt;    FCode Version              : 1.24&lt;br /&gt;    Firmware Version           : 4.04.01&lt;br /&gt;    HBA Instance               : 2&lt;br /&gt;    OS Instance                : 2&lt;br /&gt;    HBA ID                     : 2-QLE2462&lt;br /&gt;    OptionROM BIOS Version     : 1.24&lt;br /&gt;    OptionROM FCode Version    : 1.24&lt;br /&gt;    OptionROM EFI Version      : 1.08&lt;br /&gt;    OptionROM Firmware Version : 4.00.26&lt;br /&gt;    Actual Connection Mode     : Point to Point&lt;br /&gt;    Actual Data Rate           : 2 Gbps&lt;br /&gt;    PortType (Topology)        : NPort&lt;br /&gt;    Total Number of Devices    : 2&lt;br /&gt;    HBA Status                 : Online&lt;br /&gt;    ——————————————————————————&lt;br /&gt;    Host Name                  : sunserver&lt;br /&gt;    HBA Model                  : QLE2462&lt;br /&gt;    HBA Alias                  :&lt;br /&gt;    Port                       : 2&lt;br /&gt;    Port Alias                 :&lt;br /&gt;    Node Name                  : 20-01-00-1B-32-YY-YY-YY&lt;br /&gt;    Port Name                  : 21-01-00-1B-32-YY-YY-YY&lt;br /&gt;    Port ID                    : 00-00-00&lt;br /&gt;    Serial Number              : AAAAAAA-bbbbbbbbbb&lt;br /&gt;    Driver Version             : qlc-20080514-2.28&lt;br /&gt;    FCode Version              : 1.24&lt;br /&gt;    Firmware Version           : 4.04.01&lt;br /&gt;    HBA Instance               : 3&lt;br /&gt;    OS Instance                : 3&lt;br /&gt;    HBA ID                     : 3-QLE2462&lt;br /&gt;    OptionROM BIOS Version     : 1.24&lt;br /&gt;    OptionROM FCode Version    : 1.24&lt;br /&gt;    OptionROM EFI Version      : 1.08&lt;br /&gt;    OptionROM Firmware Version : 4.00.26&lt;br /&gt;    Actual Connection Mode     : Unknown&lt;br /&gt;    Actual Data Rate           : Unknown&lt;br /&gt;    PortType (Topology)        : Unidentified&lt;br /&gt;    Total Number of Devices    : 0&lt;br /&gt;    HBA Status                 : Loop down&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Using prtconf&lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root# prtconf -vp | grep -i wwn&lt;br /&gt;    port-wwn:  2100001b.32xxxxxx&lt;br /&gt;    node-wwn:  2000001b.32xxxxxx&lt;br /&gt;    port-wwn:  2101001b.32yyyyyy&lt;br /&gt;    node-wwn:  2001001b.32yyyyyy&lt;br /&gt;&lt;br /&gt;Using prtpicl&lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root# prtpicl -v | grep wwn&lt;br /&gt;    :node-wwn  20  00  00  1b  32  xx  xx  xx&lt;br /&gt;    :port-wwn  21  00  00  1b  32  xx  xx  xx&lt;br /&gt;    :node-wwn  20  01  00  1b  32  yy  yy  yy&lt;br /&gt;    :port-wwn  21  01  00  1b  32  yy  yy  yy&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Using luxadm:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Run the following command to obtain the physical path to the HBA Ports&lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root$ luxadm -e port&lt;br /&gt;    /devices/pci@400/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl              CONNECTED&lt;br /&gt;    /devices/pci@400/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0:devctl            NOT CONNECTED&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;With the physical path obtained from the above command, we can trace the WWN numbers as follows. here I use the physical path to the one that is connected:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    root@ sunserver:/root$ luxadm -e dump_map /devices/pci@400/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl&lt;br /&gt;    Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type&lt;br /&gt;    0    123456  0         1111111111111111 2222222222222222 0×0  (Disk device)&lt;br /&gt;    1    789123  0         1111111111111111 2222222222222222 0×0  (Disk device)&lt;br /&gt;    2    453789  0         2100001b32xxxxxx 2000001b32xxxxxx 0×1f (Unknown Type,Host Bus Adapter)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-5191280275200768547?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/5191280275200768547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/07/how-to-find-wwn-world-wide-name-in-sun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/5191280275200768547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/5191280275200768547'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/07/how-to-find-wwn-world-wide-name-in-sun.html' title='How to find the WWN (World Wide Name) in Sun Solaris'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-7880031986858335864</id><published>2009-07-24T02:48:00.000-07:00</published><updated>2009-07-24T02:49:50.121-07:00</updated><title type='text'>NFS server set up on Solaris 10</title><content type='html'>NFS server set up (Quick Steps):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;vi /etc/dfs/dfshare&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;share -F nfs -o rw /temp-bkup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;svcadm enable nfs/server&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ps -ef | grep nfs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;share  ( to see what has been shared)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Go to client machine and mount that nfs share&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mkdir /temp-bkup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mount -F nfs -o rw rtb3:/temp-bkup /temp-bkup&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mount -F nfs -o rw,hard,bg,proto=tcp,suid,rsize=32768,wsize=32768,intr,noac rtb3:/temp-bkup /temp-bkup&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-7880031986858335864?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/7880031986858335864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/07/nfs-server-set-up-on-solaris-10.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7880031986858335864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/7880031986858335864'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/07/nfs-server-set-up-on-solaris-10.html' title='NFS server set up on Solaris 10'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-4073397412680257611</id><published>2009-07-09T04:02:00.000-07:00</published><updated>2009-07-09T04:12:33.776-07:00</updated><title type='text'>Add a LUN from CX to a Solaris Server</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cshankara%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:449740140; 	mso-list-type:hybrid; 	mso-list-template-ids:-1198227574 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l0:level2 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	text-indent:-.25in;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Open      Navisphere Global  and login (using login credentials)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;ol style="margin-top: 0in;" start="2" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;choose      the Clariion connected to your host&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;open      the storage groups tab and locate the group with your host attached to it.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Right      click on the storage group and select “select luns”&lt;/li&gt;&lt;ol style="margin-top: 0in;" start="1" type="a"&gt;&lt;li class="MsoNormal" style=""&gt;A       window will appear and all available drives are listed on the left.&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="5" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;choose      the number of luns and move them to the right of the window, click ok&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cshankara%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:419764540; 	mso-list-type:hybrid; 	mso-list-template-ids:-1922157512 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l0:level2 	{mso-level-number-format:alpha-lower; 	mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l0:level3 	{mso-level-number-format:roman-lower; 	mso-level-tab-stop:1.5in; 	mso-level-number-position:right; 	text-indent:-9.0pt;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;On the Solaris System&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Verify      the /kernel/drv/sd.conf has enough entries to handle the additional luns&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;ol style="margin-top: 0in;" start="1" type="a"&gt;&lt;li class="MsoNormal" style=""&gt;Example,       if there are 100 disk entries in the sd.conf file and you are adding a       101th LUN, you will need to make the following entry in the sd.conf file:&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 1.5in; text-indent: -1.5in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                                                               &lt;/span&gt;i.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;      &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;name="sd" class="scsi"&lt;span style=""&gt;  &lt;/span&gt;target=48 lun=101 (assumes target is already set to 48)&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1.5in; text-indent: -1.5in;"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="2" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;run      update_drv -f sd&lt;span style=""&gt;   &lt;/span&gt;to import the      luns into solaris&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;run      devfsadm -Cv&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;run      powercf –q&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;run      powermt config&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;verify      newly added luns are visible via format&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;In-Detail::::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cshankara%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:344357525; 	mso-list-type:hybrid; 	mso-list-template-ids:-1928320564 67698703 67698689 67698689 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l0:level2 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} @list l0:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:117.0pt; 	mso-level-number-position:left; 	margin-left:117.0pt; 	text-indent:-.25in; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;Login to  and switch to root user&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;run /usr/sbin/update_drv      –f sd &lt;span style=""&gt;  &lt;/span&gt;(this auto updates Solaris      with the new lun)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;run /usr/sbin/devfsadm      -Cv&lt;span style=""&gt;   &lt;/span&gt;(this auto updates Solaris      with the devices)&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;run      powermt display (retrieve listing of total # of devices)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;OUTPUT:&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;root@sol-test # powermt display&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Symmetrix logical device count=0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;CLARiiON logical device count=474&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;==============================================================================&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;----- Host Bus Adapters ---------&lt;span style=""&gt;  &lt;/span&gt;------ I/O Paths -----&lt;span style=""&gt;  &lt;/span&gt;------ Stats ------&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;### HW Path&lt;span style=""&gt;                        &lt;/span&gt;Summary&lt;span style=""&gt;   &lt;/span&gt;Total&lt;span style=""&gt;   &lt;/span&gt;Dead&lt;span style=""&gt;  &lt;/span&gt;IO/Sec Q-IOs Errors&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;==============================================================================&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1280 pci@8/fibre-channel@2&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style=""&gt; &lt;/span&gt;510&lt;/b&gt;&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1281 pci@8/fibre-channel@3&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;     &lt;/span&gt;438&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1282 pci@9/fibre-channel@3&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;     &lt;/span&gt;&lt;b style=""&gt;510&lt;/b&gt;&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1283 pci@9/fibre-channel@4&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;     &lt;/span&gt;438&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="4" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;run      powercf –q&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;run      powermt config&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;run      powermt display (the # of disks should have increased)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cshankara%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:344357525; 	mso-list-type:hybrid; 	mso-list-template-ids:-1928320564 67698703 67698689 67698689 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l0:level2 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} @list l0:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:117.0pt; 	mso-level-number-position:left; 	margin-left:117.0pt; 	text-indent:-.25in; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;OUTPUT:&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Symmetrix logical device count=0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;CLARiiON logical device count=474&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;==============================================================================&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;----- Host Bus Adapters ---------&lt;span style=""&gt;  &lt;/span&gt;------ I/O Paths -----&lt;span style=""&gt;  &lt;/span&gt;------ Stats ------&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;### HW Path&lt;span style=""&gt;              &lt;/span&gt;&lt;span style=""&gt;          &lt;/span&gt;Summary&lt;span style=""&gt;   &lt;/span&gt;Total&lt;span style=""&gt;   &lt;/span&gt;Dead&lt;span style=""&gt;  &lt;/span&gt;IO/Sec Q-IOs Errors&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;==============================================================================&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1280 pci@8/fibre-channel@2&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style=""&gt; &lt;/span&gt;512&lt;/b&gt;&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1281 pci@8/fibre-channel@3&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;   &lt;/span&gt;438&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1282 pci@9/fibre-channel@3&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;    &lt;/span&gt;&lt;b style=""&gt;&lt;span style=""&gt; &lt;/span&gt;512&lt;/b&gt;&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;1283 pci@9/fibre-channel@4&lt;span style=""&gt;         &lt;/span&gt;optimal&lt;span style=""&gt;     &lt;/span&gt;438&lt;span style=""&gt;      &lt;/span&gt;0&lt;span style=""&gt;       &lt;/span&gt;-&lt;span style=""&gt;     &lt;/span&gt;0&lt;span style=""&gt;      &lt;/span&gt;0&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cshankara%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:.5in .5in .5in .5in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:344357525; 	mso-list-type:hybrid; 	mso-list-template-ids:-1928320564 67698703 67698689 67698689 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l0:level2 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} @list l0:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:117.0pt; 	mso-level-number-position:left; 	margin-left:117.0pt; 	text-indent:-.25in; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Verify      output by running the format command on solaris and label all the new      disks.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Bring      it into veritas by running vxdctl enable.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;View      the new disk using&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 117pt; text-indent: -63pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;vxdisk list&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="4" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Format      the new disk and label it&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;format       c2t16d11&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;Set up the new disk using&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;vxdisksetup       -i c2t16d11 format=sliced&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;Add the newdisk to a disk group using&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;vxdg       init dg01 disk01=c2t16d10s2 cds=off&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;Create a new file system using&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;/usr/sbin/vxassist       -g dg01 -U fsgen make testfs 32g layout=nolog user=oracle group=dba       mode=0755 disk01&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;Create a mount point for the new file      system&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;mkdir       /testdata&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;Place a new file system on the device&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;newfs       -v /dev/vx/rdsk/dg01/testfs&lt;/li&gt;&lt;/ul&gt;&lt;li class="MsoNormal" style=""&gt;Mount      the file system&lt;/li&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;mount       /dev/vx/dsk/dg01/testfs /testdata&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-4073397412680257611?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/4073397412680257611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/07/add-lun-from-cx-to-solaris-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/4073397412680257611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/4073397412680257611'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/07/add-lun-from-cx-to-solaris-server.html' title='Add a LUN from CX to a Solaris Server'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-1148503396230518894</id><published>2009-07-09T03:35:00.000-07:00</published><updated>2009-07-09T03:55:22.134-07:00</updated><title type='text'>Compile and Installation of GCC compiler (version: gcc-3.2.3)</title><content type='html'>Host: RedHat Linux 4 ES up 4 (already gcc-3.4.6 installed on this machine).&lt;br /&gt;&lt;br /&gt;Our DEV requires an older version of gcc (gcc-3.2.3) compiler installed on this machine to work. So I downloaded the older version from,&lt;br /&gt;&lt;br /&gt;http://gcc.gnu.org/releases.html&lt;br /&gt;&lt;br /&gt;Here are the steps I did,&lt;br /&gt;&lt;br /&gt;# tar -xvf  gcc-3.2.3.tar&lt;br /&gt;&lt;br /&gt;# cd gcc-3.2.3&lt;br /&gt;&lt;br /&gt;# ./configure --prefix=/opt/gcc-3.2.3 --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux&lt;br /&gt;&lt;br /&gt;This is going to be installed under /opt/gcc-3.2.3 directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# make bootstrap&lt;br /&gt;&lt;br /&gt;This is gonna be taking long time. Once its finished, run make install&lt;br /&gt;&lt;br /&gt;# make install&lt;br /&gt;&lt;br /&gt;This will end the installation. But there are couple of other things you need to take care of.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Post Installation Steps::::&lt;br /&gt;&lt;br /&gt;&lt;span class="ft2"&gt;There are a few tasks that you need to carry out after the installation process of the compilers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setting up PATH variable:::&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="ft1"&gt;export PATH=/opt/gcc-3.2.3/bin:$PATH&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add the above variable to /etc/profile&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Setting the location of libraries::::&lt;br /&gt;&lt;br /&gt;cat /etc/ld.so.conf   (add the following line to it)&lt;br /&gt;&lt;br /&gt;/opt/gcc-3.2.3/lib    (this new line added to the existing file)&lt;br /&gt;/usr/ofed/lib&lt;br /&gt;/opt/OC/lib&lt;br /&gt;/opt/nms/lib&lt;br /&gt;/opt/nms/lib&lt;br /&gt;/usr/lib/Pegasus/providers/&lt;br /&gt;/usr/lib/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After editing this file, execute the &lt;span style="font-weight: bold;"&gt;ldconfig&lt;/span&gt; program, which will configure dynamic linker binding&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# ldconfig -v&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The next step is to setup the LD_LIBRARY_PATH variable. You can do this by adding the following line at the end of /etc/profile file so that it is set for all users at login time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;export LD_LIBRARY_PATH=/opt/gcc-3.2.3/lib&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finally, check the version and compilation options,&lt;br /&gt;&lt;br /&gt;#gcc -v&lt;br /&gt;[root@pearl sasam]# gcc -v&lt;br /&gt;Reading specs from /opt/gcc-3.2.3/lib/gcc-lib/i386-redhat-linux/3.2.3/specs&lt;br /&gt;Configured with: ./configure --prefix=/opt/gcc-3.2.3 --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux&lt;br /&gt;Thread model: posix&lt;br /&gt;gcc version 3.2.3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-1148503396230518894?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/1148503396230518894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/07/compile-and-installation-of-gcc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/1148503396230518894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/1148503396230518894'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/07/compile-and-installation-of-gcc.html' title='Compile and Installation of GCC compiler (version: gcc-3.2.3)'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-4241239919261736486</id><published>2009-07-02T02:51:00.001-07:00</published><updated>2009-07-02T02:52:24.921-07:00</updated><title type='text'>HP-UX LVM</title><content type='html'>The Logical Volume Manager (LVM) overcomes the limitations of the whole disk layout scheme by making&lt;br /&gt;it possible to&lt;br /&gt;• Create logical volumes that span multiple disks&lt;br /&gt;• Create multiple logical volumes on a single disk&lt;br /&gt;• Extend and reduce logical volumes as necessary&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Physical Volumes ::::&lt;br /&gt;&lt;br /&gt;A disk managed by LVM is known as a physical volume. Several special data structures must&lt;br /&gt;be created on a disk before it can be used by LVM. Once these data structures have been&lt;br /&gt;created, the disk is considered to be a physical volume, and may be added to a volume group&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Volume Groups:::::&lt;br /&gt;&lt;br /&gt;A volume group is group of one or more physical volumes.physical volumes in a volume group pool a disk space&lt;br /&gt;which may be allocated to one or more logical volumes. Volume groups have the naming convention as,&lt;br /&gt;&lt;br /&gt;/dev/vg00&lt;br /&gt;/dev/vg01&lt;br /&gt;/dev/vg02&lt;br /&gt;&lt;br /&gt;Logical Volumes:&lt;br /&gt;&lt;br /&gt;Disk space from volume group may be allocated to one or more logical volumes. A logical volume is equals to a partition&lt;br /&gt;which may contain a file system , swap , raw data etc&lt;br /&gt;&lt;br /&gt;-&gt; then can span multiple LVM physical volumes&lt;br /&gt;-&gt; resized, extended or even moved to a different disk if needed&lt;br /&gt;&lt;br /&gt;Naming convention for a logical volumes are,&lt;br /&gt;&lt;br /&gt;/dev/vg00/lvol1&lt;br /&gt;/dev/vg00/lvol2&lt;br /&gt;/dev/vg01/lvol5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;LVM device files ::::&lt;br /&gt;&lt;br /&gt;Physical volumes, volume groups, and logical volumes are all referenced via device files, much&lt;br /&gt;as disk devices are referenced via device files&lt;br /&gt;&lt;br /&gt;/dev/dsk -&gt; block pv device files&lt;br /&gt;eg:&lt;br /&gt;/dev/dsk/c0t5d0&lt;br /&gt;/dev/dsk/c0t6d0&lt;br /&gt;&lt;br /&gt;/dev/rdsk -&gt; character raw pv device files&lt;br /&gt;eg:&lt;br /&gt;/dev/rdsk/c0t5d0&lt;br /&gt;/dev/rdsk/c0t6d0&lt;br /&gt;&lt;br /&gt;/dev/vg00  -&gt; volume group device files&lt;br /&gt;/dev/vg00/group  -&gt; volgume group vg00 device file&lt;br /&gt;/dev/vg00/lvol1 -&gt; lvol1 logical volume device file (block lv device file)&lt;br /&gt;/dev/vg00/rlvol1 -&gt; raw lv device file&lt;br /&gt;&lt;br /&gt;/dev/vg00/lvol2  -&gt; block lv (lvol2) device file&lt;br /&gt;/dev/vg00/rlvol2 -&gt; raw lv (lvol2) device file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;physical volumes, volume groups and logical volumes are referenced via device files much like devices for accessing devices (like disk and tape)&lt;br /&gt;&lt;br /&gt;Physical Volumes Device files:&lt;br /&gt;&lt;br /&gt;You can refernece the physical volume using the device file associated with that physical volume. Since disk has referenced using block and raw mode, each physical volumes has both mode device files,&lt;br /&gt;&lt;br /&gt;/dev/dsk/c0t5d0  # block device file for disk at SCSI address 5&lt;br /&gt;/dev/rdsk/c0t5d0  # character device file for disk at SCSI address 5&lt;br /&gt;&lt;br /&gt;Volume group device files::::&lt;br /&gt;&lt;br /&gt;volume groups are referenced using device files. The volume group device files are stored under /dev containg group for device files for volume group vg00 and also device files for all logical volumes present under this volume group&lt;br /&gt;&lt;br /&gt;ex:&lt;br /&gt;/dev/vg00  # you can find all volume group and physical volumes device files here&lt;br /&gt;/dev/vg00/group # referenced the device file for volume group vg00&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Logical Volume Device files ::::&lt;br /&gt;&lt;br /&gt;Logical volume device files are stored in the directory of the volume group to which they&lt;br /&gt;belong. Each logical volume has two device files: one is used when accessing the logical volume&lt;br /&gt;in character mode, the other is used when accessing the logical volume in block mode&lt;br /&gt;&lt;br /&gt;/dev/vg00/lvol1  #block device file for logical volume "lvol1" in vg00&lt;br /&gt;/dev/vg00/rlvol1  #raw or character device file for logical volume "lvol1" in vg00&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;LVM major and minor numbers :::&lt;br /&gt;&lt;br /&gt;unlike other deice files, the logical volumes and volume group device files has major and monior numbers. The major number for all logical volumes are same (it is 64)&lt;br /&gt;&lt;br /&gt;the first two digits on the minor number represents the volgume group to which they(device file) belogs to.and the last two digits represents the logical volume number&lt;br /&gt;&lt;br /&gt;eg, /dev/vg00/lvol2&lt;br /&gt;&lt;br /&gt;major: 64&lt;br /&gt;&lt;br /&gt;minoir: 0x000002&lt;br /&gt;&lt;br /&gt;here, 00 after 0x represents the volume group vg00 in which this logical volume is created.&lt;br /&gt;and 02 is logical volume number which is lvol02&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Questions&lt;br /&gt;If vg02 has three logical volumes created using the default naming convention&lt;br /&gt;&lt;br /&gt;1. What directory would contain the logical volumes’ device files?&lt;br /&gt;ans: /dev/vg02/&lt;br /&gt;     /dev/vg02/&lt;br /&gt;&lt;br /&gt;2. What would be the name of the volume group’s device file?&lt;br /&gt;ans:/dev/vg02/lvol1&lt;br /&gt;     /dev/vg02/rvol1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. What would be the name of the first logical volume’s raw device file?&lt;br /&gt;&lt;br /&gt;     /dev/vg02/rvol1&lt;br /&gt;&lt;br /&gt;4. Overall, how many device files should you find in /dev/vg02?&lt;br /&gt;ans: 6 (3 for block and 3 for raw)&lt;br /&gt;&lt;br /&gt;5. What would be the minor number of the third logical volume’s device file?&lt;br /&gt;the third volume device file is,&lt;br /&gt;/dev/vg02/lvol3&lt;br /&gt;&lt;br /&gt;major: 64&lt;br /&gt;minor:0x02003&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;LVM extends:::&lt;br /&gt;&lt;br /&gt;QQQQQQQQQQQQQQQQQQQQQQQ&lt;br /&gt;what is physical extent&lt;br /&gt;what is logical extent.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The smallest allocatable unit of space in LVM is known as an "Extent."&lt;br /&gt;&lt;br /&gt;A physical volume is broken into "Physical Extents" (PEs), which are made available for allocation when the&lt;br /&gt;physical volume is added to a volume group.&lt;br /&gt;&lt;br /&gt;A logical volume consists of a series of sequentially numbered "Logical Extents" (LEs). Each&lt;br /&gt;logical extent is nothing more than a pointer to a physical extent on disk. Larger logical&lt;br /&gt;volumes have more logical extents, and smaller logical volumes have fewer logical extents. In&lt;br /&gt;order to make a logical volume larger, LVM needs only allocate some additional extents&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Creating Physical Volumes:::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;######################## things need to perform #################3333&lt;br /&gt;&lt;br /&gt;• Create logical volumes that span multiple disks&lt;br /&gt;• Create multiple logical volumes on a single disk&lt;br /&gt;• Extend and reduce logical volumes as necessary&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are two disks present on the system (c0t3d0 and c0t4d0)&lt;br /&gt;&lt;br /&gt;#pvcreate /dev/rdsk/c0t3d0 (why /dev/rdsk why not /dev/dsk)&lt;br /&gt;#pvcreate /dev/rdsk/c0t4d0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute the pvcreate command to create the LVM data structures needed by LVM to&lt;br /&gt;begin using the disk as a physical volume.&lt;br /&gt;&lt;br /&gt;If the disk was previously part of another volume group, you may need to use the -f option on pvcreate. To overwrite any existing LVM or file system structures on the disk.&lt;br /&gt;&lt;br /&gt;# pvcreate -f /dev/rdsk/c0t3d0&lt;br /&gt;# pvcreate -f /dev/rdsk/c0t4d0&lt;br /&gt;&lt;br /&gt;Warning: The -f option should only be used as  a last resort to over write file system or                    volume manager information that cannot properly be removed using the commands  designed for that purpose.  When invoked with  -f, the command does minimal verification, so care should be taken to assure that the disk is not already in use prior to invoking the command.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Your disk is now ready to be added to a new or existing volume group.&lt;br /&gt;&lt;br /&gt;LVM stores information in data structures at the beginning of the Physical Volume.&lt;br /&gt;&lt;br /&gt;Physical Volume Reserved Area (PVRA) contains LVM information specific to that Physical Volume. It is created by the pvcreate command&lt;br /&gt;&lt;br /&gt;Volume Group Reserved Area (VGRA): contains LVM information specific to the entire volume group&lt;br /&gt;&lt;br /&gt;The VGRA is created by vgcreate command.&lt;br /&gt;&lt;br /&gt;Bad Block Relocation Area (BBRA), contains information specific to the bad block&lt;br /&gt;recovery mechanism&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Creating Volume groups:::&lt;br /&gt;&lt;br /&gt;commands:&lt;br /&gt;mkdir /dev/vg01&lt;br /&gt;mknod /dev/vg01/group c 64 0x010000&lt;br /&gt;vgcreate vg01 /dev/rdsk/c0t3d0 /dev/rdsk/c0t4d0&lt;br /&gt;&lt;br /&gt;check:&lt;br /&gt;vgdisplay -v vg01&lt;br /&gt;pvdisplay -v /dev/dsk/c0t3d0&lt;br /&gt;pvdisplay -v /dev/dsk/c0t4d0&lt;br /&gt;&lt;br /&gt;(while creating logical volumes, we take /dev/dsk block device rather than /dev/rdsk for setting up physical volumes at first place)&lt;br /&gt;&lt;br /&gt;detailed:&lt;br /&gt;&lt;br /&gt;Step 1:&lt;br /&gt;&lt;br /&gt;Create a directory for the volume group. The naming convention is /dev/vgnn, where nn is&lt;br /&gt;the volume group number. Use the next number in sequence on your system. If your system is&lt;br /&gt;pre-installed, you already have a volume group /dev/vg00.&lt;br /&gt;&lt;br /&gt;For example, to create volume group 01, which would be the second volume group on your&lt;br /&gt;system, you would type:&lt;br /&gt;&lt;br /&gt;mkdir /dev/vg01&lt;br /&gt;&lt;br /&gt;Step 2:&lt;br /&gt;&lt;br /&gt;The group special file, or control file, provides the means by which LVM kernel and LVM&lt;br /&gt;commands communicate within the volume group you create&lt;br /&gt;&lt;br /&gt;Create the control file named group in the directory /dev/vgnn. Use the mknod(1M)&lt;br /&gt;command. The group file is a character device file. The major number is always 64. The minor&lt;br /&gt;number is hexadecimal, always ends in 0000, and has the following form&lt;br /&gt;&lt;br /&gt;0xhh0000&lt;br /&gt;where hh is the hexadecimal representation of the volume group number.&lt;br /&gt;&lt;br /&gt;For example, to create a group file for a volume group 01, you would type:&lt;br /&gt;&lt;br /&gt;mknod /dev/vg01/group c 64 0x010000&lt;br /&gt;&lt;br /&gt;Step3:&lt;br /&gt;&lt;br /&gt;Now you can create the volume group and specify the physical volumes it will contain. You use&lt;br /&gt;the vgcreate command. You can assign several volumes to a group at one time&lt;br /&gt;&lt;br /&gt;vgcreate /dev/vg01 /dev/dsk/c0t3d0 /dev/dsk/c0t4d0&lt;br /&gt;&lt;br /&gt;******** Note that you are using the block device file to create the volume group ********&lt;br /&gt;&lt;br /&gt;vgcreate options are:::&lt;br /&gt;&lt;br /&gt;-e max_physical_extents - sets the max number of physical extents per physical volume in a vg (1016                                                                                                                                                                                                  default)&lt;br /&gt;&lt;br /&gt;-l max_logical_vols - sets the max number of logical volumes allowed in vg (255 default)&lt;br /&gt;&lt;br /&gt;-p max_physical_vols - set the max number of LVM disks (physical volumes) should be allowed in vg (16)&lt;br /&gt;&lt;br /&gt;-s physical_extent_size - sets the size in mb, for each physical extent in a volume group( 4mb default)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 4:&lt;br /&gt;&lt;br /&gt;You can verify that you have created the volume group using the vgdisplay and pvdisplay&lt;br /&gt;commands&lt;br /&gt;&lt;br /&gt;# vgdisplay -v vg01&lt;br /&gt;&lt;br /&gt;# pvdisplay /dev/dsk/c0t3d0&lt;br /&gt;&lt;br /&gt;# pvdisplay /dev/dsk/c0t4d0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Creating logical Volumes:::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;commands:&lt;br /&gt;&lt;br /&gt;lvcreate -L 16 -n myfs1 vg01&lt;br /&gt;&lt;br /&gt;lvcreate -L 20 -n myfs2 vg01&lt;br /&gt;&lt;br /&gt;check: vgdisplay -v vg01&lt;br /&gt;&lt;br /&gt;        pvdisplay -v /dev/vg01/myfs1&lt;br /&gt;       &lt;br /&gt;       &lt;br /&gt; Create logical volumes in volume groups using the lvcreate(1M) command&lt;br /&gt;&lt;br /&gt; You can allocate disk space for file systems, swap, or raw data in either megabytes or LVM&lt;br /&gt;extents&lt;br /&gt;&lt;br /&gt;When lvcreate creates the logical volume, it creates the block and character device files and&lt;br /&gt;places them in the directory /dev/vgnn. It is created without size unless you specify a size&lt;br /&gt;when you use the lvcreate command. You can create a logical volume using the default&lt;br /&gt;characteristics, and change them later&lt;br /&gt;&lt;br /&gt;-L logical_volume_size - The size of the logical volume in MB.&lt;br /&gt;&lt;br /&gt;-n name            - The name of the logical volume&lt;br /&gt;&lt;br /&gt;-l logical_extents_number  - The number of logical extents in the logical volume.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;examples:&lt;br /&gt;&lt;br /&gt;To create a logical volume with the default characteristics, in the volume group /dev/vg01:&lt;br /&gt;&lt;br /&gt;# lvcreate /dev/vg01&lt;br /&gt;&lt;br /&gt;Only the name will be reserved; neither physical nor logical extents will be reserved. You will&lt;br /&gt;need later to extend the logical volume with the command lvextend&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create a logical volume of 10 logical extents in size&lt;br /&gt;&lt;br /&gt;lvcreate -l 10 /dev/vg01&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create a logical volume with a size of 100 Mbyte: (standared name is lvol3, lvol4 etc)&lt;br /&gt;&lt;br /&gt;lvcreate -L 100 /dev/vg01&lt;br /&gt;&lt;br /&gt;To create a logical volume with a non-standard name&lt;br /&gt;&lt;br /&gt;lvcreate -L 100 -n myfs1 /dev/vg01&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Viewing Your Logical Volumes::::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;lvdisplay -v /dev/vg01/myfs1  # view details about the "myswap" LV&lt;br /&gt;&lt;br /&gt;vgdisplay -v vg01   # to determine which LV’s are in vg01&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Practicals ::::&lt;br /&gt;&lt;br /&gt;Q.How many disks do you have on your system? Determine each disk’s hardware path and&lt;br /&gt;device file names&lt;br /&gt;&lt;br /&gt;Ans: bash-3.2# ioscan -funC disk&lt;br /&gt;Class     I  H/W Path       Driver     S/W State   H/W Type     Description&lt;br /&gt;============================================================================&lt;br /&gt;disk      0  0/0/3/0.0.0.0  sdisk      CLAIMED     DEVICE       TEAC    DV-28E-C&lt;br /&gt;                           /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0&lt;br /&gt;disk      2  0/1/1/0.1.0    sdisk      CLAIMED     DEVICE       HP 146 GST3146707LC&lt;br /&gt;                           /dev/dsk/c2t1d0   /dev/rdsk/c2t1d0&lt;br /&gt;disk      1  0/1/1/1.0.0    sdisk      CLAIMED     DEVICE       HP 146 GST3146707LC&lt;br /&gt;                           /dev/dsk/c3t0d0   /dev/rdsk/c3t0d0&lt;br /&gt;&lt;br /&gt;two disks of 146 GB&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. /dev/dsk/c2t1d0   /dev/rdsk/c2t1d0&lt;br /&gt;2. /dev/dsk/c3t0d0   /dev/rdsk/c3t0d0&lt;br /&gt;&lt;br /&gt;Q.Use vgdisplay to determine which of the disks on your system are already members of&lt;br /&gt;active volume groups. You should have at least one disk that isn’t currently in a volume group.&lt;br /&gt;Note the free disk’s device filename; you will create a new volume group using your free disk&lt;br /&gt;in the next part of the lab exercise&lt;br /&gt;&lt;br /&gt;ans:bash-3.2# vgdisplay&lt;br /&gt;--- Volume groups ---&lt;br /&gt;VG Name                     /dev/vg00&lt;br /&gt;VG Write Access             read/write&lt;br /&gt;VG Status                   available&lt;br /&gt;Max LV                      255&lt;br /&gt;Cur LV                      10&lt;br /&gt;Open LV                     10&lt;br /&gt;Max PV                      16&lt;br /&gt;Cur PV                      1&lt;br /&gt;Act PV                      1&lt;br /&gt;Max PE per PV               4384&lt;br /&gt;VGDA                        2&lt;br /&gt;PE Size (Mbytes)            32&lt;br /&gt;Total PE                    4374&lt;br /&gt;Alloc PE                    3143&lt;br /&gt;Free PE                     1231&lt;br /&gt;Total PVG                   0&lt;br /&gt;Total Spare PVs             0&lt;br /&gt;Total Spare PVs in use      0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q.Before adding a disk to a volume group, you may want to check the size of the disk. This is&lt;br /&gt;accomplished via the diskinfo command. How large is your spare disk?&lt;br /&gt;&lt;br /&gt;ans:&lt;br /&gt;&lt;br /&gt;disk      2  0/1/1/0.1.0    sdisk      CLAIMED     DEVICE       HP 146 GST3146707LC&lt;br /&gt;                           /dev/dsk/c2t1d0   /dev/rdsk/c2t1d0&lt;br /&gt;&lt;br /&gt;/dev/rdsk/c2t1d0 is the free disk where we create lvm&lt;br /&gt;&lt;br /&gt;bash-3.2# diskinfo /dev/rdsk/c2t1d0&lt;br /&gt;SCSI describe of /dev/rdsk/c2t1d0:&lt;br /&gt;             vendor: HP 146 G&lt;br /&gt;         product id: ST3146707LC&lt;br /&gt;               type: direct access&lt;br /&gt;               size: 143374744 Kbytes&lt;br /&gt;   bytes per sector: 512&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bash-3.2# diskinfo -v /dev/rdsk/c2t1d0&lt;br /&gt;SCSI describe of /dev/rdsk/c2t1d0:&lt;br /&gt;             vendor: HP 146 G&lt;br /&gt;         product id: ST3146707LC&lt;br /&gt;               type: direct access&lt;br /&gt;               size: 143374744 Kbytes&lt;br /&gt;   bytes per sector: 512&lt;br /&gt;          rev level: HPC1&lt;br /&gt;    blocks per disk: 286749488&lt;br /&gt;        ISO version: 0&lt;br /&gt;       ECMA version: 0&lt;br /&gt;       ANSI version: 3&lt;br /&gt;    removable media: no&lt;br /&gt;    response format: 2&lt;br /&gt;   (Additional inquiry bytes: (32)4b (33)53 (34)31 (35)32 (36)53 (37)4d (38)4c (39)20 (40)20 (41)20 (42)20 (43)20 (44)20 (45)20 (46)20 (47)20 (48)20 (49)20 (50)20 (51)f (52)0 (53)0 (54)60 (55)a (56)dc (57)b (58)59 (59)3 (60)1 (61)3 (62)22 (63)0 (64)0 (65)0 (66)0 (67)0 (68)0 (69)0 (70)0 (71)0 (72)0 (73)0 (74)0 (75)0 (76)0 (77)0 (78)0 (79)0 (80)0 (81)0 (82)0 (83)0 (84)0 (85)0 (86)0 (87)0 (88)0 (89)0 (90)0 (91)0 (92)43 (93)6f (94)70 (95)79 (96)72 (97)69 (98)67 (99)68 (100)74 (101)20 (102)28 (103)63 (104)29 (105)20 (106)32 (107)30 (108)30 (109)35 (110)20 (111)53 (112)65 (113)61 (114)67 (115)61 (116)74 (117)65 (118)20 (119)41 (120)6c (121)6c (122)20 (123)0 (124)0 (125)0 (126)0 (127)11 (128)17 (129)73 (130)30 (131)0 (132)0 (133)2 (134)0 (135)0 (136)0 (137)0 (138)0 )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;II. Creating a Physical Volume, Volume Group, and Logical Volumes:::&lt;br /&gt;&lt;br /&gt;1.Configure your free disk as an LVM physical volume&lt;br /&gt;ans:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bash-3.2# pvcreate -f /dev/rdsk/c2t1d0&lt;br /&gt;Physical volume "/dev/rdsk/c2t1d0" has been successfully created.&lt;br /&gt;&lt;br /&gt;Q:Create a new vg01 volume group using your newly created physical volume&lt;br /&gt;&lt;br /&gt;vgcreate -s 32 vg01 /dev/dsk/c2t1d0&lt;br /&gt;&lt;br /&gt;Q Use vgdisplay and pvdisplay to check the status of your new physical volume and&lt;br /&gt;volume group. How many physical volumes are in the volume group at this point? How many&lt;br /&gt;logical volumes are in the volume group at this point? What is the extent size?&lt;br /&gt;&lt;br /&gt;physical volumes- 1&lt;br /&gt;logical volumes-  0&lt;br /&gt;PE size -32 mb&lt;br /&gt;&lt;br /&gt;bash-3.2# vgdisplay -v vg01&lt;br /&gt;--- Volume groups ---&lt;br /&gt;VG Name                     /dev/vg01&lt;br /&gt;VG Write Access             read/write&lt;br /&gt;VG Status                   available&lt;br /&gt;Max LV                      255&lt;br /&gt;Cur LV                      0&lt;br /&gt;Open LV                     0&lt;br /&gt;Max PV                      16&lt;br /&gt;Cur PV                      1&lt;br /&gt;Act PV                      1&lt;br /&gt;Max PE per PV               4375&lt;br /&gt;VGDA                        2&lt;br /&gt;PE Size (Mbytes)            32&lt;br /&gt;Total PE                    4374&lt;br /&gt;Alloc PE                    0&lt;br /&gt;Free PE                     4374&lt;br /&gt;Total PVG                   0&lt;br /&gt;Total Spare PVs             0&lt;br /&gt;Total Spare PVs in use      0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   --- Physical volumes ---&lt;br /&gt;   PV Name                     /dev/dsk/c2t1d0&lt;br /&gt;   PV Status                   available&lt;br /&gt;   Total PE                    4374&lt;br /&gt;   Free PE                     4374&lt;br /&gt;   Autoswitch                  On&lt;br /&gt;   Proactive Polling           On&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bash-3.2# pvdisplay -v /dev/dsk/c2t1d0&lt;br /&gt;--- Physical volumes ---&lt;br /&gt;PV Name                     /dev/dsk/c2t1d0&lt;br /&gt;VG Name                     /dev/vg01&lt;br /&gt;PV Status                   available&lt;br /&gt;Allocatable                 yes&lt;br /&gt;VGDA                        2&lt;br /&gt;Cur LV                      0&lt;br /&gt;PE Size (Mbytes)            32&lt;br /&gt;Total PE                    4374&lt;br /&gt;Free PE                     4374&lt;br /&gt;Allocated PE                0&lt;br /&gt;Stale PE                    0&lt;br /&gt;IO Timeout (Seconds)        default&lt;br /&gt;Autoswitch                  On&lt;br /&gt;Proactive Polling           On&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   --- Physical extents ---&lt;br /&gt;   PE    Status   LV                      LE&lt;br /&gt;   00000 free                             00000&lt;br /&gt;   00001 free                             00000&lt;br /&gt;   00002 free                             00000&lt;br /&gt;   00003 free                             00000&lt;br /&gt;   00004 free                             00000&lt;br /&gt;   00005 free                             00000&lt;br /&gt;   00006 free                             00000&lt;br /&gt;   00007 free                             00000&lt;br /&gt;   00008 free                             00000&lt;br /&gt;   00009 free                             00000&lt;br /&gt;   00010 free                             00000&lt;br /&gt;   00011 free                             00000&lt;br /&gt;   00012 free                             00000&lt;br /&gt;   00013 free                             00000&lt;br /&gt;   00014 free                             00000&lt;br /&gt;   00015 free                             00000&lt;br /&gt;   00016 free                             00000&lt;br /&gt;   00017 free                             00000&lt;br /&gt;   00018 free                             00000&lt;br /&gt;   00019 free                             00000&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: Create two 24-MB logical volumes in your new volume group. Name the first logical&lt;br /&gt;volume cad and the second cam.&lt;br /&gt;&lt;br /&gt;ans:&lt;br /&gt;&lt;br /&gt; bash-3.2# lvcreate -L 24 -n cad /dev/vg01&lt;br /&gt;Warning: rounding up logical volume size to extent boundary at size "32" MB.&lt;br /&gt;Logical volume "/dev/vg01/cad" has been successfully created with&lt;br /&gt;character device "/dev/vg01/rcad".&lt;br /&gt;Logical volume "/dev/vg01/cad" has been successfully extended.&lt;br /&gt;Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf&lt;br /&gt;&lt;br /&gt;bash-3.2# vgdisplay -v vg01&lt;br /&gt;--- Volume groups ---&lt;br /&gt;VG Name                     /dev/vg01&lt;br /&gt;VG Write Access             read/write&lt;br /&gt;VG Status                   available&lt;br /&gt;Max LV                      255&lt;br /&gt;Cur LV                      1&lt;br /&gt;Open LV                     1&lt;br /&gt;Max PV                      16&lt;br /&gt;Cur PV                      1&lt;br /&gt;Act PV                      1&lt;br /&gt;Max PE per PV               4375&lt;br /&gt;VGDA                        2&lt;br /&gt;PE Size (Mbytes)            32&lt;br /&gt;Total PE                    4374&lt;br /&gt;Alloc PE                    1&lt;br /&gt;Free PE                     4373&lt;br /&gt;Total PVG                   0&lt;br /&gt;Total Spare PVs             0&lt;br /&gt;Total Spare PVs in use      0&lt;br /&gt;&lt;br /&gt;   --- Logical volumes ---&lt;br /&gt;   LV Name                     /dev/vg01/cad&lt;br /&gt;   LV Status                   available/syncd&lt;br /&gt;   LV Size (Mbytes)            32&lt;br /&gt;   Current LE                  1&lt;br /&gt;   Allocated PE                1&lt;br /&gt;   Used PV                     1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   --- Physical volumes ---&lt;br /&gt;   PV Name                     /dev/dsk/c2t1d0&lt;br /&gt;   PV Status                   available&lt;br /&gt;   Total PE                    4374&lt;br /&gt;   Free PE                     4373&lt;br /&gt;   Autoswitch                  On&lt;br /&gt;   Proactive Polling           On&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;since the size of the PE is 32mb, you need to atleast create a logical volume which is greater than or equals to 32 mb otherwise the LVM manager will be automatically rounded up to 32mb by extending the logical volume&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bash-3.2# lvdisplay -v /dev/vg01/cad&lt;br /&gt;--- Logical volumes ---&lt;br /&gt;LV Name                     /dev/vg01/cad&lt;br /&gt;VG Name                     /dev/vg01&lt;br /&gt;LV Permission               read/write&lt;br /&gt;LV Status                   available/syncd&lt;br /&gt;Mirror copies               0&lt;br /&gt;Consistency Recovery        MWC&lt;br /&gt;Schedule                    parallel&lt;br /&gt;LV Size (Mbytes)            32&lt;br /&gt;Current LE                  1&lt;br /&gt;Allocated PE                1&lt;br /&gt;Stripes                     0&lt;br /&gt;Stripe Size (Kbytes)        0&lt;br /&gt;Bad block                   on&lt;br /&gt;Allocation                  strict&lt;br /&gt;IO Timeout (Seconds)        default&lt;br /&gt;&lt;br /&gt;   --- Distribution of logical volume ---&lt;br /&gt;   PV Name                 LE on PV  PE on PV&lt;br /&gt;   /dev/dsk/c2t1d0         1         1&lt;br /&gt;&lt;br /&gt;   --- Logical extents ---&lt;br /&gt;   LE    PV1                     PE1   Status 1&lt;br /&gt;   00000 /dev/dsk/c2t1d0         00000 current&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Do an ll of the /dev/vg01 directory. What is the name of the volume group device file for&lt;br /&gt;your new volume group? Each of your logical volumes should have two device files. Why?&lt;br /&gt;ans:&lt;br /&gt;&lt;br /&gt;bash-3.2# ll /dev/vg01&lt;br /&gt;total 0&lt;br /&gt;brw-r-----   1 root       sys         64 0x010001 Dec 17 16:54 cad&lt;br /&gt;brw-r-----   1 root       sys         64 0x010002 Dec 17 17:03 cam&lt;br /&gt;crw-r--r--   1 root       sys         64 0x010000 Dec 17 16:26 group&lt;br /&gt;crw-r-----   1 root       sys         64 0x010001 Dec 17 16:54 rcad&lt;br /&gt;crw-r-----   1 root       sys         64 0x010002 Dec 17 17:03 rcam&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;volume group device file: group (/dev/vg01/device)&lt;br /&gt;same like disks, it has both ways of accessing as block device and as raw device that's why two device files per each lvm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Use SAM to remove your vg01 volume group in preparation for the next portion of this&lt;br /&gt;lab. Volume groups can be managed in SAM from the Volume Groups object list:&lt;br /&gt;SAM –&gt; Disks and File Systems –&gt; Volume Groups&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To remove the volume group, first you need to delete all the lvms associated with that volume group&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; If you intend to use these disk(s) with the Veritas Volume Manager  ¦    ¦&lt;br /&gt;¦+--¦ you should first run /usr/sbin/pvremove on each of the device files ¦--+ ¦&lt;br /&gt;¦¦ v¦ listed below.                                                       ¦  ^ ¦&lt;br /&gt;¦¦ v¦                                                                     ¦    ¦&lt;br /&gt;¦¦  ¦                        /dev/rdsk/c2t1d0 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;pvremove /dev/rdsk/c2t1d0&lt;br /&gt;&lt;br /&gt;Try a vgdisplay back at the command line to ensure the volume group is gone. Did SAM&lt;br /&gt;remove the volume group device files, too?&lt;br /&gt;&lt;br /&gt;yes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to extend the filesystem online&lt;br /&gt;&lt;br /&gt;1. check either the machine is installed with jfs2 online&lt;br /&gt;# swlist -l produst | grep -i online&lt;br /&gt;&lt;br /&gt;2.check the size of file system&lt;br /&gt;# bdf&lt;br /&gt;&lt;br /&gt;3. check the size of available PE&lt;br /&gt;# vgdisplay vg00&lt;br /&gt;&lt;br /&gt;4. then extend the logical volume&lt;br /&gt;# lvextend -L 4208 /dev/vg00/lvol5&lt;br /&gt;&lt;br /&gt;5. next step is extend the file system&lt;br /&gt;# fsadm -F vxfs -b 4208M /home&lt;br /&gt;&lt;br /&gt;6. recheck the size&lt;br /&gt;# bdf&lt;br /&gt;&lt;br /&gt;# lvdisplay /dev/vg00/lvol5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More info: If you want to allocate extents from a specific disk (ex, c0t3d0) then use,&lt;br /&gt;&lt;br /&gt;# lvextend -L 4208 /dev/vg00/lvol5 /dev/dsk/c0t3d0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you don’t specify where LVM should allocate the new extents, LVM simply uses the first available extents in the volume group. After extending the logical volume, it’s a good idea to do an lvdisplay to see the result&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to extend the logical volume (without online)&lt;br /&gt;&lt;br /&gt;How to increase the size of a logical volume without online JFS    (advanced JFS)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;** Please note that we can extend the logical volume online (without unmounting the mounted file system) by using fsadm command but for this, we need to have vertitas volume manager license should be installed. If you do not have the license, then go for without online option..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: the following example is using the volume group vg00 and the logical volume lvol4 (lvol4 is mounted on /tmp directory with 512 size, we are now going to increatse to 1 gb)&lt;br /&gt;&lt;br /&gt;Check the volume group for enough space&lt;br /&gt;vgdisplay vg00&lt;br /&gt;&lt;br /&gt;Check the logical volume to determine if mirroring or striping is in effect&lt;br /&gt;lvdisplay /dev/vg00/lvol4&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.lvextend -L 1024 /dev/vg00/lvol4 (82944)&lt;br /&gt;&lt;br /&gt;  vxlicense -p ( to see if veritas license installed or not, if not go for extendfs)&lt;br /&gt;&lt;br /&gt;2. unmount the file system&lt;br /&gt;&lt;br /&gt;   umount /tmp ( i used lsof to list all files used by /tmp and kill them all)&lt;br /&gt;   lsof /tmp (find out PID and then kill -9 PID)&lt;br /&gt;   fuser -kc /tmp&lt;br /&gt;    &lt;br /&gt;3. extendfs -F vxfs /dev/vg00/rlvol4 ( please make to use character device file here)&lt;br /&gt;&lt;br /&gt;4. mount /dev/vg00/lvol4 /tmp&lt;br /&gt;&lt;br /&gt;5. bdf to see if this worked..&lt;br /&gt;&lt;br /&gt;LVEXTEND on logical volume::::::::&lt;br /&gt;&lt;br /&gt;commands that I performed on Hyderabad while extending /oradata...&lt;br /&gt;&lt;br /&gt;/dev/vg00/lvol10   61440000 52192061 8675533   86% /oradata&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# lvextend -L 82944 /dev/vg00/lvol10&lt;br /&gt;# umount /oradata (it is giving resource busy error) try below&lt;br /&gt;# fuser -kc /oradata (now unmount again)&lt;br /&gt;# umount /oradata&lt;br /&gt;# extendfs -F vxfs /dev/vg00/rlvol10&lt;br /&gt;# mount /dev/vg00/lvol10 /oradata&lt;br /&gt;# bdf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;extending /ora10gdb on racg1(30) server&lt;br /&gt;&lt;br /&gt;# lvextend -L 30000 /dev/vg01/lvol3&lt;br /&gt;# umount /ora10gdb (it is giving resource busy error) try below&lt;br /&gt;# fuser -kc /ora10gdb (now unmount again)&lt;br /&gt;# umount /ora10gdb&lt;br /&gt;# extendfs -F vxfs /dev/vg01/rlvol3&lt;br /&gt;# mount /dev/vg01/lvol3 /ora10gdb&lt;br /&gt;# bdf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TIPS:&lt;br /&gt;&lt;br /&gt;How to determine if you have Online JFS&lt;br /&gt;&lt;br /&gt;    * swlist -l fileset | grep -i advanced&lt;br /&gt;&lt;br /&gt;How to determine the filesystem type&lt;br /&gt;&lt;br /&gt;    * grep /tmp /etc/fstab&lt;br /&gt;    * Results should show the filesystem type (vxfs or hfs) in the return string&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;free disk:&lt;br /&gt;&lt;br /&gt;disk      2  0/1/1/0.1.0    sdisk      CLAIMED     DEVICE       HP 146 GST3146707LC&lt;br /&gt;                           /dev/dsk/c2t1d0   /dev/rdsk/c2t1d0&lt;br /&gt;&lt;br /&gt;HP -LVM How-to's in a Nut shell&lt;br /&gt;&lt;br /&gt;pvcreate /dev/rdsk/c2t1d0&lt;br /&gt;mkdir -p /dev/vg01&lt;br /&gt;mknod /dev/vg01/group c 64 0x010000&lt;br /&gt;vgcreate -s 32 /dev/vg01 /dev/dsk/c2t1d0&lt;br /&gt;lvcreate -L 500 -n lvol1 /dev/vg01 ***** check if mirroring or striping required for this LVM. If mirroring or striping is required then there must be enough space available on multiple disks.&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;lvcreate -l 15 -n lvol1 /dev/vg01 (-l mean no of logical extents to be created for this, 15 * 32 = 480 mb)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;create a file system vxfs:&lt;br /&gt;#newfs -F vxfs /dev/vg01/rlvol1  ( make sure it is a character device file)&lt;br /&gt;&lt;br /&gt;      version 5 layout&lt;br /&gt;          524288 sectors, 524288 blocks of size 1024, log size 16384 blocks&lt;br /&gt;          unlimited inodes, largefiles not supported&lt;br /&gt;          524288 data blocks, 507712 free data blocks&lt;br /&gt;    16 allocation units of 32768 blocks, 32768 data blocks&lt;br /&gt;For large file support::&lt;br /&gt;&lt;br /&gt;(newfs -F vxfs -o largefiles /dev/vg01/rlvol1)&lt;br /&gt;&lt;br /&gt;mkdir /testing&lt;br /&gt;mount /dev/vg01/lvol1 /testing&lt;br /&gt;bdf&lt;br /&gt;&lt;br /&gt;vi /etc/fstab&lt;br /&gt;&lt;br /&gt;/dev/vg01/lvol1 /testing vxfs delaylog 0 2&lt;br /&gt;&lt;br /&gt;mount -a&lt;br /&gt;or&lt;br /&gt;mount -o remount /testing&lt;br /&gt;&lt;br /&gt;III) How to add a disk to a Volume Group::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      Note The following examples is using the disk c1t6d0 and the volume group vg01&lt;br /&gt;&lt;br /&gt;      1) Prepare the disk&lt;br /&gt;            pvcreate /dev/rdsk/c1t6d0&lt;br /&gt;&lt;br /&gt;         Note if the disk was previously used in another VG use the&lt;br /&gt;         following command instead:&lt;br /&gt;&lt;br /&gt;            pvcreate -f /dev/rdsk/c1t6d0&lt;br /&gt;    &lt;br /&gt;            Note: Use caution when using pvcreate -f as this will&lt;br /&gt;            overwrite the existing volume group information on the disk.&lt;br /&gt;    &lt;br /&gt;      2) Add the disk to the Volume Group&lt;br /&gt;            vgextend /dev/vg01 /dev/dsk/c1t6d0&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt; IV) How to remove a Logical Volume::::&lt;br /&gt;&lt;br /&gt; Note: the following example is using the volume group vg01 and the logical volume lvol1&lt;br /&gt;&lt;br /&gt;     1) Backup all user data&lt;br /&gt;     2) Umount the filesystem&lt;br /&gt;         umount /testing&lt;br /&gt;     3) remove the Logical volume&lt;br /&gt;       lvremove /dev/vg01/lvol1&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt; V) How to reduce the size of a logical volume without online JFS (advanced JFS)&lt;br /&gt;&lt;br /&gt;      Note: the following example is using the volume group vg01 and the  logical volume lvol1&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;      1) Backup all user data&lt;br /&gt;      2) Umount the filesystem&lt;br /&gt;         umount /testing&lt;br /&gt;      3) Reduce the size&lt;br /&gt;         lvreduce -L 512 /dev/vg01/lvol1&lt;br /&gt;         Note: the new total size will be 512&lt;br /&gt;      4) Re-create the filesystem&lt;br /&gt;         newfs -F vxfs /dev/vg01/lvol1  (this will delete the data so you have already backed up)&lt;br /&gt;      5) Mount the Logical Volume:&lt;br /&gt;         mount /dev/vg01/lvol1 /testing&lt;br /&gt;      6) Restore the user data&lt;br /&gt;&lt;br /&gt;VI) How to remove a disk from a volume group&lt;br /&gt;&lt;br /&gt;      Note: the following example is using the disk c1t6d0 and the volume group vg01&lt;br /&gt;&lt;br /&gt;      1) Make sure that the disk is not in use:&lt;br /&gt;         pvdisplay /dev/dsk/c1t6d0&lt;br /&gt;        &lt;br /&gt;     Look at line starting with Allocated PE the number at the end&lt;br /&gt;         of the line should be 0. If it is not the disk is still in use&lt;br /&gt;     &lt;br /&gt;      2) Remove the disk&lt;br /&gt;         vgreduce /dev/vg01 /dev/dsk/c1t6d0&lt;br /&gt;        &lt;br /&gt;    More detailed commands,&lt;br /&gt;   &lt;br /&gt;    1. check VG status by using&lt;br /&gt;        #vgdisplay -v&lt;br /&gt;       &lt;br /&gt;    2. unmount the logical volumes on this VG&lt;br /&gt;   &lt;br /&gt;        #umount /dev/vg00/lvol6&lt;br /&gt;        #umount /dev/vg00/lvol7&lt;br /&gt;       &lt;br /&gt;    3. reduce the disk&lt;br /&gt;   &lt;br /&gt;        #vgreduce /dev/vg00 /dev/dsk/c3t2d0&lt;br /&gt;       &lt;br /&gt;    4. mount back the logical volume&lt;br /&gt;        #mount /dev/vg00/lvol6 /db1&lt;br /&gt;        #mount /dev/vg00/lvol7 /db2&lt;br /&gt;    5. check either the disk still exist or not&lt;br /&gt;        #vgdisplay -v&lt;br /&gt;       &lt;br /&gt;    Combine 2 hard disk to become 1 vg&lt;br /&gt;   &lt;br /&gt;    If your harddisk is small and you want to combine 2 harddisk to become 1 vg:&lt;br /&gt;   &lt;br /&gt;    I think the first steps in this chapter will explain about this.&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;        &lt;br /&gt; VII) How to remove a volume group&lt;br /&gt;&lt;br /&gt;      Note: the following example is using the volume group vg01 and the logical volume lvol1&lt;br /&gt;     &lt;br /&gt;      1) Backup all user data&lt;br /&gt;      2) Find the name of all logical volume in this volume group&lt;br /&gt;           vgdisplay -v /dev/vg01&lt;br /&gt;      3) unmount all logical volumes&lt;br /&gt;           umount /lvol1&lt;br /&gt;           If you have other logical volumes, please unmount them all&lt;br /&gt;      4) Remove the volume group:&lt;br /&gt;         vgexport /dev/vg01&lt;br /&gt;        &lt;br /&gt;         when I do this, I get the following error,&lt;br /&gt;         Beginning the export process on Volume Group "/dev/vg01".&lt;br /&gt;     vgexport: Volume group "/dev/vg01" is still active.&lt;br /&gt;&lt;br /&gt;    So, I made it inactive by,&lt;br /&gt;    vgchange -a n /dev/vg01&lt;br /&gt;   &lt;br /&gt;    and then&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;    vgexport /dev/vg01&lt;br /&gt;           &lt;br /&gt;        &lt;br /&gt;         Note: using vgexport to remove a volume group is easier and faster than using the vgreduce on each physical volume except the last one, followed by a vgremove. The other  advantage is that the /dev/vg01 directory is also removed&lt;br /&gt;        &lt;br /&gt;   OR another way to do,&lt;br /&gt;  &lt;br /&gt;       *  Remove all Logical Volumes&lt;br /&gt;       *  Remove all disks except on using vgreduce &lt;vg_name&gt; &lt;/dev/dsk/DISK&gt;&lt;br /&gt;             o This will need to be done for each disk in the volume group, except for the last disk&lt;br /&gt;       * remove the final disk in the volume group with vgremove &lt;vg_name&gt;&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;     &lt;br /&gt;  MORE INFORMATION ON HP-LVM :::::&lt;br /&gt; &lt;br /&gt;  Mirroring::&lt;br /&gt; &lt;br /&gt;    Mapping a logical extent to more than one physical extent.  Logical volumes are mirrored, not disks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Physical Extent (PE)&lt;br /&gt;&lt;br /&gt;    Unit used for allocating disk space to logical volumes, default size is 4MB.  It is a set of contiguous disk blocks&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Logical Extents (LE)&lt;br /&gt;    Logical extents are used to create the logical volume - they are the same size as physical extents&lt;br /&gt;   &lt;br /&gt;Striping&lt;br /&gt;    A logical volume that is configured to write across more than one disk in a stripe.&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;vgchange&lt;br /&gt;    Command used to change information about the volume group, such as to activate an inactive vg&lt;br /&gt;   &lt;br /&gt;    man vgchange (will give more information and attributes)&lt;br /&gt;&lt;br /&gt;vgexport&lt;br /&gt;   &lt;br /&gt;vgimport&lt;br /&gt;&lt;br /&gt;How to inactive a volume group:::&lt;br /&gt;&lt;br /&gt;#vgchange -a n /dev/vg01&lt;br /&gt;&lt;br /&gt;Unmirroring a Logical Volume:::&lt;br /&gt;&lt;br /&gt;#lvreduce -m 0 /dev/vg01/lvol7  (-m mirrior copy to 0 which mean the extents are mapped to only single disk)&lt;br /&gt;&lt;br /&gt;Deactivating a Volume Group ::;&lt;br /&gt;&lt;br /&gt;Umount all of the logical volumes in the volume group&lt;br /&gt;&lt;br /&gt;Determine all of the mounted logical volumes by "bdf | grep vg01"&lt;br /&gt;&lt;br /&gt;#vgchange -a n /dev/vg01&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to mirror a logical volume ::::&lt;br /&gt;&lt;br /&gt;Note: Data mirroring is provided by an additionnal purchasable software product called MirrorDisk/UX&lt;br /&gt;&lt;br /&gt;Note: the following example is using the volume group vg01 and the  logical volume lvol7&lt;br /&gt;&lt;br /&gt; To add a mirror to an existing logical volume:&lt;br /&gt;&lt;br /&gt; lvextend -m 1 /dev/vg01/lvol7&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-4241239919261736486?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/4241239919261736486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/07/hp-ux-lvm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/4241239919261736486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/4241239919261736486'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/07/hp-ux-lvm.html' title='HP-UX LVM'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-952062978552293933</id><published>2009-06-25T07:49:00.000-07:00</published><updated>2009-06-25T07:55:51.094-07:00</updated><title type='text'>Times USA and INDIA</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_KdbeuDwlmDo/SkOP5QQAHyI/AAAAAAAAAAk/qIn_Z1kAUY0/s1600-h/times.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5351278996023680802" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 240px" alt="" src="http://3.bp.blogspot.com/_KdbeuDwlmDo/SkOP5QQAHyI/AAAAAAAAAAk/qIn_Z1kAUY0/s320/times.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;:::::::: Times USA and INDIA :::::::::::::&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-952062978552293933?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/952062978552293933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/06/bedford-bedford-est-dst-hyderabad-gmt-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/952062978552293933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/952062978552293933'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/06/bedford-bedford-est-dst-hyderabad-gmt-7.html' title='Times USA and INDIA'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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://3.bp.blogspot.com/_KdbeuDwlmDo/SkOP5QQAHyI/AAAAAAAAAAk/qIn_Z1kAUY0/s72-c/times.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037711197124915796.post-9114348183825833833</id><published>2009-06-25T06:52:00.000-07:00</published><updated>2009-06-25T07:43:24.560-07:00</updated><title type='text'>Kickstart Configuration in Linux...</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_KdbeuDwlmDo/SkOHcMnkdcI/AAAAAAAAAAU/OemEi5tK7w8/s1600-h/1.bmp"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_KdbeuDwlmDo/SkOHcMnkdcI/AAAAAAAAAAU/OemEi5tK7w8/s1600-h/1.bmp"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Red Hat Linux comes with a system for automatic installation called Kickstart. Instead of answering all the installation questions manually, including all the details of package selection, you can put your answers and list of packages into a file which will automatically be read by the installation program at startup. This can be very useful for installing a specific known configuration on a collection of machines, such as a grid cluster or a Beowulf cluster. It is also fairly easy to copy files or run shell scripts non-interactively to customize the installation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OS: RHEL 4 ES.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The steps which I performed are described here.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We will make one server as kickstart server (172.16.17.43) that holds all the configurtion required for the installtion. We choose RHEL 4 ES box as kickstart server. We are going to perform these steps on this server now,,,&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Install system-config-kickstart-2.5.16.1-1.noarch.rpm&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#rpm -ivh system-config-kickstart-2.5.16.1-1.noarch.rpm&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2.Using a X-manager tools like (WRQ reflection or X-Manager) to launch a graphical window to configure kickstart configuration.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;as a x,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#system-config-kickstart&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_KdbeuDwlmDo/SkOIERwXVOI/AAAAAAAAAAc/BUbn_DRPDz0/s1600-h/1.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5351270389313393890" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 290px" alt="" src="http://2.bp.blogspot.com/_KdbeuDwlmDo/SkOIERwXVOI/AAAAAAAAAAc/BUbn_DRPDz0/s320/1.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It displays the above dialogue box, and go through each configuration and set values as per your request. Once this is done,&lt;/div&gt;&lt;div&gt; click on File ---&gt; Save File.&lt;/div&gt;&lt;div&gt;Save this file under (/kickstart/ks.cfg).&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;All the configuration now has been saved under ks.cfg file and you can edit it manually by using any text editor.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Now, we will export this file using NFS share make it available to all our hosts on the network.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;# vi /etc/exports&lt;/div&gt;&lt;div&gt;/kickstart *(rw,sync)&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Save and exit&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;#exportfs -r&lt;/div&gt;&lt;div&gt;# service nfs restart&lt;/div&gt;&lt;div&gt;# service portmap restart&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;# showmount --exports&lt;/div&gt;&lt;div&gt;Export list for ns1.testing.com:&lt;/div&gt;&lt;div&gt;/kickstart *&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;I hope this ends the kickstart server configuration...&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Now go back to your work station where you would like to initiate the kickstart installation. Make sure to have the install media (CD #1) for this situation. Insert the CD and boot the machine. When it comes up, on RED HAT logo, type the following line..&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;linux ks=nfs:172.16.17.43:/kickstart/ks.cfg ksdevice=eth0 up&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;If you have DHCP configured for your env, the installation will choose a random IP for your work station/server. If you have choose the installation type as (CD) then you would need to insert all the remainig CD #2,3,4 depending on the software selection...&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-9114348183825833833?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/9114348183825833833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/06/kickstart-configuration-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/9114348183825833833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/9114348183825833833'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/06/kickstart-configuration-in-linux.html' title='Kickstart Configuration in Linux...'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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://2.bp.blogspot.com/_KdbeuDwlmDo/SkOIERwXVOI/AAAAAAAAAAc/BUbn_DRPDz0/s72-c/1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5037711197124915796.post-9007083686998479285</id><published>2009-06-25T06:31:00.000-07:00</published><updated>2009-06-25T06:42:12.374-07:00</updated><title type='text'>Compiling the Linux Kernel</title><content type='html'>I never tried these steps but, got these from one of the blogs on the Internet for future reference.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Downloading the kernel source code.&lt;br /&gt;&lt;br /&gt;In order to compile a new kernel we have to download the source code of the Linux kernel. We can download the source from &lt;a href="http://www.kernel.org/"&gt;http://www.kernel.org/&lt;/a&gt;. Here we can find all versions of the Linux kernel source code. Let's take an example. Suppose we want to compile the 2.6.9 version of the linux kernel. We have to download the 2.6.9 source code from:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2"&gt;http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's better to download the bzipped version, as that will be more compressed than its gzipped counterpart; hence will take less time to download. A wget from the command line will look like:&lt;br /&gt;&lt;br /&gt;wget &lt;a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2"&gt;http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once we download the required kernel version source, we need to bunzip and untar it. We can do the following:&lt;br /&gt;&lt;br /&gt;tar xvjf linux-2.6.9.tar.bz2&lt;br /&gt;&lt;br /&gt;The 'x' option is to denote the untarring (e'x'traction), 'v' for verbose, 'j' for specifying that we need to bunzip the file before untarring and 'f' for stating the name of the input file.&lt;br /&gt;The file will untar into the directory linux-2.6.9. Once it's untarred 'cd' to linux-2.6.9.&lt;br /&gt;&lt;br /&gt;2. Configuring the kernel&lt;br /&gt;&lt;br /&gt;We have to configure the kernel before we start compiling it. During the configuration phase, we will select the components which we want to be part of the kernel. For example: suppose we are using the ext3 filesystem. Then we need to select the ext3 filesystem support while configuring the kernel. Typically we have to run a&lt;br /&gt;&lt;br /&gt;make menuconfig&lt;br /&gt;&lt;br /&gt;This will bring up the ncurses interface for configuring the kernel. There are other options such as 'make xconfig' and 'make config'. The former will bring up the configuration menu in graphical mode and the latter in text mode.&lt;br /&gt;&lt;br /&gt;Once we select the different components we want for our kernel, we can exit the configuration interface. We should select the option to save the configuration from the configuration menu, before exiting.&lt;br /&gt;&lt;br /&gt;After we have configured the kernel as mentioned above, we can find a file named '.config' in the top level directory of the source. This file is the configuration file. It contains various options and their states (whether they are selected or not). For example, if we choose to have the PCI support in our kernel we can find an entry of the form:&lt;br /&gt;&lt;br /&gt;CONFIG_PCI=y&lt;br /&gt;&lt;br /&gt;in the .config file. Similarly, options which are selected as not required will appear as not set. Suppose we have not selected the XFS filesystem support in our kernel we will find the following in the .config&lt;br /&gt;&lt;br /&gt;# CONFIG_XFS_FS is not set&lt;br /&gt;&lt;br /&gt;A great feature of 2.6 kernels is that if we are running make menuconfig (or xconfig or config) for the first time, then the configuration menu we are presented with is based on our current kernel configuration. In my case, I have a Fedora Core 1 system. The kernel which I run is '2.4.22-1.2115.nptl'. Hence when I run a 'make menuconfig' for the first time on the source then the configuration menu presented will contain the options as given in '/boot/config-2.4.22-1.2115.nptl'.&lt;br /&gt;&lt;br /&gt;3. Building Dependencies&lt;br /&gt;&lt;br /&gt;This step is required in kernels prior to 2.6 series (here I am only referring to the stable series kernels). For example if we are using a 2.4 kernel then we have to build the dependencies explicitly. We have to run the following:&lt;br /&gt;&lt;br /&gt;make dep&lt;br /&gt;&lt;br /&gt;This will build the dependencies. But for a 2.6 kernel we can skip this step. The dependencies are automatically created when making the final image with a 2.6 kernel.&lt;br /&gt;&lt;br /&gt;4. Creating the final image&lt;br /&gt;&lt;br /&gt;We can build various types of kernel binary images. We can build a plain kernel image, or a compressed version of it; the usual choice is compressed, or the 'bzImage'. We can create the bzImage by running&lt;br /&gt;&lt;br /&gt;make bzImage&lt;br /&gt;&lt;br /&gt;In 2.6 kernels this step will also resolve the dependencies and proceed to create a bzImage image.&lt;br /&gt;After the compilation is over we can find the kernel image at the path arch/i386/boot/bzImage in case of an image for a 386 based processor (Pentium, AMD etc.).&lt;br /&gt;&lt;br /&gt;5. Compiling and Installing the modules&lt;br /&gt;&lt;br /&gt;In the configuring section if we have selected some components to be built as kernel modules then we need to compile those modules. To compile the modules we should run the command:&lt;br /&gt;&lt;br /&gt;make modules&lt;br /&gt;&lt;br /&gt;This command will compile the components (which are selected for module compilation) to modules. In a 2.4 kernel the result will be .o files of the corresponding components. But in a 2.6 kernel the output file will be a .ko module. For example if we have given the option for the Network driver of Realtek cards to be built as modules then after giving a 'make modules' we can find in 'driver/net/' a file named 8139too.o in the case of a 2.4 kernel and 8139too.ko in the case of a 2.6 kernel.&lt;br /&gt;&lt;br /&gt;After we have compiled the modules, it's time now to install the modules. To install the modules run:&lt;br /&gt;&lt;br /&gt;make modules_install&lt;br /&gt;&lt;br /&gt;as root. This will install the modules and other necessary files into the /lib/modules/2.6.9 directory&lt;br /&gt;&lt;br /&gt;6. Booting from the new kernel&lt;br /&gt;&lt;br /&gt;Once we are done with the installation of modules, we can go for an automatic installation procedure for the kernel binary. We just have to run&lt;br /&gt;&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;This will update the kernel image on to the /boot area, update the configuration file of the bootloader (lilo.conf or grub.conf) and then do the necessary actions to make the new kernel bootable.&lt;br /&gt;&lt;br /&gt;After this we need to reboot the machine. When the machine boots next time the boot menu will present us with the option to boot from the new kernel we built. We choose that option and voila!! boot into a kernel we built all by ourselves&lt;br /&gt;&lt;br /&gt;7. Manual installation of the kernel&lt;br /&gt;&lt;br /&gt;In case 'make install' does not work, or if we cannot perform an automatic installation due to some other reason, we can go for a manual installation of the kernel. For example, if we are using the grub boot loader then we have to copy the bzImage into the boot partition and then change the '/etc/grub.conf' to reflect the presence of the new image. If we are having lilo boot loader then we have to copy the bzImage to the boot location and then modify the lilo.conf and then run the 'lilo' command to make sure that next time we boot we will have our new image as a choice to boot from. The following are the steps we should perform as root user if we are using lilo boot loader:&lt;br /&gt;&lt;br /&gt;cp -a arch/i386/boot/bzImage /boot/bzImage-2.6.9&lt;br /&gt;&lt;br /&gt;After this we add the following entry to /etc/lilo.conf&lt;br /&gt;&lt;br /&gt;image=/boot/bzImage-2.6.9&lt;br /&gt;label=2.6.9-kernel&lt;br /&gt;root=your_root_disk&lt;br /&gt;&lt;br /&gt;We should run lilo after this&lt;br /&gt;lilo -v&lt;br /&gt;&lt;br /&gt;We will reboot the machine after this. When we are prompted at the lilo prompt enter '2.6.9-kernel' as the boot option and we will be booting to the new custom built kernel&lt;br /&gt;&lt;br /&gt;8. Cleaning the kernel source&lt;br /&gt;&lt;br /&gt;After we have initiated compilation once on the source if we want to clean the object files and other temporary files then we have to run the following:&lt;br /&gt;&lt;br /&gt;make clean&lt;br /&gt;&lt;br /&gt;This will remove most generated files but will keep the configuration file.&lt;br /&gt;If we need an absolute cleaning, i.e. if we want to return the source to the state in which it was before we started the compilation, then do a&lt;br /&gt;&lt;br /&gt;make mrproper&lt;br /&gt;&lt;br /&gt;This command will delete all generated files, the configuration file as well as various backup files. This will in effect unwind all the changes we made to the source. The source after this step will be as good as it was just after the download and untar&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-9007083686998479285?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/9007083686998479285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/06/compiling-linux-kernel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/9007083686998479285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/9007083686998479285'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/06/compiling-linux-kernel.html' title='Compiling the Linux Kernel'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-2037474833555616445</id><published>2009-06-25T05:47:00.000-07:00</published><updated>2009-06-25T06:30:01.607-07:00</updated><title type='text'></title><content type='html'>::::: Setting up a DNS Server in Linux (RHEL 4 ES up 2) ::::&lt;br /&gt;&lt;br /&gt;In this example, we are using&lt;br /&gt;172.16.17.43 - ns1.testing.com&lt;br /&gt;172.16.17.52 - ns2.testing.com&lt;br /&gt;172.16.17.19 - testing.com (or a www web server) and also a mail server&lt;br /&gt;&lt;br /&gt;Before configuring DNS services, you need to edit , /etc/resolv.conf as&lt;br /&gt;nameserver 127.0.0.1&lt;br /&gt;and restart network services&lt;br /&gt;&lt;br /&gt;Packages needed....&lt;br /&gt;rpm -ivh bind-9.2.4-2.i386.rpm bind-chroot-9.2.4-2.i386.rpm bind-devel-9.2.4-2.i386.rpm&lt;br /&gt;There are other two packages also needed but they alredy installed on the machine (bind-utils, bind-libs)&lt;br /&gt;&lt;br /&gt;Once the packages are installed, go the configuration file&lt;br /&gt;[root@lnxtestsrv1 named]# vi /var/named/chroot/etc/named.conf&lt;br /&gt;// Default named.conf generated by install of bind-9.2.4-2&lt;br /&gt;options {&lt;br /&gt;directory "/var/named";&lt;br /&gt;dump-file "/var/named/data/cache_dump.db";&lt;br /&gt;statistics-file "/var/named/data/named_stats.txt";&lt;br /&gt;};&lt;br /&gt;include "/etc/rndc.key";&lt;br /&gt;# these are the extra lines that I added to the file..&lt;br /&gt;zone "testing.com" {&lt;br /&gt;type master;&lt;br /&gt;file "testing.com.zone";&lt;br /&gt;allow-update { none; };&lt;br /&gt;};&lt;br /&gt;zone "17.16.172.in-addr.arpa"{&lt;br /&gt;type master;&lt;br /&gt;file "1.16.172.in-addr.arpa.zone";&lt;br /&gt;allow-update { none; };&lt;br /&gt;};&lt;br /&gt;then go to cd /var/named/chroot/var/named/&lt;br /&gt;create two files (forward and reverse look up). In our case forward lookup is, testing.com.zone and reverse look up is, 1.16.172.in-addr.arpa.zone&lt;br /&gt;vi testing.com.zone&lt;br /&gt;$TTL 86400&lt;br /&gt;@ IN SOA testing.com. (&lt;br /&gt;root&lt;br /&gt;2007112800&lt;br /&gt;21600&lt;br /&gt;1800&lt;br /&gt;604800&lt;br /&gt;900 )&lt;br /&gt;IN NS ns1.testing.com.&lt;br /&gt;IN NS ns2.testing.com.&lt;br /&gt;IN MX 10 mail.testing.com.&lt;br /&gt;IN A 172.16.17.19&lt;br /&gt;ns1 IN A 172.16.17.43&lt;br /&gt;ns2 IN A 172.16.17.52&lt;br /&gt;mail IN A 172.16.17.19&lt;br /&gt;&lt;br /&gt;Save the file and exit...&lt;br /&gt;Then create a reverse lookup file that we defined in named.conf&lt;br /&gt;# vi 17.16.172.in-addr.arpa&lt;br /&gt;$TTL 86400&lt;br /&gt;@ SOA testing.com. (&lt;br /&gt;root&lt;br /&gt;2007112800&lt;br /&gt;21600&lt;br /&gt;1800&lt;br /&gt;604800&lt;br /&gt;900&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;19.17.16.172.in-addr.arpa. IN PTR testing.com.&lt;br /&gt;43.17.16.172.in-addr.arpa. IN PTR ns1.testing.com.&lt;br /&gt;19.17.16.172.in-addr.arpa. IN PTR mail.testing.com.&lt;br /&gt;52.17.16.172.in-addr.arpa. IN PTR ns2.testing.com.&lt;br /&gt;&lt;br /&gt;Save the file and exit...&lt;br /&gt;Now, we will restart the named service&lt;br /&gt;#service named restart&lt;br /&gt;#chkconfig --level 345 named on ( t0 bring up the service online for every reboot )&lt;br /&gt;Let us check the configuration errors or any syntax errors...&lt;br /&gt;#named-checkconf /var/named/chroot/etc/named.conf&lt;br /&gt;#named-checkzone testing.com /var/named/chroot/var/named/testing.com.zone&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;zone testing.com/IN: loaded serial 2007112800 OK&lt;br /&gt;&lt;br /&gt;Done!!!!!!&lt;br /&gt;&lt;br /&gt;Now testing....&lt;br /&gt;[root@lnxtestsrv1 named]# dig @localhost +short A testing.com&lt;br /&gt;172.16.17.19&lt;br /&gt;[root@lnxtestsrv1 named]# dig @localhost +short NS testing.com&lt;br /&gt;ns1.testing.com.&lt;br /&gt;ns2.testing.com.&lt;br /&gt;[root@lnxtestsrv1 named]# dig @localhost +short MX testing.com&lt;br /&gt;10 mail.testing.com.&lt;br /&gt;[root@lnxtestsrv1 named]# dig @localhost +short ns1.testing.com&lt;br /&gt;172.16.17.43&lt;br /&gt;[root@lnxtestsrv1 named]# dig @localhost +short mail.testing.com&lt;br /&gt;172.16.17.19&lt;br /&gt;[root@lnxtestsrv1 named]# dig @localhost +short testing.com&lt;br /&gt;172.16.17.19&lt;br /&gt;#dig @localhost +short -x 172.16.17.43ns1.testing.com&lt;br /&gt;&lt;br /&gt;::::: Setting up a Seconday / Slave DNS server:::::&lt;br /&gt;&lt;br /&gt;Before configuring DNS services on Secondary DNS server, you need to edit , /etc/resolv.conf as&lt;br /&gt;&lt;br /&gt;nameserver 127.0.0.1&lt;br /&gt;&lt;br /&gt;and restart network services&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It requires the same packages of what primary DNS server has..&lt;br /&gt;Configuring the slave nameserver is fairly simple once you have your master nameserver set up correctly.&lt;br /&gt;Go to,&lt;br /&gt;/var/named/chroot/etc/named.conf&lt;br /&gt;options{&lt;br /&gt;directory "/var/named/";&lt;br /&gt;};&lt;br /&gt;zone "testing.com" IN {&lt;br /&gt;type slave;&lt;br /&gt;masters { 172.16.17.43; };&lt;br /&gt;file "slaves/testing.com.zone";&lt;br /&gt;};&lt;br /&gt;As you can see all we did was set up our testing.com zone as type slave and pointed to the master server and where we want to store the zone files (we don't manually create them).&lt;br /&gt;Now start the service and make sure it comes up on a reboot.&lt;br /&gt;&lt;br /&gt;# service named start&lt;br /&gt;# chkconfig named on&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The DNS primary and seconday configuration is complete... You can go to the client machines and edit the /etc/resolv.conf&lt;/p&gt;&lt;p&gt;nameserver 172.16.17.43&lt;/p&gt;&lt;p&gt;nameserver 172.16.17.52&lt;/p&gt;&lt;p&gt;Restart the network service (service network restart), try resolving it.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-2037474833555616445?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/2037474833555616445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/06/setting-up-dns-server-in-linux-rhel-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/2037474833555616445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/2037474833555616445'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/06/setting-up-dns-server-in-linux-rhel-4.html' title=''/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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-5037711197124915796.post-3350261478516618821</id><published>2009-06-25T05:39:00.000-07:00</published><updated>2009-08-25T08:44:58.510-07:00</updated><title type='text'>New Day.... New Blog</title><content type='html'>This blog describes me about my work, articles and day-to-day activities that I do, just like other blogs. So, keep watching my blog and provide any feedback or suggestions&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;-Shankar&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5037711197124915796-3350261478516618821?l=shankar30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shankar30.blogspot.com/feeds/3350261478516618821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shankar30.blogspot.com/2009/06/new-day-new-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3350261478516618821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5037711197124915796/posts/default/3350261478516618821'/><link rel='alternate' type='text/html' href='http://shankar30.blogspot.com/2009/06/new-day-new-blog.html' title='New Day.... New Blog'/><author><name>Shankar</name><uri>http://www.blogger.com/profile/15029909819237178380</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></feed>
