Recreate DFS Database

I use DFS alot for work, sometimes it just gets grumpy and needs to be kicked in the guts.

Deleting the database isnt easy, becuase widnows keeps a pretty tight grib on anything in SystemVolumeInformation.

Use this script to move the DFS folder and have the service create a fresh new database

Hint – Look for DFS Database events in the application log, not the DFS replication log

 

set DFSR_DB_DRIVE=C:
 
REM Removes the broken DFSR configuration database from the system
net stop dfsr
%DFSR_DB_DRIVE%
 
icacls "%DFSR_DB_DRIVE%\System Volume Information" /grant "Domain Admins":F
cd "%DFSR_DB_DRIVE%\System Volume Information"
move DFSR %DFSR_DB_DRIVE%\DFSR_backup
 
cd ..
icacls "%DFSR_DB_DRIVE%\System Volume Information" /remove:g "Domain Admins"
net start dfsr
dfsrdiag PollAD /Member:%userdomain%\%computername%

 

 

 

Original Article – http://sheeponline.net/recreate-dfsr-database.html

Setup Rabbit MQ

Enable webserver
sudo rabbitmq-plugins enable rabbitmq_management

New user
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test “.*” “.*” “.*”

HP Bl460C G6 Centos7 RAID tool

Works on my HP G6 servers with this in lspci
0c:00.0 RAID bus controller: Hewlett-Packard Company Smart Array G6 controllers (rev 01)

wget http://mirror.nforce.com/pub/software/raidtools/hpacucli-tool/hpacucli-9.40-12.0.x86_64.rpm
yum install hpacucli-9.40-12.0.x86_64.rpm
hpacucli ctrl all show status

Will probably show as “Error: No controllers detected.
Run modprobe sg then re-run hpacucli ctrl all show status

With any luck you will see somehting like

 /usr/sbin/uname26 hpacucli ctrl all show status

Smart Array P410i in Slot 0 (Embedded)
   Controller Status: OK
   Cache Status: OK
   Battery/Capacitor Status: OK

Because of something todo with a new kernel version i had to run the HPacuCli tool with the uname26 command

See more inof here – http://www.legendiary.at/2012/06/21/hpacucli-does-not-work-on-kernel-3-0-wrapper-workaround-uname26/

mkdir uname26 ; cd uname26
wget http://mirror.linux.org.au/linux/kernel/people/ak/uname26/Makefile
wget http://mirror.linux.org.au/linux/kernel/people/ak/uname26/uname26.c
make
yum install cc gcc cpp
make
cp uname26 /usr/sbin

pfSense to Cisco IPSEC Tunnel

pFSense config

c

b a

Cisco Config

Replace GigabitEthernet0/0 for your interface

Replace list 100 for your NAT list

Replace the Key and IP’s

Update the Access list to reflect your subnet’s

!
crypto isakmp policy 10
encr 3des
authentication pre-share
group 2
crypto isakmp key XXXX address 1.2.3.4 no-xauth
!
!
crypto ipsec transform-set 3DES-SHA esp-3des esp-sha-hmac
!
crypto map PFSVPN 15 ipsec-isakmp
set peer 1.2.3.4
set transform-set 3DES-SHA
set pfs group2
match address encrypt-to-dc
!

interface GigabitEthernet0/0
Description WAN Interface
...
crypto map PFSVPN

ip nat inside source list 100 interface GigabitEthernet0/0 overload

access-list 100 deny   ip 192.168.20.0 0.0.0.255 192.168.30.0 0.0.0.255
access-list 100 permit ip 192.168.20.0 0.0.0.255 any

ip access-list extended encrypt-to-dc
 permit ip 192.168.20.0 0.0.0.255 192.168.30.0 0.0.0.255
!

 

Cinder – Resize root volume

To resize the root volume of an instance can be tricky, this worked for me

Note some commands, particularly “cinder reset-state” returned a HTTP 403, i had to run those as admin

 

[root@vm-os-ks01 ~]# source admin.rc
[root@vm-os-ks01 ~]# cinder reset-state --state available b35e676a-7593-458d-b6f4-cc60e075cfd4
[root@vm-os-ks01 ~]# nova volume-list
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| ID                                   | Status    | Display Name | Size | Volume Type | Attached to                          |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| e1072658-7399-4505-a563-a5b6ed062325 | in-use    |              | 10   | sata        | 11684d86-5e17-4760-a32b-26ed6c47f1c1 |
| b5ac679f-76ae-45aa-b6ae-c2d4d87a97d0 | in-use    |              | 10   | sata        | 65717578-a520-4c63-a3b4-63537bce2332 |
| c3c88bc1-a6b8-4bdc-b1b1-d399b0696be8 | in-use    |              | 10   | sata        | 815043a2-44fa-487e-9912-ecc015bf6a46 |
| bef780ff-ac9f-492d-9504-11062e30acdf | in-use    |              | 40   | sata        | 76d7a922-3b5e-4154-ab61-cfca7810369d |
| b35e676a-7593-458d-b6f4-cc60e075cfd4 | available |              | 40   | sata        | 933899fe-b218-4eff-b2b1-658ae8068350 |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
[root@vm-os-ks01 ~]# cinder extend b35e676a-7593-458d-b6f4-cc60e075cfd4 80
[root@vm-os-ks01 ~]# nova volume-list
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| ID                                   | Status    | Display Name | Size | Volume Type | Attached to                          |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| e1072658-7399-4505-a563-a5b6ed062325 | in-use    |              | 10   | sata        | 11684d86-5e17-4760-a32b-26ed6c47f1c1 |
| b5ac679f-76ae-45aa-b6ae-c2d4d87a97d0 | in-use    |              | 10   | sata        | 65717578-a520-4c63-a3b4-63537bce2332 |
| c3c88bc1-a6b8-4bdc-b1b1-d399b0696be8 | in-use    |              | 10   | sata        | 815043a2-44fa-487e-9912-ecc015bf6a46 |
| bef780ff-ac9f-492d-9504-11062e30acdf | in-use    |              | 40   | sata        | 76d7a922-3b5e-4154-ab61-cfca7810369d |
| b35e676a-7593-458d-b6f4-cc60e075cfd4 | available |              | 80   | sata        | 933899fe-b218-4eff-b2b1-658ae8068350 |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
[root@vm-os-ks01 ~]# cinder reset-state --state in-use b35e676a-7593-458d-b6f4-cc60e075cfd4
[root@vm-os-ks01 ~]# nova volume-list
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| ID                                   | Status | Display Name | Size | Volume Type | Attached to                          |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
| e1072658-7399-4505-a563-a5b6ed062325 | in-use |              | 10   | sata        | 11684d86-5e17-4760-a32b-26ed6c47f1c1 |
| b5ac679f-76ae-45aa-b6ae-c2d4d87a97d0 | in-use |              | 10   | sata        | 65717578-a520-4c63-a3b4-63537bce2332 |
| c3c88bc1-a6b8-4bdc-b1b1-d399b0696be8 | in-use |              | 10   | sata        | 815043a2-44fa-487e-9912-ecc015bf6a46 |
| bef780ff-ac9f-492d-9504-11062e30acdf | in-use |              | 40   | sata        | 76d7a922-3b5e-4154-ab61-cfca7810369d |
| b35e676a-7593-458d-b6f4-cc60e075cfd4 | in-use |              | 80   | sata        | 933899fe-b218-4eff-b2b1-658ae8068350 |
+--------------------------------------+--------+--------------+------+-------------+--------------------------------------+
[root@vm-os-ks01 ~]#