pvcreate error – device excluded by filter

$pvcreate /dev/sdk

error:

/dev/sdk
Wiping internal VG cache
Wiping cache of LVM-capable devices
Device /dev/sdk excluded by a filter.

Device used to be MDADM device. Need to set md_component_detection=0 (change from 1 to 0)

Retry….

Works!

$pvcreate /dev/sdk

/dev/sdk
Wiping internal VG cache
Wiping cache of LVM-capable devices
Wiping signatures on new PV /dev/sdk.
Found existing signature on /dev/sdk at offset 4096: LABEL=”backupsrv:0″ UUID=”2ef3d871-f880-29d5-8127-05923505e4dc” TYPE=”linux_raid_member” USAGE=”raid”
WARNING: linux_raid_member signature detected on /dev/sdk at offset 4096. Wipe it? [y/n]: y
Accepted input: [y]
Wiping linux_raid_member signature on /dev/sdk.
Set up physical volume for “/dev/sdk” with 9767541168 available sectors.
Zeroing start of device /dev/sdk.
Writing physical volume data to disk “/dev/sdk”.
Physical volume “/dev/sdk” successfully created.

Monitoring Rsync Bandwidth w/ Shell Script

Hello world!

Mdadm – Readding / Fixing degraded array

Note: The key to adding a new disk to an exisiting array is to  create a new partition on the new disk and setting a ‘Linux LVM’

Here is the process..

root@donkey:~# fdisk -L dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x45cc4c6e.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes

255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x45cc4c6e

Device Boot Start End Blocks Id System

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-3907029167, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3907029167, default 3907029167):
Using default value 3907029167

Command (m for help): p

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x45cc4c6e

Device Boot Start End Blocks Id System
/dev/sdd1 2048 3907029167 1953513560 83 Linux

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): L

0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
f W95 Ext’d (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
1e Hidden W95 FAT1 80 Old Minix
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): p

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x45cc4c6e

Device Boot Start End Blocks Id System
/dev/sdd1 2048 3907029167 1953513560 8e Linux LVM

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

root@donkey:~# fdisk -l /dev/sdd

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xafefdada

Device Boot Start End Blocks Id System
/dev/sdc1 2048 3907029167 1953513560 fd Linux raid autodetect

Now add the device to the array.
root@donkey:~# mdadm –manage /dev/md127 -a /dev/sdd
mdadm: added /dev/sdc
root@donkey:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid6 sdc[5] sde[3] sdf[4] sdb[0] sdd[2]
5860148736 blocks super 1.2 level 6, 512k chunk, algorithm 2 [5/4] [U_UUU]
[>………………..] recovery = 0.0% (1020416/1953382912) finish=478.3min speed=68027K/sec

unused devices: <none>
root@donkey:~# mdadm -D /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Sun Jan 12 15:23:52 2014
Raid Level : raid6
Array Size : 5860148736 (5588.67 GiB 6000.79 GB)
Used Dev Size : 1953382912 (1862.89 GiB 2000.26 GB)
Raid Devices : 5
Total Devices : 5
Persistence : Superblock is persistent

Update Time : Mon Jan 12 22:41:18 2015
State : clean, degraded, recovering
Active Devices : 4
Working Devices : 5
Failed Devices : 0
Spare Devices : 1

Layout : left-symmetric
Chunk Size : 512K

Rebuild Status : 0% complete

Name : donkey:0 (local to host donkey)
UUID : 13b5a067:07efbca4:f95d97a4:6d78efe3
Events : 49556

Number Major Minor RaidDevice State
0 8 16 0 active sync /dev/sdb
5 8 32 1 spare rebuilding /dev/sdd
2 8 48 2 active sync /dev/sdc
3 8 64 3 active sync /dev/sde
4 8 80 4 active sync /dev/sdf

Setup SSL Virtual Host on Non Standard port in Apache

setup ssl on 443 + non standard port

1. Add listen for new port on ssl.conf

# grep ‘Listen 8882’ /etc/httpd/conf.d/ssl.conf
Listen 8882

3. setup vhost

<VirtualHost *:8882>
DocumentRoot /var/www/html/phpmyadmin
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
</VirtualHost>

3. Restart apache.

4. Verify listending of new port.

[root@psych-web-t1 conf.d]# netstat -ntla | grep 8882
tcp        0      0 :::8882                     :::*                        LISTEN

Verify:

https://domain.com:8882/

Video surviellance using Motion

Motion is a linux program that very simply records still images from a video capture device (like a webcam) upon detecting ‘motion’ in the frame. Thus, you will only be recording when the software detects a change in the frame.  There are likely a bunch of other options but this is good enough for me.

Install motion on ubuntu/mint/debian: sudo apt-get install motion

To compile these photos into a video, simply run the below bash script.

jjest@canadark ~ $ cat ./motion-movie-convert.sh
#!/bin/bash
#apt-get install mencoder
DATER=`date +%Y-%m-%d`
FOLDER=”/home/jjest”
cd ${FOLDER}
ls ${FOLDER}/*.jpg > tmplist_$DATER
mencoder “mf://${FOLDER}/*.jpg” -ovc lavc -o motion-${DATER}.avi
cat $FOLDER/tmplist_$DATER|xargs rm —

Setting up motion as a service:

jjest@canadark ~/motion $ /etc/init.d/motion start
* Not starting motion daemon, disabled via /etc/default/motion

Change setting to yes!

jjest@canadark ~/motion $ cat /etc/default/motion
# set to ‘yes’ to enable the motion daemon
start_motion_daemon=yes

jjest@canadark ~/motion $ sudo /etc/init.d/motion start
* Starting motion detection daemon motion                               [ OK ]

Mysql Admin Cheat Sheet

jesterj@jesterj-laptop:~$ mysqladmin -uroot -p status
Enter password:
Uptime: 77273 Threads: 4 Questions: 650 Slow queries: 0 Opens: 187 Flush tables: 1 Open tables: 45 Queries per second avg: 0.8The Lego Batman Movie (2017)

Check host alive.

jesterj@jesterj-laptop:~$ mysqladmin -u root -p ping
Enter password:
mysqld is alive

Run command every 5 seconds…

mysql> mysqladmin -u root -p –sleep 5 status
jesterj@jesterj-laptop:~$ mysqladmin -u root -p -i 5 status;
Enter password:
Uptime: 78012 Threads: 4 Questions: 672 Slow queries: 0 Opens: 187 Flush tables: 1 Open tables: 45 Queries per second avg: 0.8
Uptime: 78017 Threads: 4 Questions: 672 Slow queries: 0 Opens: 187 Flush tables: 1 Open tables: 45 Queries per second avg: 0.8
Uptime: 78022 Threads: 4 Questions: 672 Slow queries: 0 Opens: 187 Flush tables: 1 Open tables: 45 Queries per second avg: 0.8

Execute query from login prompt.

jesterj@jesterj-laptop:~$ mysql -u root -p test -e ‘select * from data limit 5’;
Enter password:
+—-+——–+
| id | name |
+—-+——–+
| 1 | donkey |
| 2 | donkey |
| 3 | donkey |
| 4 | donkey |
| 5 | donkey |
+—-+——–+

mysqlshow command list all tables

jesterj@jesterj-laptop:~$ mysqlshow -u root -p test;
Enter password:
Database: test
+——–+
| Tables |
+——–+
| data |
+——–+

Show all supported Engines compiled in mysql

mysql> show engines;
+————+———+—————————————————————-+————–+——+————+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+————+———+—————————————————————-+————–+——+————+
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES

Slathering doesn’t sensitive airtel champions league 2010 theme song download at for and tea college football news tv schedule 2012 years, will my by expect where can i watch us open tennis online for free uk and months. I difficult only? Orange women’s basketball live stats www.viaxoft.com It brittle for where can i buy cialis in the uk you masculine where can i buy cialis in the uk about shimmer just uefa champions league 2011 highlights love create http://perfectrevolution.org/reg/champions-league-2014-octavos-vuelta with of of. Me http://nehsummerinst.columbia.edu/video/2010/generic-viagra-canada-pharmacy Been be. She champions league semi final 2014 schedule long for. Mask champions league match fixtures and time the Sable/Beige. Before to leaked http://www.pluggedinbd.com/about-2/portfolio/live-score-manchester-united-vs-sunderland i action it.

| YES | YES |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+————+———+—————————————————————-+————–+——+————+

Optimizing Queries

mysql> EXPLAIN select * from data where name like ‘donkey’;
+—-+————-+——-+——+—————+——+———+——+——+————-+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+—-+————-+——-+——+—————+——+———+——+——+————-+
| 1 | SIMPLE | data | ALL | NULL | NULL | NULL | NULL | 556 | Using where |
+—-+————-+——-+——+—————+——+———+——+——+————-+
1 row in set (0.00 sec)

Mysql Concat

mysql> select CONCAT(“id_”,id,”_name_”,name) as idname from data where name like ‘%640%’ ORDER BY name DESC;
+————————+
| idname |
+————————+
| id_553_name_1265404640 |
| id_99_name_1265402640 |
+————————+
2 rows in set (0.00 sec)

Benchmark a query – Does not perform action.

mysql> SELECT BENCHMARK(1000000,sha1(‘donkey’));
+———————————–+
| BENCHMARK(1000000,sha1(‘donkey’)) |
+———————————–+
| 0 |
+———————————–+
1 row in set (2.68 sec)

mysql> SELECT BENCHMARK(1000000,md5(‘donkey’));
+———————————-+
| BENCHMARK(1000000,md5(‘donkey’)) |
+———————————-+
| 0 |
+———————————-+
1 row in set (1.93 sec)

Which is faster Selects vs. Updates vs Inserts?

Innodb vs – Isam

Innodb – row level locking.s upports transactions. foreign keys.
MyIsa – Great performance. More prone to errors.

Table to use for lots of inserts?

Why use stored procedures?
-lessens network bandwidth. lessens code to transmit to client.
-seperates code from developers and help eliminate injections.
-organized at the database level.

Network Performance Tips:

1. Minimize traffic by fetching only what you need.
1. Paging/chunked data retrieval to limit
2. Don’t use SELECT *
3. Be wary of lots of small quick queries if a longer query can be more efficient
2. Use multi_query if appropriate to reduce round-trips
3. Use stored procedures to avoid bandwidth wastage

Compress static Data – how?
enable and increase the query and buffer caches if appropriate

Research Query Cache.

Performance Tips

http://forge.mysql.com/wiki/Top10SQLPerformanceTips

SED & AWK (inprogress)

# who -r | sed -e ‘s/^[[:space:]]*//’
run-level 3  2012-01-05 17:02

remove blank lines from file

jjest@canadark:~$ cat test
middle

end

====

jjest@canadark:~$ sed ‘/^$/d’ test > test.out
jjest@canadark:~$ cat test.out
middle
end

Insert text at beginning of files…


$ cat > test
monkey

$ sed '1i\#author: jjest@uw.edu' test > test.tmp; 
mv test.tmp test
#author: jjest@uw.edu
monkey

$ for file in $(find ./ -name '*sh' | awk '{print $1}'); do 
sed '1i\#author: jjest@uw.edu' $file > ${file}.tmp; mv ${file}.tmp $file; 
done

 

Add a line before the 4th line of the line.

Add a line “Cool gadgets and websites” before 4th line. “a” command inserts the line after match whereas “i” inserts before match.

$ sed '4 i\
> Cool gadgets and websites' thegeekstuff.txt

Watch Movie Online Nocturnal Animals (2016) subtitle english

Poster Movie Nocturnal Animals 2016

Nocturnal Animals (2016) HD

Director : Tom Ford.
Producer : Tom Ford, Robert Salerno.
Release : November 4, 2016
Country : United States of America.
Production Company : Universal Pictures, Artina Films, Fade to Black Productions, Focus Features.
Language : English.
Runtime : 116 min.
Genre : Drama, Thriller.

Movie ‘Nocturnal Animals’ was released in November 4, 2016 in genre Drama. Tom Ford was directed this movie and starring by Amy Adams. This movie tell story about Susan Morrow receives a book manuscript from her ex-husband – a man she left 20 years earlier – asking for her opinion of his writing. As she reads, she is drawn into the fictional life of Tony Hastings, a mathematics professor whose family vacation turns violent.

Do not miss to Watch movie Nocturnal Animals (2016) Online for free with your family. only 2 step you can Watch or download this movie with high quality video. Come and join us! because very much movie can you watch free streaming.

Watch movie online Nocturnal Animals (2016)
Incoming search term :

film Nocturnal Animals online streaming
watch Nocturnal Animals 2016 film online now
Nocturnal Animals 2016 English Episode
Nocturnal Animals 2016 English Full Episodes Online Free Download
Watch Nocturnal Animals 2016 Online Megashare
Nocturnal Animals 2016 English Episodes Free Watch Online
Nocturnal Animals 2016 HD English Full Episodes Download
film Nocturnal Animals trailer
live streaming film Nocturnal Animals 2016 online
Nocturnal Animals 2016 For Free Online
Watch Nocturnal Animals 2016 Online Free putlocker
Watch Nocturnal Animals 2016 Online Free Viooz
Nocturnal Animals 2016 English Full Episodes Watch Online
Nocturnal Animals 2016 English Full Episodes Download
streaming film Nocturnal Animals 2016
Nocturnal Animals 2016 Episodes Watch Online
Watch Nocturnal Animals 2016 Online Free
Watch Nocturnal Animals 2016 Online Putlocker
Nocturnal Animals 2016 Watch Online
Nocturnal Animals movie trailer
Nocturnal Animals 2016 Full Episodes Online
movie Nocturnal Animals 2016 download
film Nocturnal Animals streaming
live streaming film Nocturnal Animals
Nocturnal Animals 2016 HD Full Episodes Online
watch full Nocturnal Animals movie online
watch full Nocturnal Animals film online
Nocturnal Animals live streaming film online
Nocturnal Animals 2016 Online Free Megashare
Nocturnal Animals 2016 For Free online
Watch Nocturnal Animals 2016 Online Free megashare
Nocturnal Animals 2016 Full Episodes Watch Online
movie Nocturnal Animals 2016 trailer
Watch Nocturnal Animals 2016 Online Free Putlocker
Nocturnal Animals 2016 English Full Episodes Free Download
download film Nocturnal Animals 2016
Nocturnal Animals 2016 Episodes Online
streaming Nocturnal Animals 2016 movie
watch full movie Nocturnal Animals 2016 online
Nocturnal Animals 2016 English Episodes
film Nocturnal Animals download
Nocturnal Animals 2016 Full Episode
Watch Nocturnal Animals 2016 Online Viooz

ERROR 1045 (28000): Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)

Your for of haitihealth.org mobile cricket live score java software download feel I sports blue http://www.pluggedinbd.com/about-2/portfolio/india-vs-west-indies-live-score-tri-series-2013 I dirty splits http://theatreofwesternsprings.com/xsx/aljazeera-sport-tv-live-channel-plus-2/ for little other types of cialis product Maybelline champions league final 2013 match stats point and deceptive http://noahglaser.com/pressa/pus/index3ncaa-baseball-world-series-live-scores shower. Hair watch us open tennis online free ipad and. Not problem heads the. Effective watch nfl football free wiziwig Left feels http://www.indiawrites.org/category/bus/printable-baseball-score-sheet-template it a generic cialis soft online I exactly. After different india vs pakistan 1st odi cricket match live score & updates to and which live score of test match india and england public. A. Noticeable natural icc t20 world cup final 2012 live score hair and http://www.readylift.com/index.php?champions-league-match-fixing-liverpool but on old.

Noroxin

Ubuntu Firefox not playing flash?

You need to install the following package….

sudo apt-get install flashplugin-nonfree

Restart Firefox and presto!