Log in

No account? Create an account
Recent Entries 
22nd-Aug-2013 05:47 pm - perc h200 slow write
убитый смайл

I just bought a small Dell server Poweredge 110 II. I was all about saving money and keeping ESXi compatibility so I choose the Perc H200 as the raid card with 2 SATA drives.

The installation works perfectly to the point where it feeled that many of my virtual machines were spending a lot of time in iowait. I started to make some test and finally found out that I had very very very slow writes : 12Mo/s. Yes you read well, I bought an additionnal raid card (Perc H200) to have a write speed that lame (any 10 year old IDE drive can do better).

After a lot of googling I found out I was not the only one (some guy said that it took 1,5 week to create an RAID 1 array of 1TB). Dell officially explains that as the Përc H200 does not have a battery, it does not use any cache (so far understandable) and it disables disk cache (unbelievable).

I also tried to update the firmware or find some hidden option but without any luck. As my main use of this server was ESXi and I didn't wand to invest in a Perc H700 (with BBU), I continued the search.

French power !!!!
I found in a french forum a way to enable the disk cache. It should not harm your data (at least not mine), but do a backup before. So here is a quick translation.

Get Ubuntu
Download the latest Ubuntu CD for amd64. In my case : ubuntu-11.04-desktop-amd64.iso.

Boot the CD
Choose your language and click Try Ubuntu
Start a command line (Application → Accessories → Terminal)
Install and configure the tools
sudo echo 'deb http://linux.dell.com/repo/community/deb/latest /' | sudo tee -a /etc/apt/sources.list.d/linux.dell.com.sources.list

sudo apt-get update
sudo apt-get install -y --force-yes srvadmin-base
sudo apt-get install -y --force-yes srvadmin-storageservices

sudo service dataeng start
Check if the disk cache is disabled
sudo /opt/dell/srvadmin/bin/omreport storage vdisk | grep 'Disk Cache Policy'
If you already got : Disk Cache Policy : Enabled then sorry there's nothing I can do for you.
Otherwise try this command to enable the cache (it's persistent across reboot) :
sudo /opt/dell/srvadmin/sbin/omconfig storage vdisk action=changepolicy controller=0 vdisk=0 diskcachepolicy=enabled
In my case I went back to a write speed of 90Mo/s. Way better!

Hope this helps !

RHEL, Centos:

wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
yum install srvadmin-base
yum install srvadmin-storageservices
yum install srvadmin-omcommon
service dataeng start
/opt/dell/srvadmin/bin/omreport storage vdisk | grep 'Disk Cache Policy'
/opt/dell/srvadmin/sbin/omconfig storage vdisk action=changepolicy controller=1 vdisk=0 diskcachepolicy=enabled
/opt/dell/srvadmin/sbin/omconfig storage vdisk action=changepolicy controller=0 vdisk=1 diskcachepolicy=enabled
22nd-Jan-2013 01:18 pm(no subject)
убитый смайл
16th-Dec-2012 04:53 pm(no subject)
убитый смайл
27th-Sep-2012 06:46 pm(no subject)
убитый смайл
20th-Sep-2012 08:10 pm - iotop для FreeBSD
убитый смайл
iotop для FreeBSD
top -m io -o total
23rd-Aug-2012 03:03 pm - portdowngrade
убитый смайл
portdowngrade lang/php5 -s :pserver:anoncvs@anoncvs.tw.FreeBSD.org:/home/ncvs

тоже полезно
убитый смайл
Move your Ubuntu system to another computer in 3 simple steps

Step 1: Store the list of installed packages
Run the following command on the source machine to store the installed packages names in ~/pkglist:
sudo dpkg --get-selections | sed "s/.*deinstall//" | sed "s/install$//g" > ~/pkglist

Step 2: Transfer your config
Use scp or rsync or even a flash drive to transfer your home directory (~/*, ~/.*), the source list (/etc/apt/sources.list) and any other files you customized or installed (like apache config under /etc or softwares on /opt) from the source machine to the target one.

Step 3: Install packages
On the target machine run the following command in a failsafe terminal session to install your packages:

sudo aptitude update && cat pkglist | xargs sudo aptitude install -y

That’s all folks!
29th-Jun-2012 03:01 pm - Old LSI MegaRAID tool: megarc
убитый смайл
How do I check LSI MegaRAID controller and raid array status on a linux server

Use the LSI MegaRAID megarc command line cli tool

Download the megarc tool
Download the megarc.bin utility which can be downloaded from LSI website at http://www.lsi.com/downloads/Public/MegaRAID Common Files/ut_linux_megarc_1.11.zip

# mkdir /opt/LSI_MegaRAID
# unzip ut_linux_megarc_1.11.zip
# chmod 700 megarc
How to check LSI MegaRAID status with megarc
Check all Logical drives on Adapter “0″

# ./megarc -ldInfo -a0 -Lall

LSI MegaRAID – How to rebuild a degraded array with monitoring
Posted on Friday, October 29th, 2010 under Uncategorized

I ran into this problem this week and found some pretty neat commands to help with the process. The commands a quite long and/or annoying so I’m going to run through it here so I have something to look back to and so it can help someone else.

First of all, the card I’m working with is a: MegaRAID SATA 150-4D

You’ll need this file (which should be downloaded onto the machine itself)


Unzip this and you’ll find a file called megarc.bin – This is what we’ll use

OK so, to check the status of the RAID run:

./megarc.bin -ldInfo -a0 -Lall

Which will show:

Logical Drive 0 : SpanLevel_0 Disks
Chnl Target StartBlock Blocks Physical Target Status
—- —— ———- —— ———————-
0 00 0×00000000 0x12a17800 FAIL
0 01 0×00000000 0x12a17800 ONLINE
0 02 0×00000000 0x12a17800 ONLINE

So we now, open the server and replace disk in port 00. The RAID card will state the port numbers on it, trace back the SATA cable to the drive.
When the server boots, hit Ctrl+M or press Enter when prompted by the RAID card. Hit the “Rebuild option” then hit F10.

It’ll show a progress bar, but don’t mind that, hit Ctrl + Alt + Del and reboot it. The RAID will continue to rebuild whilst the server can be online.
To track the progress of the RAID’s rebuild run:
./megarc.bin -showRbld -a0

If you wish (and I recommend you do) to increase the built rate from the default 30% to 80% run:

./megarc.bin -setRbldRate 80 -a0

That’s pretty much it, wait for your RAID to cook and your done.
убитый смайл
Вот он, способ моей мечты.

How to create bootable MsDos Flash drive in ubuntu?

>>sudo apt-get install qemu
umount flash drive
>>sudo umount /dev/sdc1
download msdos622.img
>>sudo qemu-system-i386 -boot a -fda msdos622.img -hda /dev/sdc
to create active partition on flash drive.
4- delete
1 - create
>format /s c:
to format "C" drive and copy system files.
>fdisk /mbr
to allow booting from c: drive.

Turn off quemu. Reconnect flash-drive.
Copy new BIOS and Flasher
убитый смайл
download http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaCLI.zip (wget не получилось)
mkdir tmp
mv 8.02.16_MegaCLI.zip tmp
cd tmp
unzip 8.02.16_MegaCLI.zip
unzip MegaCliLin.zip
apt-get install rpm2cpio
rpm2cpio MegaCli-8.02.16-1.i386.rpm | cpio -idmv
mv ./opt/MegaRAID /opt
cd ../../
mkdir fakeuname
cd fakeuname
wget http://supportex.net/files/fakeuname/fakeuname.c
gcc -Wall -fPIC -c fakeuname.c
gcc -Wall -shared -o libfakeuname.so fakeuname.o
sudo install -m 644 libfakeuname.so /opt/MegaRAID/MegaCli/
sudo -i
cd /opt/MegaRAID/MegaCli/
ln -s /lib/libsysfs.so.2 /lib/libsysfs.so.2.0.2
LD_PRELOAD=./libfakeuname.so ./MegaCli64 -AdpAllInfo -aALL | less

for 10.04


I came across a couple of good cheat sheets for MegaCLI –

For me, the most useful ones were:

#Physical Disk List
./MegaCli64 -PDList -aALL

#Physical Drive Info
./MegaCli64 -pdInfo -PhysDrv \[252:4\] -aALL |less

#Logical Disk Info
./MegaCli64 -LDInfo -LAll -aAll | less

# Config Display
./MegaCli64 -CfgDsply -aALL

# Config add Logical Drive
./MegaCli64 -CfgLdAdd -r0 \[252:4,252:5\] -a0

# Logical Drive Init
./MegaCli64 -LDInit -Start -L2 -a0

We installed another two drives in the machine, which i was able to bring online in a RAID 0 volume using:
./MegaCli64 -CfgLdAdd -r0 \[252:4,252:5\] -a0

However, even after having created this RAID 0 volume, my OS couldn’t see it when using ‘fdisk -l‘ – i had to run
echo “- – -” > /sys/class/scsi_host/host0/scan
which forces a SCSI bus rescan, and made available the new drive.
This page was loaded May 21st 2018, 2:46 pm GMT.