Honestly I cannot believe that i have not put this one up on Fatmin before. I have to add new disks to RHEL servers all the time and can never remember I can never remember this procedure. I end up hitting up google all the time.
Anyway the command below causes a rescan of the scsi bus which is what you need to do for your server to detect a newly added disk. I find myself doing this on virtual machines all the time. Oh and for the love of all that is holy, please create your new disk a logical volume, and dont be lazy and just format the disk and stick a filesystem on it.
In this example I am using host0 as the target, however this may differ on your box.
A few days ago we got hit with a ton of alerts which indicated that a handful of VMs were down, then up, and down again. This cycle continued several times.
At first, after a bit of digging through logs, we thought that the issue was related to scsi reservation errors, but we were already compliant with the best practices for 3PAR mentioned here. So we dug deeper and found that we were in fact suffering from SCSI locks. Go here for more information.
According to VMware…
category involves acquisition of locks. These are locks related to VMFS
specific meta-data (called cluster locks) and locks related to files
(including directories). Operations in the second category occur much more frequently than operations in the first category. The following are examples of VMFS operations that require locking metadata:
Creating a VMFS datastore
Expanding a VMFS datastore onto additional extents
Powering on a virtual machine
Acquiring a lock on a file
Creating or deleting a file
Creating a template
Deploying a virtual machine from a template
Creating a new virtual machine
Migrating a virtual machine with VMotion
Growing a file, for example, a Snapshot file or a thin provisioned Virtual Disk
To resolve a SCSI Lock, log into each of your ESX boxes and run the following command.
# esxcfg-info | egrep -B5 "s Reserved|Pending
Look for the output below, as the host that has "Pending Reservation" value greater than one is causing the lock.
As a Systems Administrator, I deal with Raid 1(mirroring) pretty much exclusively. Hell, nowadays when building a server the server automatically mirrors your Operating System disks for you, which means that you do not even need to understand what is happening behind the scenes. You just pop your two drives in your server and go. However the world of the San Administrator is much more complicated.
First off its important to know that RAID stands for either “Redundant Array of Independent Disks”, or less commonly “Redundant Array of Inexpensive Disks”. Either way you slice it (pun intended) the basic idea of RAID is to combine multiple hard disks to either increase performance or increase redundancy.
Before I get started its important to introduce the term LUN. A LUN is a logical disk that consists of raw physical
disk space. LUNs are created as a basic part of the storage provisioning process. They are presented across a SAN to a server as a single physical disk.
Note that the title of this article is “Raid Levels Explained and Simplified“, and when I say simplified I mean it. I am going to give a brief overview of most of the common RAID levels and then present a weakness and strength. Scroll down to the bottom of the article for links to more in depth articles and web pages.
RAID 0: Striped…No Fault Tolerance
OK, in my opinion, and in the opinion of many other, RAID 0 is not even RAID, because there is no redundancy. If a disk fails, you are toast. Basically your take a slice of two disk or more disks and create a LUN. For example lets say that you as the Sysadmin request 1 80GB disk from your local SAN Admin. In the scenario below your SAN guru would carve 8 10GB blocks and present them in order (block 1,2,3,4,5,6,7,8) to you as a single LUN. RAID 0 provides good read and write performance. In the end RAID 0 is striping which is the most important thing that you probably need to know about it.