Sunday, October 5, 2014

CCISS on Slackware 14.1

So I'm going to fast forward a bit, I want to share this because its important. I needed a decently modern system for work, and this time I was willing to shell out extra for it. I found a Gen5 HP ML 350, a dual proc mobo w/ 1 quad core X5355 Xeon, 8Gb Ram, 2x 15k 3G SAS drives, which I got for 150. I had to use Windows 7 on it for work purposes, but I finally was able to get rid of it and load up Slackware 14.1 x64.

After I bought the system I bought a couple extra SAS drives. I currently have 4x 15k 73.4 GB 3G SAS drives. This system has a HP Smart Array E200i SAS Controller. Although the huge kernel loads both hpsa and cciss, the system auto defaulted to using cciss.

I wanted to try out hardware raid in this install. So in the Smart Array ROM BIOS, I created a single logical array (drive), using all four disks, into a single RAID 0 array. No redundancy at all in this scenario--I know, but thats ok.

(I have a few emulex adapters I'm planning to setup a SAN with and setup a chron to periodically rsync to my storage server throughout the day, so i'm not concerned.)

CCISS is HP's deprecated block driver, which has since been replaced by HPSA which is a SCSI driver.

So, when you see your devices in the system, they are shown under /dev/cciss as such:

bash-4.2# cat /proc/partitions
major minor  #blocks  name

 104        0  286617757 cciss/c0d0
 104        1    8388608 cciss/c0d0p1
 104        2    4194304 cciss/c0d0p2
 104        3  274033821 cciss/c0d0p3


So c0d0 is the 1st logical drive the controller sees, and the partitions are listed as such.

bash-4.2# fdisk -l

Disk /dev/cciss/c0d0: 293.5 GB, 293496583168 bytes
255 heads, 32 sectors/track, 70249 cylinders, total 573235514 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x73841e94

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1            2048    16779263     8388608   82  Linux swap
/dev/cciss/c0d0p2        16779264    25167871     4194304   83  Linux
/dev/cciss/c0d0p3        25167872   573235513   274033821   83  Linux




So when I run through the installer, I used the partition layout shown above, and thought everything was peachy until I got to the end, after rebooting, was stuck in an infinite loop where my system didn't know what to boot.

This comes down to a lilo configuration issue.

I essesntially followed the directions given by Nasser here:
http://linax.wordpress.com/2009/09/26/slackware-boot-on-cciss-dev/

but, the layout he describes didn't work for me. In his directions, he designates the boot= directive to a partition.

I found you have to designate the boot directive to the logical disk. In other words:

boot = /dev/cciss/c0d0

Afterwards simply follow the steps as given by Nasser. Here is a step by step:

1. Run through setup as normal. Partition disks as you see fit.
2. Setup Lilo as normal. We will edit it after installation is complete.
3. Post Install--Modify Lilo:

chroot /mnt

and edit lilo.conf to ensure boot designates the logical disks your partitions reside on, i.e. 

boot = /dev/cciss/c0d0

4. Install Lilo

lilo -M /dev/cciss/c0d0 mbr
lilo

Here is my lilo.conf which got my system to finally boot (I am in fact using this system to make this very post):

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/cciss/c0d0

#compact        # faster, but won't work on all systems.

# Standard menu.
message = /boot/boot_message.txt

# Append any additional kernel parameters:
append="root=/dev/cciss/c0d0p3 vt.default_utf8=0"
#prompt
#timeout = 5
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0     # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/cciss/c0d0p3
  label = s14164
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends


Further reading:

http://cciss.sourceforge.net/


1 comment:

  1. Honestly, the only time where you need to designate a partition for the boot directive that I can think of, is when you are initiating a software MD raid install. I have a separate post dedicated for my adventures w/ mdraid.

    ReplyDelete