顯示具有 rhel6 標籤的文章。 顯示所有文章
顯示具有 rhel6 標籤的文章。 顯示所有文章

2013年7月12日 星期五

some file path change on RHEL 6 (1)

部份檔案的位置在 RHEL 6 的時候有了一些轉變,先列出目前遇到的幾個檔案。

/etc/modprobe.conf  
在之前的版本中,寫入 modprobe 參數的位置為 /etc/modprobe.conf
近幾個版本建議把參數改寫在 /etc/modprobe.d/XXXX 底下分類好的檔案中。

[root@local ~]# ll /etc/modprobe.conf
-rw-r--r-- 1 root root 198 Mar  8  2012 /etc/modprobe.conf
[root@local ~]# ll /etc/modprobe.d/
total 32
-rw-r--r-- 1 root root    0 Mar  8  2012 anaconda.conf
-rw-r--r-- 1 root root  833 Oct 12  2010 blacklist-compat
-rw-r--r-- 1 root root  810 Feb 23  2012 blacklist.conf
-rw-r--r-- 1 root root   83 Mar  7  2012 blacklist-firewire

-rw-r--r-- 1 root root 6111 Oct 12  2010 modprobe.conf.dist


在更動 modprobe.d 的資料後,可以執 mkinitrd 把新的設定編譯到之後的 boot image 裡。

mkinitrd -f /boot/initramfs-2.6.32-358.el6.x86_64.XXX.img `uname -r`
## XXX 是跟舊的版本做區隔,把舊的 boot image 留下來之後

在 grub.conf 進行修改,加入新的 boot image 的選項


#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Scientific Linux (2.6.32-358.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=e7351324-1408-496b-915a-3de50c8f4a84 nomodeset rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-358.el6.x86_64.XXX.img
title Scientific Linux (2.6.32-358.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=e7351324-1408-496b-915a-3de50c8f4a84 nomodeset rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-358.el6.x86_64.img



--
rc.local
記載在 rc.local 的指令,會在開機執行一次~~
rhel 6 被 slink 到 /etc/rc.d/rc.local 


[root@local ~]# ll /etc/rc.local 
lrwxrwxrwx. 1 root root 13 May 15 05:18 /etc/rc.local -> rc.d/rc.local

2013年6月16日 星期日

Promise Vtrak Ex30 storage support ALUA on RHEL 6


- Configure the ALUA option on Promise storage (use WebPAM)

1. Device > Component List > Controller > setting
    Choose the option what's "LUN Affinity" and "ALUA".
2. Distribute the RAID to preferred Controller ID when build up LD (Logical Device) .

- Configure the partition and multipath on OS

1. Check the partition ready on system.
cat /proc/partitions

major minor  #blocks  name

   8        0  488386584 sda
... ...
   8       48 21484373504 sdd
   8       32 21484373504 sdc

2. If not dm-X device , then need to install and start the multipath daemon on the system.
# Install device mapper
yum install device-mapper-multipath -y

# Install Promise alua driver
rpm -ivh scsi_dh_alua_Vtrak-2-1.x86_64.rpm

# Configure multipath.conf
cat /etc/multipath.conf
------------------------------
defaults {
        user_friendly_names yes
}

blacklist {
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
        devnode "^(hd|xvd)[b-z][[0-9]*]"
        devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*"
}

devices {
        device {
        vendor                  "Promise"
        product                 "VTrak"
        path_grouping_policy    group_by_prio
        getuid_callout          "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
        prio                    alua
        path_checker            tur
        path_selector           "round-robin 0"
        hardware_handler        "1 alua"
        failback                immediate
        rr_weight               uniform
        rr_min_io               5000
        no_path_retry           queue
        features                "1 queue_if_no_path"
        product_blacklist "VTrak V-LUN"
        }
}
----------------------

# Start the multipath daemon, and add into chkconfig.
/etc/init.d/multipathd start

chkconfig multipathd on

chkconfig --list multipathd
multipathd      0:off   1:off   2:on    3:on    4:on    5:on    6:off

# Confirm the multipath status
multipath -ll -v2
... ...
mpatha (222XXXXXXXXXXXXXX) dm-0 Promise,VTrak E830f
size=20T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=130 status=active
| `- 7:0:0:5 sdc 8:32 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  `- 8:0:0:5 sdd 8:48 active ready running

- Format file system, and mounting

1. Format to xfs file system.
# need to install xfsprogs on system . sunit dependent on RAID strip size (unit: block size)
yum install xfsprogs -y

mkfs -t xfs -f -d sunit=128,swidth=128 /dev/dm-0

2. Label the partition
xfs_admin -L "test01" /dev/dm-0

3. Edit the fstab to mount.
#Add configuration into /etc/fstab
LABEL="test01"          /test01                 xfs     defaults,sunit=128,swidth=128 0 0

mkdir /test01

mount -a

3. df -h to check the  partition status. Run touch to test the function.
df -h

touch /test01/test.file










Done




--
OS: Scientific Linux  6.4
(base on RHEL 6)

Promise Vtrak support alua on RHEL 5.4 
http://kb.promise.com/KnowledgebaseArticle10261.aspx



2013年5月25日 星期六

disable yum auto update on rhel 6


使用的開發版本為  scientific linux cern  &  scientific linux  ,都是基於 rhel 的開發版。

rhel 6 沒辦法像 5 一樣,使用 chkconfig --list|grep yum 看到的那種 update 來關閉
可以從下面兩個地方來做。讓系統不會在不知情之下,自動被更新。


# 直接把 autoupdate 移除
rpm -qa|grep yum|grep auto
yum-autoupdate-2-5.2.noarch

rpm -e yum-autoupdate-2-5.2.noarch

rpm -qa|grep yum-autoupdate




#或是在  /etc/sysconfig/yum-autoupdate 設定檔裡面加上 ENABLED="false"
sed -i '/ENABLED=/s/true/false/' /etc/sysconfig/yum-autoupdate

cat /etc/sysconfig/yum-autoupdate |grep -B5 'ENABLE'
# This file controls the configuration of yum-autoupdate
# For it to work as expected it should be /etc/sysconfig/yum-autoupdate
# ENABLED
#     true - Run yum-autoupdate
#     false - Do not run yum-autoupdate (default)
#   + anything other than true defaults to false
ENABLED="false"