Resize LVM logical volume


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
I got system with LVM partitioned harddisk.

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      7.8G  2.2G  5.3G  29% /
/dev/sda1              99M   16M   78M  17% /boot
tmpfs                  93M     0   93M   0% /dev/shm
/dev/mapper/VolGroup00-LogVol02
                      5.3G  297M  4.8G   6% /home/data

and I want to incease the size on /dev/mapper/VolGroup00-LogVol02
because I'll be need it to put many files which size are big enough
(around 200MB each, -- oke it's an anime files I donwloaded)

So here's how

Unmount it first
# umount /home/data

Check how much avaible free space that I can used

# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               26.97 GB
  PE Size               32.00 MB
  Total PE              863
  Alloc PE / Size       441 / 13.78 GB
  Free  PE / Size       422 / 13.19 GB
  VG UUID               EGP9Wu-pDX3-hXQm-RHFg-hPFd-3XYu-ub9dow

# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               8.45 GB / not usable 12.19 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              270
  Free PE               1
  Allocated PE          269
  PV UUID               gYLRcC-qlo6-ikce-jHmC-830R-6QUt-jpoYiW

--- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               VolGroup00
  PV Size               18.55 GB / not usable 22.71 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              593
  Free PE               421
  Allocated PE          172
  PV UUID               H1VE4F-OeOm-28Nw-89oq-7V00-PJCT-Ixs345


Founded it's 421
# lvresize -l +421 /dev/VolGroup00/LogVol02

Just to make sure everyting ok after resize
# lvscan
# tune2fs -l /dev/VolGroup00/LogVol02

Resize the filesystem
# e2fsck -f /dev/VolGroup00/LogVol02
# resize2fs /dev/VolGroup00/LogVol02

Mount it and check the result
# mount /home/data
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      7.8G  2.2G  5.3G  29% /
/dev/sda1              99M   16M   78M  17% /boot
tmpfs                  93M     0   93M   0% /dev/shm
/dev/mapper/VolGroup00-LogVol02
                       19G  301M   18G   2% /home/data




[qmailtoaster] backup vpopmail database using mysql-zrm


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
Tutorial: mysql-zrm installation for backup vpopmail database

make sure on /etc/my.cnf the following parameters is there, if not added and restart MySQL
[mysqld]
...
log-bin
server-id       = 1

[mysqlhotcopy]
interactive-timeout

download copy of mysql-zrm from http://zmanda.com/download-zrm.php
I am still using old version which you can get the copy on my site
MySQL-zrm-1.1.3-1.noarch.rpm
MySQL-zrm-socket-server-1.1.3-1.noarch.rpm

If you want to use mysqlhotcopy (which is faster and smaller backup) for MySQL-zrm do backup, it requires perl-DBD-MySQL. so if you are want to use mysqlhotcopy, I suggest install perl-DBD-MySQL and solves it required dependencies

# rpm -ivh MySQL-zrm-1.1.3-1.noarch.rpm
# vi /etc/mysql-zrm/mysql-zrm.conf
backup-level=0
backup-mode=logical
retention-policy=10W
replication=0
compress=1
compress-plugin=/usr/bin/gzip
databases=vpopmail
user="backup"
password="backup"
host="localhost"

Create user backup (enter your MySQL's root password)

# mysql -uroot -p -h localhost
Enter password:
mysql> GRANT LOCK TABLES, SELECT, FILE, RELOAD, SUPER, CREATE, DROP,
    -> INDEX, SHUTDOWN, INSERT, ALTER, REPLICATION CLIENT
    -> ON *.*
    -> TO 'backup'@'localhost'
    -> IDENTIFIED BY 'backup';
mysql> flush privileges;


testing backup (make sure no error found)
# mysql-zrm-scheduler --now

schedule mysql-zrm to do weekly backup on 01:00
# mysql-zrm-scheduler --add --interval weekly --start 01:00

you can also schedule mysql-zrm to do daily backup but please make sure you have enough diskspace
# mysql-zrm-scheduler --add --interval daily --start 01:00

and verify it
# mysql-zrm-scheduler --query

create bash script to maintain MySQL's binlog file
# vi /root/maintainbinlog.sh
#!/bin/bash
AGE=100 # days
AGE_MINS=$[ $AGE * 60 * 24 ]
OLDLOGS=`find /var/lib/mysql/*-bin.* -cmin +$AGE_MINS | tail -n 1 | gawk -F'/' '{print $5}'`
/usr/bin/mysql -u backup -pbackup mysql -e "PURGE MASTER LOGS TO '$OLDLOGS'"
# chmod +x maintainbinlog.sh

add crontab schedules to maintain MySQL's binlog and mysql-zrm backup file
# crontab -e
0 3 * * * /root/maintainbinlog.sh
0 4 * * * /usr/bin/mysql-zrm --action purge


further info visit ZManda Quick MySQL Backup,
mysql-zrm wiki, and ZManda




[spamd] server reached --max-children setting, consider raising it


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
SpamAssassin on my Qmailtoaster error
"server reached --max-children setting, consider raising it"

try googling and it seems default children process are 5
some says check your free memory (free )
and what memory is used for each spamd child process (ps or top )
multiply it to get the number spamd children.

but some also said why dont you increase 1 first and see if the error came up again
if it came up again add another one. it becase spamd use a lot of memory to scan 1 messages (in my system, it used about 85MB)

so I added option -m 6 on my /var/qmail/supervise/spamd/run

#!/bin/sh
exec /usr/bin/spamd -A 10.10.64. -m 6 -x -u vpopmail -s stderr 2>&1



511 sorry, can't find a valid MX for sender domain (#5.1.1 - chkuser)


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
I got a running PHP Script (it's a helpdesk script) working about 6 months ago on my local intranet server
I got DNS and Mail (qmailtoaster) server on public network (DMZ)
last week I am upgrading my qmailtoaster with chkuser enable. (last qmailtoaster installation, chkuser was disabled)
and Helpdesk staff complaining that no email came from Helpdesk system.
check on my intranet server, I found this error

... while talking to mails.myholding.com.:
>>> MAIL From:<apache@intranet.myholding.com> SIZE=1313
<<< 511 sorry, can't find a valid MX for sender domain (#5.1.1 - chkuser)
554 5.0.0 Service unavailable


Googling with keywords:
- 511 sorry, can't find a valid MX for sender domain
- apache@localhost.localdomain
for 2 hours, got no luck.

/etc/mail/sendmail.cf, /etc/php.ini, /etc/httpd/conf/httpd.conf open and edit many time
restarting httpd and sendmail
still no luck

then try to add ns.myholding.com record on my DNS server
try Helpdesk system again...

Walah....!!! it workssss!!!!
Helpdesk Application emailing system now working again.....
HAPPY....!!!!

it seems qmailtoaster need to check sender machine record on DNS server


Setting NTP Client on Windows 2000 / XP


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
Setting NTP Client For Windows 2000 and Windows XP (using command):
Go to START > Run > type cmd (a command prompt will be open)
on the command prompt, type as follow, assume the NTP server is time.nist.gov or you can use your server IP address.

C:\ net time /setsntp:time.nist.gov

C:\ net stop w32time

C:\ net start w32time

Hola… you already set your Windows 2000 NTP sync without 3rd party application. Then check using this, should be no error is generated.

C:\ net time /querysntp


from Networking is Easy


Setting Lighttpd on CentOS with folder listing and authentication


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
I heard Lighttpd is smaller (size and memory usage) than Apache, faster and more responsive. That's why I am interesting to try it out.
I have a server which has 800GB harddisk which is used for backup purpose. So I am only used 256MB of memory. At first I am not planning to have httpd and/or webdav access so I am only configure ssh/sftp, nfs, rsync, ftp, samba and webmin. But then I am realized I need a webserver to display folder listing via browser so I can easily know last backup status. And an authentication so only me who can see it.

Because I am only need displaying folder listing, I am not intended to use a PHP script (or with mysql) and I have small RAM, that why I am interest to try lighttpd. Here how I am configure my CentOS with Lighttpd:

1. Get and install lighttpd with its dependency. It's not CentOS standard package so you can download from lighttpd.net but if you have rpmforge's repository, you can use "yum install lighttpd"

2. Configure Lighttpd configuration
# vi /etc/lighttpd/lighttpd.conf

#server.document-root = "/var/www/html/"
server.document-root = "/home/admin/backup/"
server.port = 80
server.dir-listing = "enable"

mimetype.assign = (
  ".html" => "text/html",
  ".txt" => "text/plain",
  ".jpg" => "image/jpeg",
  ".png" => "image/png"
           )

server.modules              = (
#                               "mod_rewrite",
#                               "mod_redirect",
#                               "mod_alias",
                                "mod_access",
#                               "mod_cml",
                                "mod_dirlisting",
#                               "mod_trigger_b4_dl",
                                "mod_auth",
#                               "mod_status",
#                               "mod_setenv",
#                               "mod_fastcgi",
#                               "mod_proxy",
#                               "mod_simple_vhost",
#                               "mod_evhost",
#                               "mod_userdir",
#                               "mod_cgi",
#                               "mod_compress",
#                               "mod_ssi",
#                               "mod_usertrack",
#                               "mod_expire",
#                               "mod_secdownload",
#                               "mod_rrdtool",
                                "mod_accesslog" )

# files to check for if .../ is requested
index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm" )

auth.backend               = "plain"
auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.access"
auth.require = ( "/" =>
                 (
                   # method must be either basic or digest
                   "method"  => "basic",
                   "realm"   => "Server Authorization",
                   "require" => "user=admin"
                 )
                )

3. Setup username password for authentication to use. I dont have htpasswd program, so I use plain file only.
# vi /etc/lighttpd/lighttpd.access
admin:adminpassword

4. Add Lighttpd on system start
# chkconfig --add lighttpd
# chkconfig lighttpd on

5. Run Lighttpd
# service lighttpd start




Setup rsync server on CentOS


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
Step-by-step installation and configuration rsync server on CentOS
From transamrit.net
  • Make sure xinetd and rsync is available, if not type
    # yum -y install rsync xinetd
  • Add xinetd service to system
    # chkconfig --add xinetd
  • Make sure xinetd running on init 3 and 5
    # chkconfig --list xinetd
  • Enable rsync
    # vi /etc/xinetd.d/rsync
    Change disable = yes into disable = no
  • Create username and password for rsync client to use
    # vi /etc/rsyncd.secrets
    adminname:hispassword
  • Create configuration and shares for rsync daemon
    # vi /etc/rsyncd.conf
    max connections = 2
    log file = /var/log/rsync.log
    timeout = 300

    [shares]
    comment = shared data stored here
    path = /home/adminname/shares
    read only = false # chg to true if you want read only
    list = yes
    uid = adminname
    gid = adminname
    auth users = adminname
    secrets file = /etc/rsyncd.secrets
    hosts allow = 10.10.105.0/24
  • Secure /etc/rsyncd.*
    # chown root.root /etc/rsyncd.*
    # chmod 600 /etc/rsyncd.*
  • Restart xinetd
    # service xinetd restart
  • Make sure rsync now running
    # chkconfig --list
  • Perhaps you also want to enable port 873 tcp and udp on your firewall so other can connect to your server



My Firefox Extensions


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web

These list is created by Extension List Dumper

Application: Firefox 2.0.0.6 (2007072518)
Operating System: WINNT (x86-msvc)

September 1, 2007

Total number of items: 22




Page :  1