PROBLEM:

On servers with on-board AHCI based SATA controllers, controllers can be set
to pure HBA mode or RAID mode using system BIOS. System BIOS changes the PCI
sub-system IDs based on this mode.

LSI's software RAID driver (megasr) can claim RAID mode AHCI controllers and
provide RAID 0, 1, 10 & 5 functionality. The megasr driver considers all four
PCI IDs to decide if it supports a controller.

The native ahci driver Linux kernel looks at only the vendor & device IDs. It 
ignores the subsystem IDs. As a result it ignores the RAID mode. While this
behavior always existed, it poses a problem only in Red Hat Enterprise Linux5
(RHEL5). All other Red Hat distributions (RHEL3, RHEL4) load the driver from
a driver disk (DUD) if it exists before loading the native drivers from the
installation media. To override native ahci and use megasr, users just had to 
use the megasr DUD. Once megasr is loaded, these older versions added megasr
to the initial RAM disk image (initrd) and removed ahci from it.

RHEL5 installation loads native ahci driver even when megasr DUD is present.
It also includes ahci in the initrd. This is an undocumented deviation from
the normal behavior. Red Hat initially set to resolve this in the next RHEL5
update (RHEL 5.1). But later it rejected the issue.

SOLUTION:

1. 	To prevent ahci from loading ahead of megasr, use "noprobe" option at
	the installation kernel boot prompt (in addition to "dd" option). This
	lets you install RHEL5 on megasr virtual drive.

	boot: linux dd noprobe=ata1 noprobe=ata2 noprobe=ata3 noprobe=ata4

2.	At the last step of the installation (after all the packages are
	installed) RHEL5 prompts you to reboot. At this point, the initrd is
	built with ahci driver. Megasr must be added and ahci must be deleted
	from initrd before you reboot.

3.	Pressing Ctrl+Alt+F2 would take you to a text console prompt. Go to 
	the mounted directory run replace_ahci.sh script. This script will
	modify /etc/modprobe.conf and /etc/modprobe.d/blacklist if required.
	It will create a new initrd image.

4.	The replace_ahci.sh script will be provided in RHEL5 DUD floppy image.

5.	If the script is in floppy drive, you have to mount it first. In the 
	normal system, we mount using /dev/sd<x> device names to mount a device. 
	In the pre-installation environment, you may not
	have these names created. You can find the major and minor numbers of
	your device by reading /proc/partitions file. Using those numbers in
	mknod, you can create your own device name.

	Example:
	For RHEL 5.x (till RHEL5.6 follow the below steps):

	Connect USB Floppy Drive
	cat /proc/partitions (It will show where the Floppy is loaded)
	mkdir /abc (abc is a folder)
	mknod /dev/sdx b 8 16 (X= partion)
	mount dev/sdx /abc
	cd /abc
	run the replace_ahci typing the following command
	./replace_ahci.sh

	For RHEL5.7 follow the below steps: 
	Connect USB Floppy Drive
	cat /proc/partitions (It will show where the Floppy is loaded)
	mkdir /abc (abc is a folder)
	mknod  -m   /dev/sdx  b  p  (X= partion)
	mount dev/sdx /abc
	cd /abc
	run the replace_ahci typing the following command
	./replace_ahci.sh


Known Restrictions:

1. 	Following steps to be followed during the OS installation using DUD images
	For SLES (32bit and 64bit) platforms.

	To use AHCI controller in LSI Raid Mode
	- AHCI controller has to be in LSI RAID mode.
	- brokenmodules=ahci has to be provided during OS installation.

	To use SCU controller in LSI Raid Mode
	- SCU controller has to be in LSI RAID mode.
	- brokenmodules=isci  has to be provided during OS installation.

	To use both controllers in LSI Raid Mode
	- brokenmodules=ahci,isci  has to be provided during OS installation.

2.  	Following steps to be followed during the OS installation using DUD images
  	For all SLES platforms (32bit and 64bit).
     	Example:
	For SLES-11 SP1 (32bit and 64bit) platforms, as the dud image size exceedes 
	floppy disk size.

	a.	copy the image file to any linux system.
		megasr-14.00.0722.2010-1-sles11-sp1-x86_64.img for 64bit SLES11 SP1
		megasr-14.00.0722.2010-1-sles11-sp1-x86.img for 32bit SLES11 SP1

	b.	Create a directory ex: "mkdir image"

	c.	Mount the dud image on to image directory using the below command.
		"mount -oloop megasr-14.00.0722.2010-1-sles11-sp1-<arch>.img image"

	d.	Change the directory to image ("cd image").
		Copy the contents of the image directory into USB drive.
		(Contents of the image starts with 01 directory, copy the 01 
		directory to USB Drive)

	e.	Use this USB drive to provide the third-party driver during the OS 
		instalaltion.

	f.	Enter following command while giving driver "brokenmodules=ahci,isci".

	g.	Make sure that USB drive is formatted before using for OS installation 
		using DUD images.

3.	For RHEL-6.x(32bit and 64bit) platform OS installation using the SWR DUD images.
	Follow the below mentioned steps.
	While booting from DVD press esc key to give 3rd party driver using the following 
	commands 

	To use AHCI controller in LSI Raid Mode
	- Provide the command "Linux dd blacklist=ahci nodmraid"

	To use SCU controller in LSI Raid Mode
	- Provide the command "Linux dd blacklist=isci nodmraid"

	To use both controllers in LSI Raid Mode
	- Provide the command "Linux dd blacklist=ahci,isci nodmraid"

	If OS installation is on SCU and if LSI don't support AHCI controller for 
	the same machine don't use blacklist=ahci. If a CD/DVD-ROM is connected to AHCI 
	port installation will fail.

4.	For RHEL-5.7 GA and RHEL-5.8 GA (32bit and 64bit) platform OS installation using 
	the SWR DUD images.
     	Follow the below mentioned steps.
	While booting from DVD press esc key to give 3rd party driver using the following 
	commands 

	To use AHCI controller in LSI Raid Mode
	- Provide the command "Linux dd blacklist=ahci"

	To use SCU controller in LSI Raid Mode
	- Provide the command "Linux dd blacklist=isci"

	To use both controllers in LSI Raid Mode
	- Provide the command "Linux dd blacklist=ahci,isci"

	If OS installation is on SCU and if LSI don't support AHCI controller for the same 
	machine don't use blacklist=ahci. If a CD/DVD-ROM is connected to AHCI port 
	installation will fail.

5.	For RHEL-7.0 GA(64bit) platform OS 
	installation using the SWR DUD images.
	Follow the below mentioned steps.
	
	a.	copy the image file to any linux system.
		megasr-16.01.2014.0611-1-rhel70-ga-x86_64.img
		
	b.	Create a directory ex: "mkdir image"

	c.	Mount the dud image on to image directory using the below command.
		"mount -oloop megasr-16.01.2014.0611-1-rhel70-ga-x86_64.img image"

	d.	Copy the image directory into USB drive.
		
	e.	Use this USB drive to provide the third-party driver during the OS 
		instalaltion.
		
	f.	Legacy Installation : While booting from DVD press esc key to give 3rd party driver using the following 
		commands 

		To use AHCI controller in LSI Raid Mode
		- Provide the command "linux dd modprobe.blacklist=ahci nodmraid"

		To use SCU controller in LSI Raid Mode
		- Provide the command "linux dd modprobe.blacklist=isci nodmraid"

		To use both controllers in LSI Raid Mode
		- Provide the command "linux dd modprobe.blacklist=ahci,isci"
	g.	UEFI Installation : While booting from DVD press 'e' key to give 3rd party driver using the following 
		commands 
		
		To use AHCI controller in LSI Raid Mode
		- Append the line linuxefi after the quiet parameter with dd modprobe.blacklist=ahci
		
	h.	Select the device which has Megasr driver and continue.
		Enter the appropriate option to select the usb drive. Then select 1 for selecting the Megasr rpm and enter. 
		Type c to continue the installation

		
	If OS installation is on SCU and if LSI don't support AHCI controller for 
	the same machine don't use blacklist=ahci. If a CD/DVD-ROM is connected to AHCI 
	port installation will fail.
	
6.  	Upgrading MegaSR driver.

	Following steps to be followed during the megasr driver upgrade if the OS installation 
	is done on megasr Virtual Drive, using megasr dud images.

     	For all RHEL6.x platforms (32bit and 64bit)
	-------------------------------------------
	Example:
        
	a.	copy the dud image file to target linux system.
        	megasr-15.00.0315.2012-1-rhel6x-ga-x86.img for 32bit RHEL6.x
         	megasr-15.00.0315.2012-1-rhel6x-ga-x86_64.img for 64bit RHEL6.x

   	b. 	Create a directory ex: "mkdir image"

   	c. 	Mount the dud image on to image directory using the below command.
		"mount -oloop megasr-15.00.0315.2012-1-rhel6x-ga-<arch>.img image"

    	d. 	Change the directory to image ("cd image").
          	32bit: (32bit dud image must be mounted)
          	cd image/rpms/i386/
		install (upgrade) the kmod rpm with --force option.
		Rpm -Uvh kmod-megasr-2.2.3.rhtest60s10-1.el6.i686.rpm --force
                
		64bit: (64bit dud image must be mounted)
         	cd image/rpms/x86_64/
         	install (upgrade) the kmod rpm with --force option.
		Rpm -Uvh kmod-megasr-2.2.3.rhtest60s10-1.el6.x86_64.rpm --force

   	e. Reboot the system to verify that the driver has been updated.


	For SLES 11 (32bit and 64bit)
	-----------------------------
   	a.  copy the dud image file to target linux system.
        megasr-15.00.0329.2012-1-sles11-sp2-x86_64.img for 32bit RHEL6.x

    b. 	Create a directory ex: "mkdir image"

    c. 	Mount the dud image on to image directory using the below command.
		"mount -oloop megasr-15.00.0329.2012-1-sles11-sp2-x86_64.img image"

   	d. 	Change the directory to image ("cd image").
		cd image/01/linux/suse/x86_64-sles11/install/
		upgrade the rpm with --force option.
		rpm -Uvh lsi-megasr-kmp-15.00.0329.2012-1_3.0.13-0.27.x86_64.rpm --force 

	e.	Create new initrd image using the mkinitrd command and update the grub.conf.	
		(Take a backup of original initrd image to avoid OS corruption in case of failures)

   	e. 	Reboot the system to verify that the driver has been updated.


	For all RHEL 5.x platforms (32 bit and 64 bit)
	----------------------------------------------

	a. 	The SWR5 driver update package utilizes the DKMS package which can be 
		found at the following link (can be subject to change):
		http://linux.dell.com/dkms/

	b. 	Download the Latest stable RPM. The format will be: 
		dkms-x.x.xx.x-x.noarch.rpm
 
	c. 	Save it in a folder on the system, then open up a Terminal window and 
		navigate to the folder.
 
	d. 	Install the dkms rpm first using the following command:
		rpm -ivh dkms-x.x.xx.x-x.noarch.rpm

	e. 	Install the megasr-dkms rpm using the following command:
		rpm -ivh megasr-x.x.xx.x-x.noarch.rpm

    	f. 	Reboot the system to verify that the driver has been updated.
	
	NOTE : "rpm -ivh megsr-x.x.x.x.noarch.rpm" option needs to be used if driver 
		is upgraded for the first time.	From next time onwards use 
		"rpm -Uvh megsr-x.x.x.x.noarch.rpm" command.

	For RHEL 7.x platforms (64bit)
	-------------------------------------------
		
	a.  copy the dud image file to target linux system.
        megasr-16.01.2014.0611-1-rhel70-ga-x86_64.img

    b. 	Create a directory ex: "mkdir image"

    c. 	Mount the dud image on to image directory using the below command.
		"mount -oloop megasr-16.01.2014.0611-1-rhel70-ga-x86_64.img image"

   	d. 	Change the directory to image
		cd image/rpms/x86_64/
		upgrade the rpm with --force option.
		rpm -Uvh kmod-megasr-*.rpm --force
	
   	e. 	Reboot the system to verify that the driver has been updated.
			
7.	The use of a 32-bit hypervisor as a virtualization host is deprecated on SLES11-SP1.
	The following link provides more information.
	http://www.suse.com/releasenotes/x86_64/SUSE-SLES/11-SP1/#rnotes-deprecated.

8.	"Native video driver in SLES and RHEL does not support S1-sleep/Standby mode. 
	Due to this, Standby mode will work only with specific external graphics cards."	


9.	SLES - 11 doesn't boot if MPT controller Card plugged in:

	If SLES - 11 installation is done on a drive connected to SCU controller and after 
	OS installation, MPT controller Card is connected and reboot the system then 
	OS doesn't boot 	and the following error will be displayed.

	....Could not find /dev/disk/by-id/scsi-36000805e000000000000000000000000-part2.
	Want me to fall back to /dev/disk/by-id/scsi-36000805e000000000000000000000000-part2? (y/n)

	This happens due to a new default setting in SUSE Linux, the new default is to reference 
	the storage device (the disks)  "by-id" instead of by-name
	In the past the disks was referenced like sda, sdb ...
	and the partitions of the first disk (sda) as sda1, sda2, sda3 and so on.

	Now the new way to reference disk and partition is:
	(Changes based on the disk manufacturer and other data)
	/dev/disk/by-id/scsi-36000805e000000000000000000000000

	The partitions will be -
	/dev/disk/by-id/scsi-36000805e000000000000000000000000-part1
	/dev/disk/by-id/scsi-36000805e000000000000000000000000-part2

	Around the system, in some configuration files, there are references to the original disks 
	"by-id", unfortunately on the target computer (where we restore the image) the disks will 
	be different, will have different "by-id" name, so linux will be unable to find the disks 
	and boot correctly.


	To boot the OS successfully (with MPT controller card), first disconnect MPT controller 
	card and restart the system and update the following two files by changing the reference 
	"by-name" instead of "by-id". The files are:

	/etc/fstab
	/boot/grub/menu.lst

	In both the files we need to find every instance of names like (example)

	/dev/disk/by-id/scsi-36000805e000000000000000000000000-part1
	/dev/disk/by-id/scsi-36000805e000000000000000000000000-part2

	Change in something like:

	/dev/sda1
	/dev/sda2

	To modify these files from a command prompt we need to run the editor using sudo command.
	sudo vi /etc/fstab
	sudo vi /boot/grub/menu.lst

	After completing the above procedure, shutdown the system and connect MPT controller card 
	then reboot the system. Now the OS boots successfully.


10.	Using Built in VGA adapter System doesn't resume after 	Hibernation

	Using Built in VGA adapter, On few Server Series, if RHEL 6.2 installation is done on a R0 VD 
	connected to SCU controller, then using MSM software create virtual drives(R1) using two other 
	drives apart from the one that has OS VD. After creating R1, fail one of the member PD and 
	initiate rebuild on it. Then set the system into Hibernation. Now, if the system is powered ON 
	[resume from hibernate] then it will not resume to the original state where it was before going 
	into Hibernation. Instead the system hangs[blank screen] after completing SCU OpROM POST.

	Using Add on VGA adapter Card, the above issue doesn't occur.	

11.	In RHEL 6.3 GA, media Error detected automatically after creating VD
	
	If there are drives which contains the media error, then MSM will generate events as soon as we 
	create a Virtual Drive.

12.	Installation of RHEL 7.1 and above OSes
	---------------------------------------
	
	RHEL doesnt support DUD installation on RHEL7.1 and above OS version. Instead it has switched to ISO installation.
	Follow the below steps to install OS using an ISO image:
	
	a.	Copy the ISO image to the root directory a block device(ex: USB flash drive).

	b.	Name the block device as OEMDRV. If RHEL insallater finds a storage device labeled OEMDRV, it will treat it
		as a driver update disc and attempt to load driver updates from this device. If you are unable to rename the     	     media to OEMDRV, copy the ISO to root folder of the device and add the command inst.dd to the boot command 
		line.

	c.	Connect this device to the system and start installation. While booting from DVD press 'e' key to give 3rd 
		party driver using the following commands:

		To use AHCI controller in LSI Raid Mode add the follwing command in boot command line:
		"inst.dd modprobe.blacklist=ahci nodmraid"

	d.	Continue with installation. The installar will take the OEMDRV as the default driver update disk and list all 		     the ISO images. If OEMDRV is not found and inst.dd is mentioned in the boot command line installer will 
		display all the storage devices connected. select the appropriate device using the number keys. 

	e.	Once the appropriate device is selected, the installer will display all the ISO images found in the drive.
		Select the appropriate ISO image. ex: megasr-17.01.2015.1118-1-rhel71-ga-x86_64.iso.

	f.	Once the ISO is selected, it is extracted and the corresponding RPM is listed. Select the rpm image and press		     'c' to continue. Installer will continue installation with the selected RPM image.

	g.	Refer the following link for more on how to install using ISO images: 
		https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-driver-		     updates-performing-ppc.html

13.	On SLES11 32bit OS's, megasr rpm binaries will fail to auto upgrade to the new kernel on performing online OS upgradation
	or OS migration.
