Sometimes they accidentally spray it inside one of the server vents which gets on the internal components and causes data loss.
Yazar: shukko
quagga girdi hayatima.-kendim kasindim!-
https://wiki.quagga.net/wiki/index.php/TipsNTricks
cat /etc/quagga/bgpd.conf password blablabla router bgp 203555 network 37.24.11.0/24 bgp router-id 103.38.19.185 neighbor 169.254.169.254 remote-as 64515 neighbor 169.254.169.254 password rdjh&hjgsbjd3 neighbor 169.254.169.254 ebgp-multihop 2 neighbor 169.254.169.254 soft-reconfiguration inbound !
bu asagidaki openbgpd.conf – freebsd uzerinde , hatta yetmedi pfsense uzerinde..
neden diye sorma… routing bilmiyoz diye kimseye caktirmiyoz. denedik yanildik
o denemelerin hatirasi icin
# This file was created by the package manager. Do not edit! AS 203555 fib-update yes listen on 104.238.191.198 router-id 104.238.191.198 network 37.27.18.0/24 group "vultr" { remote-as 64515 neighbor 169.254.169.254 { descr "vultr" tcp md5sig password rdfdf3efdf9C announce all multihop 2 softreconfig in yes local-address 104.238.191.198 } } deny from any deny to any allow from 169.254.169.254 allow to 169.254.169.254
How to convert a non-sparse image to a sparse image
orjinal link: https://blog.laimbock.com/2013/10/31/how-to-convert-a-non-sparse-image-to-sparse/
Below are the steps how to convert a raw or qcow2 non-sparse image to a sparse image. Basically there are two ways to do the conversion:
1) use virt-sparsify
2) use dd and cp –sparse
Convert a non-sparse image to a sparse image with virt-sparsify
IMPORTANT: make sure the VM is not running/live! It must be shut down or else you will destroy the data in your image.
Make sure virt-sparsify is installed:
1
|
$ sudo yum install libguestfs–tools
|
Check current image:
1
2
|
$ sudo ls –lsk test.img
10737418240 –rw———–. 1 qemu qemu 10737418240 Oct 31 16:00 test.img
|
The first 10737418240 value is the allocated size and the second 10737418240 value is the file size. Since they are both the same value it means that this image is non-sparse (or 100% full in which case the sparse attempt is irrelevant).
Check again using qemu-img info:
1
2
3
4
5
|
$ sudo qemu–img info test.img
image: test.img
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 10G
|
Both the virtual size and the disk size are 10G so this image is not a sparse image.
Now convert the non-sparse image to a sparse image using virt-sparsify:
1
2
|
$ sudo virt–sparsify test.img sparse–test.img
$ sync
|
Check the new image:
1
2
|
$ sudo ls –lsk sparse–test.img
1425852 –rw———–. 1 qemu qemu 10737418240 Oct 31 16:01 sparse–test.img
|
The allocated size of 1425852 is much smaller than the file size of 10737418240 which means this is now a sparse image.
Check again using qemu-img info:
1
2
3
4
5
|
$ sudo qemu–img info sparse–test.img
image: sparse–test.img
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 1.4G
|
The disk size is much smaller than the virtual disk size so the image has indeed been successfully converted to a sparse image.
Convert a non-sparse image to a sparse image with dd and cp
Start the VM/image which you want to make sparse and login to it. Next fill the free space in the VM with zeros using the following command and then shut it down again:
1
2
3
4
|
$ sudo dd if=/dev/zero of=/tmp/zeroallspace bs=1M
$ sync
$ sudo rm –v /tmp/zeroallspace
$ sudo /sbin/shutdown –h now
|
Now convert the non-sparse image to a sparse image using cp:
1
|
$ sudo cp —sparse=always test.img sparse–test.img
|
Check the new image:
1
2
|
$ sudo ls –lsk sparse–test.img
1425852 –rw———–. 1 qemu qemu 10737418240 Oct 31 16:01 sparse–test.img
|
The allocated size of 1425852 is much smaller than the file/image size of 10737418240 which means this is now a sparse image.
Check again using qemu-img info:
1
2
3
4
5
|
$ sudo qemu–img info sparse–test.img
image: sparse–test.img
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 1.4G
|
Again this shows that the image is now a sparse image.
Which method to use?
Both methods work equally well. In terms of options the virt-sparsify method may be preferred as it can for example also convert the image from raw to qcow2 and it needs less steps. See man virt-sparsify for more information. If you just want to make the image sparse than choose the method which you like best.
Tip
If you use rsync to make backups of your images then do not forget to use the –sparse option and realize that –sparse conflicts with –inplace (see man rsync).
MySQL INNODB CRaSh Toplu yazisi.
MySQL INNODB Crash etti. Napicaz?
1- nano /etc/my.cnf
innodb_force_recovery = 2
2den basla 6ya kadar yolu var
GUNCELLEME: Agustos 2018
Be sure to check your MySQL logs, and if it loops with something like:
InnoDB: Waiting for the background threads to start
You should also add innodb_purge_threads=0
to your my.cnf.
So all together to bring back database, I had to add these 3 parameters in my.cnf:
port = 8881 innodb_force_recovery=3 innodb_purge_threads=0
2- killall -9 mysqld
calisan bir mysql processi kalmasin
3- innodb recovery ile calistiktan sonra read only olarak.
herseyi dump et tek buyuk bir dosyaya
cat /usr/local/directadmin/conf/mysql.conf mysqldump -u da_admin -p --opt --all-databases > alldb.sql
4- /var/lib/mysql altindaki
ibdata1
ib_logfile0
ib_logfile1
sil, veya sen en iyisi tum /mysql dizinini yedekle sonra sil
5- herseyi restore et buyuk dosya yedeginden.
mysql -u da_admin -p < alldb.sql
server.err logu tail le duruma bak
gule gule kullan.
NOT: 2021 mart::
Use the --force
(-f
) flag on your mysql import. Rather than stopping on the offending statement, MySQL will continue and just log the errors to the console.
For example:
mysql -u userName -p -f -D dbName < script.sql
ek:
aynisi oldu 1 serverda db leri dump ederken 1 table hata veriyordu.
inatla hangi table hangi db icinde onuda bulamadim crash diyip duruyodu
ne yaptim
updatedb
locate crashedentable.frm
frm ler cikinca tek tek hepsini (1den cok vardi ) 12 tane toplam
el ile fix ettim. aslinda otomatik auto-repair calismasi gerekirdi.
calismadi pust nedense ..
mysqlcheck -u da_admin -p --auto-repair --optimize --all-databases bu yukairdaki otomatik olan hepsini fixleyen. neden calismadiki acep. bilinmez.. ben naptim: mysqlcheck -u da_admin -p --auto-repair --databases esila_shop eticaret2_shop bu ise yaradi. bilgim olsun :) artik kod modundanda cikalim..
evet/./
Hizmetlerimize gosterdiginiz ilgiden oturu tesekkur ederiz.
Hizmetlerimize gosterdiginiz ilgi icin tesekkur ederiz.
3 farkli hizmet seklimiz bulunmaktadir.
IYI – UCUZ – HIZLI
Yukaridaki Herhangi iki adet hizmet seklini secebilirsiniz.
Ancak Unutmayiniz ki:
IYI ve UCUZ hizmet HIZLI olmayacaktir,
IYI ve HIZLI hizmet UCUZ olmayacaktir,
HIZLI ve UCUZ hizmet IYI olmayacaktir.
online.net proxmox uzerinde kvm uzerinde mikrotik kurmak ve calistirmak.
1- online.net console gir > makinayi sec > proxmox kur
2- online.net console dan 1 tane failover ip siparis et
3- failover ipi proxmox kurdugun makinaya ata
4- failover ip icin virtual mac olustur – virtual maci kopyala
5- proxmoxuna git su sekilde vm olustur
linux 2.6 KVM
256 MB RAM
1 CPU
Sata Disk 8 GB yeterli
Virtio ethernet > mac adresi kopyaladigin virtual mac > yapistir.
numa secebilirsin
makinada kvm default olsun , host secme boot etmez.
6- proxmox html5 novnc konsol ile makinayi boot et
7- mikrotik tum modulleri sec yukle de
8- mikrotik acildiginda su komutlari calistir
ip address add interface=ether1 address=212.129.22.22 netmask=255.255.255.255 broadcast=212.129.22.22 network=195.154.171.1 ip route add dst-address=0.0.0.0/0 gateway=195.154.171.1
not: 212.129.22.22 > sana verilmis olan virtual mac olusturdugun failover ip
195.154.171.1 > proxmox makinandaki ana ipin gateway ipi
9- su an failover ipine pingleyebiliyor ve winbox ile baglanabiliyor olmalisin.
gule gule kullan.
ve Heval sordu: masaüstüne linux kuracağım linux mint harici önerebileceğin sistem var mı? – Aralik 2015 versyonu…
Heval , [06.12.15 00:34]
shukko masaüstüne linux kuracağım linux mint harici önerebileceğin sistem var mı?
METEHAN, [06.12.15 00:50]
fedora
METEHAN, [06.12.15 00:50]
ezelden fedora cıyız.biz
METEHAN, [06.12.15 00:50]
uyumayın genclık cumartesı uyunurmu
sHuKKo Kazandibi, [06.12.15 00:53]
var
sHuKKo Kazandibi, [06.12.15 00:54]
ama senin evet ben biraz ugrasmak istiyorum diyip dememene bagli
sHuKKo Kazandibi, [06.12.15 00:54]
3 senecek yazacagim sana
sHuKKo Kazandibi, [06.12.15 00:55]
1- linux mint cinnamon – en stabili ve en sorunsuzu budur en klasik olan 17.3 cikti cikicak 1 2 gun icinde ubuntu temellidir yani debian tureveidir apt-get paket yoneticisidir nette %99 sorun cozum bulmak kolay olur
Heval , [06.12.15 00:55]
çıktı indirdim onu shukko bekliyor
Heval , [06.12.15 00:55]
yarın kurayım kurmayayım dan önce
Heval , [06.12.15 00:56]
sorayım bir dedim
sHuKKo Kazandibi, [06.12.15 00:56]
2- linux manjaro xfce edition – bu arch linux temellidir ve rolling releasedir . xfce ile fisek gibi calisir . en sorunsuzu degildir ama cevaplar %99 arch wikisindedir . bunu kurup daha kaldirmazsin. paket yoneticisi pacman dir . pacman -Syu full sistem guncellemesi yapar.
sHuKKo Kazandibi, [06.12.15 00:57]
3- bu son secenk eger ben bleeding edge olacagim ancak eye candy seviyesi en yuksek olsun diyosan kurulacak secenektir. Linux Korora – linux fedora versyonlari takip eder . asagi yukari 6 ayda bir yeni versyon cikar. kernel 4.2 lerdedir en bleeding edge dir. ozellikle KDE versyonunu oneririm. ust seviyede eglence vaat eder. Paket yoneticisi Yum’dan DNF ye gecmistir. DNF gelecegin ileri duzey paket yoneticisidir.
sHuKKo Kazandibi, [06.12.15 00:57]
evet en detayli olarak yazacaklarim bunlar
sHuKKo Kazandibi, [06.12.15 00:58]
3 secenek sebep sonuc
sHuKKo Kazandibi, [06.12.15 00:58]
sen sec kur
yandex botu blokla gitsin #BlockYandexBot
yandex botu blokluyoruz bu tur olunca.
bknz: https://www.shukko.com/x3/?s=yandex&submit=Search
baskalarinin yaptigi yorumlar:
Yandex botu ile başımız dertte, URL’de Session ID veya Query String içinde sayfanın görüntüsünü etkilemeyen herşeyi saniyede 3-5 sayfa alacak şekilde tarıyor. Saatlerce aynı sayfanın aynı görüntüsünü tarıyor bunu ayırt edemiyor. Sonuç Load Avarage 20.00+ ve CPU usage hep %50-80 Bunun için bir önerisi olan varmı? Siz bu tür bir sorunla baş etmek için müşteri hesabımı kapatırsınız Yandex IP ‘lerinimi bloklarsınız? Çıkamadım işin içinden
Harun – yandex mail ve metrika hariç ne kadar ip varsa blokladım loadlarda düşüş inanılmaz
buda bizim haricimizde webmasterin yapabilecegi:
https://yandex.com.tr/support/webmaster/controlling-robot/robots-txt.xml#crawl-delay
bunu paylasmam lazim..
[root@xxxx admin_backups]# w
03:56:10 up 611 days, 11:27, 1 user, load average: 0,66, 0,19, 0,06
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 x.x.x.x 03:50 0.00s 0.04s 0.00s w
model name : Intel(R) Celeron(R) CPU G1610 @ 2.60GHz
Crucial m4 CT128M4SSD2 128GB // 8GB RAM
iodine lets you tunnel IPv4 data through a DNS server.
I use Iodine, it’s super simple to set up! Say your VPS’s IP is 8.8.8.8, you set DNS as follows:
dns2.domain.com A 8.8.8.8
dns.domain.com NS dns2.domain.com
apt-get install iodine, or compile on other systems
On server run: screen iodined -fP ultrasecurepassword 10.0.0.1 dns.domain.com
On client run: iodine -fP ultrasecurepassword 8.8.8.8 dns.domain.com
You can then setup Squid or ziproxy with image compression to listen on tun0, and set the HTTP proxy for your client to 10.0.0.1. SSH tunneling with compression also works, not tried NAT
iodine lets you tunnel IPv4 data through a DNS server. This can be usable in different situations where internet access is firewalled, but DNS queries are allowed.