echo "- - -" > /sys/class/scsi_host/host0/scan pvcreate /dev/sdb vgdisplay vgextend VolGroup00 /dev/sdb lvextend -l +100%FREE /dev/mapper/VolGroup00-LogVol00 resize2fs /dev/mapper/VolGroup00-LogVol00
Posts Tagged ‘linux’
LVM Add Disk Resize/Extend Maximum Space
LVM Removing PV device
[root@rhel ~]# pvdisplay /dev/sdb: read failed after 0 of 4096 at 0: Input/output error echo 1 > /sys/class/scsi_device/0:0:1:0/device/delete
LVM Missing UUID
Boot to rescue mode then…
lvm pvdisplay lvm pvcreate --restorefile /etc/lvm/backup/VolGroup00 VolGroup00 --uuid <missing-uuid> <device-/dev/sdas> lvm vgcfgrestore --file /etc/lvm/backup/VolGroup00 VolGroup00
HP RAID Controller Diagnostics using hpacucli on Red Hat Enterprise Linux
rpm -ivh hpacucli-8.60-8.0.noarch.rpm
3 examples below…
ctrl all show
ctrl all show config
ctrl all show config detail
[root@hp ~]# hpacucli ctrl all show Smart Array P410 in Slot 2 (sn: SOME SERIAL) Smart Array P410i in Slot 0 (Embedded) (sn: SOME SERIAL)
[root@hp ~]# hpacucli ctrl all show config Smart Array P410 in Slot 2 (sn: SOME SERIAL) array A (SAS, Unused Space: 0 MB) logicaldrive 1 (820.2 GB, RAID 50, OK) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK) physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146 GB, OK) physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK) physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 146 GB, OK) physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SAS, 146 GB, OK) SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 (WWID: SOME SERIAL) Smart Array P410i in Slot 0 (Embedded) (sn: SOME SERIAL) array A (SAS, Unused Space: 0 MB) logicaldrive 1 (546.8 GB, RAID 1+0, OK) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK) physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146 GB, OK) physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK) physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 146 GB, OK) physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SAS, 146 GB, OK)
[root@hp ~]# hpacucli ctrl all show config detail Smart Array P410 in Slot 2 Bus Interface: PCI Slot: 2 Serial Number: SOME SERIAL Cache Serial Number: PBCDF0CRHZ300W RAID 6 (ADG) Status: Disabled Controller Status: OK Chassis Slot: Hardware Revision: Rev C Firmware Version: 3.00 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 15 secs Surface Scan Mode: Idle Queue Depth: Automatic Monitor and Performance Delay: 60 min Elevator Sort: Enabled Degraded Performance Optimization: Disabled Inconsistency Repair Policy: Disabled Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 0 secs Cache Board Present: True Cache Status: OK Accelerator Ratio: 25% Read / 75% Write Drive Write Cache: Disabled Total Cache Size: 1024 MB No-Battery Write Cache: Disabled Cache Backup Power Source: Capacitors Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Array: A Interface Type: SAS Unused Space: 0 MB Status: OK Logical Drive: 1 Size: 820.2 GB Fault Tolerance: RAID 50 Number of Parity Groups: 2 Heads: 255 Sectors Per Track: 32 Cylinders: 65535 Strip Size: 64 KB Status: OK Array Accelerator: Enabled Parity Initialization Status: Initialization Completed Unique Identifier: 600508B100103956595631505A380300 Disk Name: /dev/cciss/c1d0 Mount Points: None Logical Drive Label: A0209451SOME SERIAL7F50 Parity Group 0: physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK) physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146 GB, OK) physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 146 GB, OK) Parity Group 1: physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK) physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK) physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SAS, 146 GB, OK) physicaldrive 1I:1:1 Port: 1I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1RN0300009051BF0U Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 1I:1:2 Port: 1I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1SWW500009051BDJQ Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 1I:1:3 Port: 1I Box: 1 Bay: 3 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1STSP00009051YRRF Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 1I:1:4 Port: 1I Box: 1 Bay: 4 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1S7H800009051H7ZU Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:5 Port: 2I Box: 1 Bay: 5 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB182KT00009051H7YY Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:6 Port: 2I Box: 1 Bay: 6 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB182AF00009051H20G Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:7 Port: 2I Box: 1 Bay: 7 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1SV2D00009051BGS0 Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:8 Port: 2I Box: 1 Bay: 8 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB181MN00009051Z0TS Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 Device Number: 250 Firmware Version: RevC WWID: SOME SERIAL Vendor ID: PMCSIERA Model: SRC 8x6G Smart Array P410i in Slot 0 (Embedded) Bus Interface: PCI Slot: 0 Serial Number: SOME SERIAL RAID 6 (ADG) Status: Disabled Controller Status: OK Chassis Slot: Hardware Revision: Rev C Firmware Version: 3.00 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 15 secs Surface Scan Mode: Idle Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 0 secs Cache Board Present: False Drive Write Cache: Disabled SATA NCQ Supported: True Array: A Interface Type: SAS Unused Space: 0 MB Status: OK Logical Drive: 1 Size: 546.8 GB Fault Tolerance: RAID 1+0 Heads: 255 Sectors Per Track: 32 Cylinders: 65535 Strip Size: 128 KB Status: OK Unique Identifier: 600508B1001030394241393441301000 Disk Name: /dev/cciss/c0d0 Mount Points: /boot 101 MB OS Status: LOCKED Logical Drive Label: A000A241SOME SERIAL0ABC Mirror Group 0: physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK) Mirror Group 1: physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146 GB, OK) physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK) physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 146 GB, OK) physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SAS, 146 GB, OK) physicaldrive 1I:1:1 Port: 1I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1SVAA00009051H17G Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 1I:1:2 Port: 1I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1SV9Y00009051K2C3 Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 1I:1:3 Port: 1I Box: 1 Bay: 3 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1RP4R00009051AHF9 Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 1I:1:4 Port: 1I Box: 1 Bay: 4 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1S8Y3000090462D2G Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:5 Port: 2I Box: 1 Bay: 5 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1SXSC00009051JQNT Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:6 Port: 2I Box: 1 Bay: 6 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1SYHC00009049MP37 Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:7 Port: 2I Box: 1 Bay: 7 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1T7HD000090335RAR Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown physicaldrive 2I:1:8 Port: 2I Box: 1 Bay: 8 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 15000 Firmware Revision: HPDE Serial Number: 3TB1SVN600009041KXNP Model: HP EH0146FAWJB PHY Count: 2 PHY Transfer Rate: 6.0GBPS, Unknown
Installing & Configuring DHCP on Red Hat Enterprise Linux
yum install dhcp -y cp /etc/dhcpd.conf /etc/dhcpd.conf.orig cat > /etc/dhcpd.conf << EOF ddns-update-style interim; ignore client-updates; allow booting; allow bootp; option option-128 code 128 = string; option option-129 code 129 = text; next-server TFTP.IP; filename "/pxelinux.0"; subnet IP.SUBNET netmask 255.255.255.0 { option routers GW.IP; #Default Gateway option subnet-mask 255.255.255.0; option domain-name "test.local"; option domain-name-servers DNS1; #option netbios-name-servers WINS1; range dynamic-bootp DHCP1 DHCP2; #DHCP Range to assign default-lease-time 43200; max-lease-time 86400; } EOF cp /etc/sysconfig/dhcpd /etc/sysconfig/dhcpd.orig cat > /etc/sysconfig/dhcpd << EOF DHCPDARGS=eth0 EOF service dhcpd restart chkconfig dhcpd on
Centrify Installation & Configuration on Red Hat Enterprise Linux
#!/bin/bash CENTRIFY_SW_TARBALL="centrify-suite-2011-rhel3-x86_64.tgz" CENTRIFY_AD_SERVER="AD-SERVER.SUB.DOMAIN.COM" CENTRIFY_AD_DOMAIN="AD-DOMAIN.local" CENTRIFY_AD_JOINER_USER="JOINER-ACCOUNT" CENTRIFY_AD_JOINER_PASS="JOINER-PASSWORD" CLIENT_JOIN_NAME="`hostname`" id | grep uid=0 > /dev/null if [ "$?" != "0" ]; then echo ERROR: Only the superuser can run this script. echo Exiting ... exit 1 fi if [ -d /root ]; then cd /root mkdir centrify cd centrify wget http://WEBSERVER/centrify/${CENTRIFY_SW_TARBALL} tar xvfz ${CENTRIFY_SW_TARBALL} fi if [ -f /root/centrify/install-express.sh ]; then printf "kicking off non-interactive install\n" cd /root/centrify ./install-express.sh -n --express fi if [ -f /usr/sbin/adjoin ]; then # for standard edition+ only. does not work with express # /usr/sbin/adjoin --selfserve --name ${CLIENT_JOIN_NAME} --server ${CENTRIFY_AD_SERVER} --force ${CENTRIFY_AD_DOMAIN} # express method /usr/sbin/adjoin -w -u ${CENTRIFY_AD_JOINER_USER} -p ${CENTRIFY_AD_JOINER_PASS} ${CENTRIFY_AD_DOMAIN} if [ "$?" = "0" ]; then /usr/bin/adinfo fi fi
Posted: March 25th, 2011
Categories: ad, centos, centrify, directory services, linux, rhel
Tags: active directory, ad, centrify, linux, sso
Comments: No Comments.
Categories: ad, centos, centrify, directory services, linux, rhel
Tags: active directory, ad, centrify, linux, sso
Comments: No Comments.
Linux iSCSI Installation & Configuration
yum install iscsi-initiator-utils -y service iscsi start chkconfig iscsi on iscsiadm -m discovery -t sendtargets -p ISCSI.HOST.IP.ADDRESS service iscsi restart fdisk -l fdisk /dev/sdb1 mkfs.ext3 /dev/sdb1
Linux PPTP VPN Client Installation & Configuration
yum install pptp pptp-setup -y pptpsetup --create PPTP_VPN --server PUB.IP.ADDR.HERE --username VPN_USER --encrypt pppd call PPTP_VPN
Posted: March 25th, 2011
Categories: centos, networking, rhel, vpn
Tags: linux, pptp, vpn
Comments: No Comments.
Categories: centos, networking, rhel, vpn
Tags: linux, pptp, vpn
Comments: No Comments.
Backup & Restore the Volume in Linux Single User Mode
service network start ifconfig eth0 ip netmask service portmap start mkdir /tmp/remote mount -t nfs -o tcp,port=2049 nas:/volume1/share /tmp/remote rpm -ivh /tmp/remote/rmt* rpm -ivh /tmp/remote/dump* dump 0f /tmp/remote/host.dump /dev/VolGroup00/LogVol00 mkdir /tmp/local mount /dev/VolGroup00/LogVol00 /tmp/local cd /tmp/local restore rvf /tmp/remote/host.dump &> /tmp/remote/host.log &
Building Linux Kernel
cd /usr/src/linux- make menuconfig make make modules make modules_install make install vi /boot/grub/menu.lst change initrd to use the image reboot