[碎片空间] GaussDB for DWS维护宝典-安装类故障-文件权限导致OS优化失败

问题背景与现象

执行Preinstall,发现OS优化失败导致PreInstall失败,提示Operation not permitted

原因分析

分析Preinstall日志(“/tmp/fi-preinstall.log”)。

Modify /etc/sysctl.conf failed for kernel.sysrq.
sed: cannot rename /etc/sedEVdcVQ: Operation not permitted
[192.168.17.39]Error: run /tmp/fi-preinstall/modules/050.setup/centos-6.x/setup.sh failed
[192.168.17.39]Error: run setup_main 050.setup in [/tmp/fi-preinstall/modules/050.setup] failed
[Thu Apr  9 18:16:16 CST 2015] Debug: [/opt/patch/packages:m2crypto.x86_64:0] Enter [get_rpm_file:23]
Debug: Missing:bind.x86_64
[192.168.17.39]Error: install failed
Error: Execute failed on 192.168.17.39 (50) 
[Thu Apr  9 18:16:16 CST 2015] Debug: [/opt/patch/packages:python-simplejson.x86_64:0] Enter [get_rpm_file:23]
[Thu Apr  9 18:16:16 CST 2015] Info: Run ./script//function/remote.sh -i 192.168.17.39 -P 22 -u root -a /tmp/fi-preinstall-ctrl/preinstall-p.bin -k /tmp/fi-preinstall-ctrl/known_hosts -t 18000 -m ssh-cmd -c bash /tmp/fi-preinstall/modules/install.sh -i "192.168.17.39" -p "0"        -c "" -s "1" -d "1" -k "1" -o "redhat-6.3;redhat-6.4;redhat-6.5;suse-11.1;suse-11.2;centos-6.4;centos-6.5" failed, ret code:50
[Thu Apr  9 18:16:16 CST 2015] Debug: Leave [exec_cmd_r:60]
[Thu Apr  9 18:16:16 CST 2015] Debug: Leave [check_rpms_dir:86]
[Thu Apr  9 18:16:16 CST 2015] Error: [192.168.17.39] Setup os failed

/etc/sysctl.conf”这个文件添加了隐藏权限(i权限),导致文件修改失败。

解决办法

              1. 执行lsattr -a /etc/sysctl.conf查看文件隐藏权限。

              2. 执行chattr -i /etc/sysctl.conf删除文件隐藏权限(i权限)。