detected non-optimal RAID status

หลังจากที่เราติดตั้ง debian ลงใน vmware แล้ว ส่วนมากเราจะเจออะไรแบบนี้

/var/log/messages

db mpt-statusd: detected non-optimal RAID status

วิธีแก้ ง่ายๆครับ

# /etc/init.d/mpt-statusd stop
# echo RUNDAEMON=no > /etc/default/mpt-statusd

innotop debian

# innotop -u root -p password -h localhost
Can’t locate Term/ReadKey.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/bin/innotop line 1341.
BEGIN failed–compilation aborted at /usr/bin/innotop line 1341.

# aptitude -y install libterm-readkey-perl
The following NEW packages will be installed:
libterm-readkey-perl
0 packages upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
Need to get 33.7 kB of archives. After unpacking 139 kB will be used.
Get:1 http://ftp.debian.org/debian/ squeeze/main libterm-readkey-perl amd64 2.30-4 [33.7 kB]
Fetched 33.7 kB in 2s (11.6 kB/s)
Selecting previously deselected package libterm-readkey-perl.
(Reading database … 31153 files and directories currently installed.)
Unpacking libterm-readkey-perl (from …/libterm-readkey-perl_2.30-4_amd64.deb) …
Processing triggers for man-db …
Setting up libterm-readkey-perl (2.30-4) …

ruby 1.9.3 for Debian Squeeze

# From a fresh install of squeeze
apt-get install ruby rubygems # Need ruby to use fpm
gem1.8 install fpm –no-ri –no-rdoc

apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -zxvf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125
rm -rf /tmp/ruby193
time (./configure –prefix=/usr && make && make install DESTDIR=/tmp/ruby193)

/var/lib/gems/1.8/bin/fpm -s dir -t deb -n ruby193 -v 1.9.3-p125 –description “Self-packaged Ruby 1.9.3 patch 125” -C /tmp/ruby193 \
-p ruby193-VERSION_ARCH.deb -d “libstdc++6 (>= 4.4.3)” \
-d “libc6 (>= 2.6)” -d “libffi5 (>= 3.0.4)” -d “libgdbm3 (>= 1.8.3)” \
-d “libncurses5 (>= 5.7)” -d “libreadline6 (>= 6.1)” \
-d “libssl0.9.8 (>= 0.9.8)” -d “zlib1g (>= 1:1.2.2)” \
-d “libyaml-0-2 (>= 0.1.3)” \
usr/bin usr/lib usr/share/man usr/include

# Post installation test
apt-get remove ruby rubygems
apt-get install libffi5 libyaml-0-2
dpkg -i dpkg -i ruby193-1.9.3-p125_amd64.deb
ruby -ropenssl -rzlib -rreadline -ryaml -e “puts :success”

credit:
https://gist.github.com/futuremill/2318876

mongodb debian squeeze

When you see …

Thu Mar  7 18:02:20 [initandlisten] MongoDB starting : pid=19353 port=27017 dbpath=/var/lib/mongodb 64-bit host=back1
Thu Mar  7 18:02:20 [initandlisten] db version v2.2.3, pdfile version 4.5
Thu Mar  7 18:02:20 [initandlisten] git version: f570771a5d8a3846eb7586eaffcf4c2f4a96bf08
Thu Mar  7 18:02:20 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Thu Mar  7 18:02:20 [initandlisten] options: { config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", logappend: "true", logpath: "/var/log/mongodb/mongodb.log" }
Thu Mar  7 18:02:20 [initandlisten] journal dir=/var/lib/mongodb/journal
Thu Mar  7 18:02:20 [initandlisten] recover : no journal files present, no recovery needed
Thu Mar  7 18:02:20 [initandlisten] 
Thu Mar  7 18:02:20 [initandlisten] ERROR: Insufficient free space for journal files
Thu Mar  7 18:02:20 [initandlisten] Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles
Thu Mar  7 18:02:20 [initandlisten] 
Thu Mar  7 18:02:20 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
Thu Mar  7 18:02:20 dbexit: 
Thu Mar  7 18:02:20 [initandlisten] shutdown: going to close listening sockets...
Thu Mar  7 18:02:20 [initandlisten] shutdown: going to flush diaglog...
Thu Mar  7 18:02:20 [initandlisten] shutdown: going to close sockets...
Thu Mar  7 18:02:20 [initandlisten] shutdown: waiting for fs preallocator...
Thu Mar  7 18:02:20 [initandlisten] shutdown: lock for final commit...
Thu Mar  7 18:02:20 [initandlisten] shutdown: final commit...
Thu Mar  7 18:02:20 [initandlisten] shutdown: closing all files...
Thu Mar  7 18:02:20 [initandlisten] closeAllFiles() finished
Thu Mar  7 18:02:20 [initandlisten] journalCleanup...
Thu Mar  7 18:02:20 [initandlisten] removeJournalFiles
Thu Mar  7 18:02:20 [initandlisten] shutdown: removing fs lock...
Thu Mar  7 18:02:20 dbexit: really exiting now

MongoDB ต้องการพื้นที่อย่างน้อย 3379MB เพื่อทำ journal files

ถ้าเรามีพื้นที่ไม่พอสำหรับทำ journal files เราก็ต้องไปแก้ไข /etc/mongodb.conf
เพิ่มไปว่า

smallfiles = true