ปัญหา Raid Degraded บนเครื่อง server1.rvglobalsoft.com ทางแก้ปัญหา ทำการตรวจสอบด้วยคำสั่ง cat /proc/mdstat root@server1 [~]# cat /proc/mdstat Personalities : [raid1] [raid0] md3 : active raid1 sda6[0] 29293404 blocks super 1.1 [2/1] [U_] bitmap: 1/1 pages [4KB], 65536KB chunk md5 : active raid1 sda8[0] 3902731 blocks super 1.1 [2/1] [U_] bitmap: 1/1 pages [4KB], 65536KB chunk md4 : active raid1 sda7[0] 401230220 blocks super 1.1 [2/1] [U_] bitmap: 3/3 pages [12KB], 65536KB chunk md0 : active raid1 sda1[0] sdc1[2] 240928 blocks super 1.0 [2/2] [UU] md2 : active raid1 sda5[0] 48828444 blocks super 1.1 [2/1] [U_] bitmap: 1/1 pages [4KB], 65536KB chunk md1 : active raid1 sda2[0] 3902763 blocks super 1.1 [2/1] [U_] bitmap: 1/1 pages [4KB], 65536KB chunk md6 : active raid0 sdc9[1] sda9[0] 1956864 blocks super 1.1 512k chunks จากนั้นให้ดู ว่า Raid ไหนบ้างที่มีปัญหา จากนั้นให้ทำการ add disk ที่หายไปกลับเข้าไปใน Raid device root@server1 [~]# mdadm --manage /dev/md2 --add /dev/sdc5mdadm: re-added /dev/sdc5root@server1 [~]# mdadm --manage /dev/md4 --add /dev/sdc7mdadm: re-added /dev/sdc7root@server1 [~]# mdadm --manage /dev/md5 --add /dev/sdc8mdadm: re-added /dev/sdc8root@server1 [~]# mdadm --manage /dev/md3 --add /dev/sdc6mdadm: re-added /dev/sdc6root@server1 [~]# mdadm --manage /dev/md1 --add /dev/sdc2mdadm: re-added /dev/sdc2 จากนั้นให้ทำการ monitor ด้วย watch cat /proc/mdstat รอจนมีการ sync raid จนเสร็จ สาเหตุปัญหา เกิดจาก HD ที่มีการ add อยู่ใน raid software มีปัญหา อาจจะมี bad secter พอมีการเขียน disk ตรงช่วงนั้นเลยทำให้เกิดปัญหาจึงทำให้ Raid Degraded ได้ครับ
เนื่องจาก SFTP ไม่ได้ระบุสิทธิ์สำหรับไฟล์ที่อัพโหลดขึ้นเซิร์ฟเวอร์ OpenSSH SFTP จะกำหนดสิทธิ์ 0666 ให้กับไฟล์ที่สร้างขึ้นใหม่ จึงทำให้ส่งผลกระทบต่อการใช้งาน วิธีการแก้ไขมีดังนี้ 1. ทำการเปลี่ยนค่า umask ของไฟล์ /etc/profile จาก 002 เป็น 022 # nano -w /etc/profile # By default, we want umask to get set. This sets it for login shell # Current threshold for system reserved uid/gids is 200 # You could check uidgid reservation validity in # /usr/share/doc/setup-*/uidgid file if [ $UID -gt 199 ] && [ "/usr/bin/id -gn" = "/usr/bin/id -un" ]; then umask 022 else umask 022 fi 2. ทำการเปลี่ยนค่า umask ของไฟล์ /etc/bashrc จาก 002 เป็น 022 # nano -w /etc/bashrc # By default, we want umask to get set. This sets it for login shell # Current threshold for system reserved uid/gids is 200 # You could check uidgid reservation validity in # /usr/share/doc/setup-*/uidgid file if [ $UID -gt 199 ] && [ "/usr/bin/id -gn" = "/usr/bin/id -un" ]; then umask 022 else umask 022 fi 3. Run magic commands for Cloudlinux # cagefsctl --force-update; cagefsctl --remount-all 4. ทดสอบการ upload ไฟล์อีกครั้ง
ให้เข้าไปที่ WHM ของเครื่อง manage.netway.co.th จากนั้นให้เข้าไปที่ Home »DNS Functions »Edit DNS Zone แล้วเลือก PTR Zone ที่เราจะทำการสร้าง อย่างเช่น จะทำ PTR Record ให้กับ IP 203.78.101.33 เป็นชื่อ ptr33.netwaygroup.com ให้เราไป edit บน dns zone ที่ชื่อ 101.78.203.in-addr.arpa แล้วให้ใส่รายละเอียดลงไปแล้วกด save เมื่อทำการ สร้างเรียบร้อยแล้วเราสามารถทำการตรวจสอบได้ที่ https://tools.dnsstuff.com เพื่อเช็คค่าที่เราตั้งไว้ว่าถูกต้องหรือไม่
install ssl on nessus server กรณีใช้ ssl free ของ Let's Encrypt ให้ไปที่ https://www.sslforfree.com/ จากนั้นให้ระบุ domain : nessus.ezyadmin.com จากนั้นให้กด Create Free SSL Certificate จะมีขั้นตอนการ Validation domain ให้เราเลือกการแบบ Manual Verifivation (DNS) จากนั้นให้นำค่าที่ได้ไป add ที่ dns zone ของโดเมน ezyadmin.com เมื่อทำการ add ค่า dns zone แล้วสามารถ ทำการตรวจสอบได้ในข้อ 3. Verify TXT records .... เมื่อทำการ Verify TXT records ได้แล้วให้ทำการ Click Download SSL Certificate จะได้ certificate ออกมา ซึ่งจะมีอยู่ 3 ส่วนประกอบไปด้วย Certificate Private Key CA Bundle (Contains Root And Intermediate Certificates) จากนั้นให้ทำการ login ssh เข้าไปที่เครื่อง แล้วนำค่าที่ได้มาใส่บนเครื่องโดย นำค่า Certificate ที่ได้ไปใส่ในไฟล์ /opt/nessus/com/nessus/CA/servercert.pem นำค่า Private Key ที่ได้ไปใส่ในไฟล์ /opt/nessus/var/nessus/CA/serverkey.pem นำค่า CA Bundle (Contains Root And Intermediate Certificates) ที่ได้ไปใส่ในไฟล์ /opt/nessus/var/nessus/CA/serverkey.pem จากนั้นให้ทำการ restart service nessusd ก็สามารถเรียกให้งาน https ได้แล้วครับ
ปัญหา ไม่สามารถทำการ Update cPanel และไม่สามารถใช้งานทุก Service ได้ Error ที่พบ [root@system ~]# /scripts/upcp --force -bash: /scripts/upcp: No such file or directory วิธีการแก้ไขปัญหา 1. ให้ทำการตรวจสอบ Version cPanel ที่ใช้งานอยู่ปัจจุบัน [root@system ~]# more /usr/local/cpanel/version 2. เข้าไปที่ part : /usr/local/cpanel/bin [root@system ~]# cd /usr/local/cpanel/bin 3. ทำการ Download file ที่ใช้ในการ Update โดยต้องทำการ Download file ให้ตรงกับ Version ที่ใช้งานจริงบนเครื่องตามข้อมูลที่ได้จากข้อ 1 [root@system ~]# wget http://httpupdate.cpanel.net/cpanelsync/11.xx.x.xx/cpanel/scripts/updatenow.static.bz2 4. ทำการ Extract file ที่ทำการ Download มาก่อนหน้านี้ [root@system ~]# bzunzip2 updatenow.static.bz2 5. ทำการเปลี่ยน Permission file ให้ถูกต้อง [root@system ~]# chmod 655 updatenow.static 6. ทำการ Run sync file install [root@system ~]# /usr/local/cpanel/bin/updatenow.static --sync หลังจากทำการ Run sync เรียบร้อยแล้วจะสามารถกลับมาใช้งานได้ปกติทั้งหมดให้ระมัดระวังในการเลือก Version ในการ Download file มาให้ถูกต้อง