August 10, 2016

Quản lý ổ đĩa trong Server Dell

MEGACLI là công cụ được Dell cung cấp, được dùng để tạo, xóa và sửa các ổ đĩa logic và vật lý trên smart array controller (RAID Card) trên Server Dell.

1. Cài đặt

Cài đặt gói megacli tại http://shink.in/9NjeH
wget http://hwraid.le-vert.net/debian/pool-wheezy/megacli_8.07.14-1_amd64.deb
dpkg -i megacli_8.07.14-1_amd64.deb

2. Kiểm tra thông tin về RAID Controller;

megacli -AdpAllInfo -aAll

3. Kiểm tra thông tin về ổ đĩa logic:

megacli -LDInfo -Lall -aALL

4. Kiểm tra thông tin về ổ đĩa vật lý:

megacli -PDList -aALL

5. Sử dụng Script sau để kiểm tra nhanh tình trạng ổ đĩa:

# wget https://raw.githubusercontent.com/longsube/megaclisas-status/master/megaclisas-status
# python megaclisas-status
-- Controller info --
-- ID | Model
c0 | PERC H710 Mini

-- Arrays info --
-- ID | Drives | Type | Size | Status | InProgress
c0u0 | 2 | RAID1 | 558G | Degraded | None

-- Disks info --
-- ID | Model | Status
c0u0p0 | SEAGATE ST3600057SS ES666SL77V3T | Failed
c0u0p1 | SEAGATE ST3600057SS ES666SL78VV5 | Online, Spun Up
Như vậy, 2 ổ đĩa đang được cấu hình RAID 1, với dung lượng sau RAID là 558 GB, trong đó 1 ổ đã bị lỗi.
Tham khảo:

Quản lý ổ đĩa trong Server HP

HPACUCLI (HP Array Configuration Utility CLI) là công cụ được HP cung cấp, được dùng để tạo, xóa và sửa các ổ đĩa logic và vật lý trên smart array controller (RAID Card) trên Server HP.

1. Cài đặt

Cài đặt gói hpcucli.deb tại http://hwraid.le-vert.net/debian/pool-wheezy/
wget http://hwraid.le-vert.net/debian/pool-wheezy/hpacucli_9.20.9.0-1_amd64.deb
dpkg -i hpacucli_9.20.9.0-1_amd64.deb

2. Có 2 cách để thực thi câu lệnh

  • Cách 1: gõ hpacucli, sau đó gõ các câu lênh cần thực thi
# hpacucli
HP Array Configuration Utility CLI 9.20.9.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> rescan
=> exit
  • Cách 2: gõ trực tiếp câu lệnh  # hpacucli rescan 

3. Hiển thị trạng thái của Controller và ổ đĩa

 => hpacucli
HP Array Configuration Utility CLI 9.20.9.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> ctrl all show config

Smart Array P420i in Slot 0 (Embedded)    (sn: 001438030E455F0)

   array A (SAS, Unused Space: 0  MB)


      logicaldrive 1 (1.6 TB, RAID 0, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600 GB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600 GB, OK)

   SEP (Vendor ID PMCSIERA, Model SRCv8x6G) 380 (WWID: 5001438030E455FF)
Hệ thống hiện có 3 ổ đĩa, mỗi ổ có dung lượng 600 GB. Ba ổ này đang được cấu hình RAID 0, dung lượng lưu trữ sau RAID là 1.6 TB

4. Kiểm tra trạng thái RAID Controller

=> ctrl all show status

Smart Array P420i in Slot 0 (Embedded)
   Controller Status: OK
   Cache Status: OK
   Battery/Capacitor Status: OK
Thông tin hiển thị gồm trạng thái card RAID, trạng thái cache và Pin của card.

5. Kiểm tra thông tin ổ cứng

=> ctrl slot=0 pd all show status

   physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 600 GB): OK
   physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 600 GB): OK
   physicaldrive 1I:1:3 (port 1I:box 1:bay 3, 600 GB): OK
Như ta thấy, ổ cứng đang được gắn từ bay 1-3 trên Server, tất cả đêu trong trạng thái tốt.

6. Kiểm tra trạng thái của một ổ

=> ctrl slot=0 pd 1I:1:1 show detail

Smart Array P420i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1
         Port: 1I
         Box: 1
         Bay: 1
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 600 GB
         Rotational Speed: 10000
         Firmware Revision: HPDC
         Serial Number:         KWH9X84R
         Model: HP      EG0600FBVFP
         Current Temperature (C): 33
         Maximum Temperature (C): 40
         PHY Count: 2
         PHY Transfer Rate: 6.0Gbps, Unknown
         Drive Authentication Status: OK
         Carrier Application Version: 11
         Carrier Bootloader Version: 6
Trong câu lệnh, pd là ổ đĩa vật lý, 1I:1:1 là kí hiệu của ổ tại bay 1. Câu lệnh cho ra các thông tin về: dung lượng, vòng quay, Serial number, model, nhiệt độ hiện tại và cao nhất,...

7. Kiểm tra tất cả các ổ đĩa logic

=> ctrl slot=0 ld all show

Smart Array P420i in Slot 0 (Embedded)

   array A

      logicaldrive 1 (1.6 TB, RAID 0, OK)
Hiển thị trạng thái của các ổ đĩa logic tạo trên RAID, như trên ta có 1 ổ đĩa logic 1.6TB

8. Kiểm tra chi tiết trạng thái ổ đĩa vật lý

=> ctrl slot=0 ld 1 show

Smart Array P420i in Slot 0 (Embedded)

   array A

      Logical Drive: 1
         Size: 1.6 TB
         Fault Tolerance: RAID 0
         Heads: 255
         Sectors Per Track: 32
         Cylinders: 65535
         Strip Size: 256 KB
         Full Stripe Size: 256 KB
         Status: OK
         Caching:  Enabled
         Unique Identifier: 600508B1001C8E5EE7B94BC101CBFD3E
         Disk Name: /dev/sda
         Mount Points: /boot 487 MB
         OS Status: LOCKED
         Logical Drive Label: A46B7F43001438030E455F0FF96
         Drive Type: Data

9. Bật/tắt cache

=> ctrl slot=0 modify dwc=disable

=> ctrl slot=0 modify dwc=enable
Câu lệnh để bật hoặc tắt cache trên RAID Controller.

10. Nháy đèn thông báo ổ đĩa

=> ctrl slot=0 ld 1 modify led=on
=> ctrl slot=0 ld 1 modify led=off
Câu lệnh trên sẽ bật tắt đèn trên các ổ đĩa vật lý mà thuộc ổ đĩa logic số 2.
Tham khảo:

Hướng dẫn sử dụng Zabbix Agent để lấy thông tin ổ cứng vật lý của máy chủ Dell

Hướng dẫn lấy thông tin ổ cứng trên Server sử dụng Dell RAID Controller (test trên Server Dell 2950)

1. Trên Server cần giám sát

1.1. Cài đặt gói megacli trên Server cần giám sát(hướng dẫn tại đây) hoặc đây

1.2. Cài đặt zabbix-agent trên Server cần giám sát:

apt-get install zabbix-agent -y

1.3. Lấy các script để lấy thông tin ổ đĩa

mkdir -p /opt/zabbix/linux
cd /opt/zabbix/linux
wget https://raw.githubusercontent.com/longsube/Zabbix_check_physicaldisks_status/master/DELL%20RAID%20Controller/megacli-disk-decovery
wget https://raw.githubusercontent.com/longsube/Zabbix_check_physicaldisks_status/master/DELL%20RAID%20Controller/megacli-disk-status
chmod +x 
chown -R zabbix:zabbix /opt/zabbix

1.4. Cấu hình zabbix agent để lấy quét số lượng đĩa cứng trong Server:

vim /etc/zabbix/zabbix_agentd.conf

#IP Zabbix-Server(ở đây là 172.16.69.45)
Server=172.16.69.45

#hostname cua Zabbix agent
Hostname=kvm4

# Dat USerparameter de zabbix agent quet so luong o dia
UserParameter=custom.vfs.dev.discovery, sudo /usr/bin/python /opt/zabbix/linux/megacli-status

1.5. Cấu hình cho phep user zabbix thực thi với sudo:

echo "zabbix ALL=NOPASSWD: ALL" >> /etc/sudoers

1.6. Cấu hinh zabbix agent lấy thông tin ổ đĩa

cd /etc/zabbix/zabbix_agentd.conf.d
wget https://raw.githubusercontent.com/longsube/Zabbix_check_physicaldisks_status/master/DELL%20RAID%20Controller/dell-disk-status%20.conf
service zabbix-agent restart

2. Trên Zabbix Server

2.1. Tạo Template Template Linux Disk Status để lấy thông tin ổ đĩa

Tao template

2.2. Tạo Discovery rule cho template

Tao discovery ruleZabbix Server sẽ dựa vào key custom.vfs.dev.discovery, lọc theo {#DISK} để lấy tên của ổ đĩa (ở đây là vị trí của ổ đĩa), thời gian lấy mẫu là 30s.

2.3. Tạo Item prototype trong Discovery rule vừa tạo để lấy thông tin tình trạng ổ đĩa

Get disk statusZabbix Server dựa vào key custom.vfs.dev.status[{#DISK}], thời gian lấy mẫu là 50s, loại thông tin là character

2.4. Tạo Item prototype trong Discovery rule vừa tạo để lấy thông tin nhiệt độ ổ đĩa

Get disk temperatureZabbix Server dựa vào key custom.vfs.dev.temperature[{#DISK}], thời gian lấy mẫu là 30s, loại thông tin là numeric

2.5. Thêm host cần giám sát

Add hostĐưa template Template Linux Disk Status giám sát đisk vào host

2.6. Kiểm tra các thông tin ổ đĩa

check

nguồn: https://github.com/longsube/Zabbix_check_physicaldisks_status

Hướng dẫn sử dụng Zabbix Agent để lấy thông tin ổ cứng vật lý của máy chủ HP

1. Server sử dụng HP Raid Controller

Hướng dẫn lấy thông tin ổ cứng trên Server sử dụng HP RAID Controller (test trên Server Dell HP360pG8)

1. Trên Server cần giám sát

1.1. Cài đặt gói hpacucli trên Server cần giám sát(hướng dẫn tại đây) hoặc đây

1.2. Cài đặt zabbix-agent trên Server cần giám sát:

apt-get install zabbix-agent -y

1.3. Lấy các script để lấy thông tin ổ đĩa

mkdir -p /opt/zabbix/linux
cd /opt/zabbix/linux
wget https://raw.githubusercontent.com/longsube/Zabbix_check_physicaldisks_status/master/HP%20RAID%20Controller/hpacucli-disk-decovery
wget https://raw.githubusercontent.com/longsube/Zabbix_check_physicaldisks_status/master/HP%20RAID%20Controller/hpacucli-disk-status
chmod +x 
chown -R zabbix:zabbix /opt/zabbix

1.4. Cấu hình zabbix agent để lấy quét số lượng đĩa cứng trong Server:

vim /etc/zabbix/zabbix_agentd.conf

#IP Zabbix-Server(ở đây là 172.16.69.45)
Server=172.16.69.45

#hostname cua Zabbix agent
Hostname=kvm-hpdl36001

# Dat USerparameter de zabbix agent quet so luong o dia
UserParameter=custom.vfs.dev.discovery, sudo /usr/bin/python /opt/zabbix/linux/hpacucli-status

1.5. Cấu hình cho phep user zabbix thực thi với sudo:

echo "zabbix ALL=NOPASSWD: ALL" >> /etc/sudoers 

1.6. Cấu hinh zabbix agent lấy thông tin ổ đĩa

cd /etc/zabbix/zabbix_agentd.conf.d
wget https://github.com/longsube/Zabbix_check_physicaldisks_status/blob/master/HP%20RAID%20Controller/hpa-disk-status.conf
service zabbix-agent restart

2. Trên Zabbix Server

2.1. Tạo Template Template Linux Disk Status để lấy thông tin ổ đĩa

Tao template

2.2. Tạo Discovery rule cho template

Tao discovery ruleZabbix Server sẽ dựa vào key custom.vfs.dev.discovery, lọc theo {#DISK} để lấy tên của ổ đĩa (ở đây là vị trí của ổ đĩa), thời gian lấy mẫu là 30s.

2.3. Tạo Item prototype trong Discovery rule vừa tạo để lấy thông tin tình trạng ổ đĩa

Get disk statusZabbix Server dựa vào key custom.vfs.dev.status[{#DISK}], thời gian lấy mẫu là 50s, loại thông tin là character

2.4. Tạo Item prototype trong Discovery rule vừa tạo để lấy thông tin nhiệt độ ổ đĩa

Get disk temperatureZabbix Server dựa vào key custom.vfs.dev.temperature[{#DISK}], thời gian lấy mẫu là 30s, loại thông tin là numeric

2.5. Thêm host cần giám sát

Add hostĐưa template Template Linux Disk Status giám sát đisk vào host

2.6. Kiểm tra các thông tin ổ đĩa

check

August 5, 2016

GPO - How to use Group Policy to remove the Adobe Reader desktop shortcut


So below I go through how to use one of the new Group Policy Preferences options is called “Shortcuts” to remove the icon when ever it is re-instated (see below). While in this example I use (pick on) Adobe Reader it can also be used as a guide for removing any other shortcut that you so desire.
Step 1. Edit a GPO that targets the computers that you want to apply the home page setting.
Step 2. Navigate to User Configuration > Preferences > Control Panel Settings > Windows Settings
Step 3. Click on the “Action” menu and click on “New” and then click on “Shortcut”
Step 4. Change the Action to “Delete” then select “All Users Desktop” and then type “Adobe Reader 9” in the name field.
image
Now wait time you install an Adobe Reader update all you have to do is wait for the next group policy refresh and the shortcut will be gone… (Yes).
image