26 Aralık 2015 Cumartesi

Günün komutu - Linux sistemlerinde {2015.12.26} - memhog - basitce hafıza testi


Bu yılda bitmek üzere. Bu yıl biterken faydalı bir komutla yeni yıllar dilemek istiyorum.

Bu günkü komutumuz memhog. memhog'u kullanmak için numactl paketinin yüklü olması, yüklü değilse kurmak gerekiyor,

oracle linux(rhel tabanlı sistemlerde);

yum install numactl

Kullanımıda oldukça basit:


# memhog
memhog [-rNUM] size[kmg] [policy [nodeset]]
-rNUM repeat memset NUM times
-H disable transparent hugepages
Policies: interleave membind preferred default



 # memhog 17G
numactl: mmap: Cannot allocate memory
# memhog 512M
....................................................
#


Bu faydalı komutu kullanmadan önce swap devre dışı bırakmanız iyi olur.















24 Aralık 2015 Perşembe

linux de işlemci, hafiza, io gibi kısıtlamalar nasıl yapılır?


Biz linux kullanıcılar, linux çekirdeğinin kabiliyetlerinin %95 kullanmayız.

işlemci, hafıza, io gibi kısıtlamaları yapan cgroup
(Control Groups, to manage the resource utilization of sets of processes.)
özelliğide kullanmadığımız özelliklerdendir.

Başlangıç için aşağıdaki linkli paylaşıyorum.

https://docs.oracle.com/cd/E37670_01/E37355/html/ol_subsystems_cgroups.html

cgroup kullanmaya oracle dökümanlarını okuyarak başlamıştım.



Belki sizlerede yardımcısı olur.

cgroup ile kullanılan başlıca datasetler;

mount {
    cpuset = /sys/fs/cgroup/cpuset;
    cpu = /sys/fs/cgroup/cpu,cpuacct;
    cpuacct = /sys/fs/cgroup/cpu,cpuacct;
    memory = /sys/fs/cgroup/memory;
    devices = /sys/fs/cgroup/devices;
    freezer = /sys/fs/cgroup/freezer;
    net_cls = /sys/fs/cgroup/net_cls;
    blkio = /sys/fs/cgroup/blkio;
    perf_event = /sys/fs/cgroup/perf_event;
    hugetlb = /sys/fs/cgroup/hugetlb;
}


Ayarlayabileceğiniz değişkenlere örnek;


memory.limit_in_bytes, memory.max_usage_in_bytes,

blkio.weight, blkio.weight_device, blkio.throttle.write_iops_device,
blkio.throttle.read_iops_device, blkio.throttle.write_bps_device, blkio.throttle.read_bps_device

cpu.shares


ve son link;

https://blogs.oracle.com/wim/entry/oracle_linux_containers_continued

Bundan sonrası sizlere kalmış. :-)


23 Aralık 2015 Çarşamba

Dizin içindeki her hangi bir dosya veya dosyaların içerisindeki bir değer nasıl değiştirilir?



"Dizin içindeki her hangi bir dosya veya dosyaların içerisindeki bir değer nasıl değiştirilir?" sorusuna cevap bulalım dedim.

Linux kullanan arkadaşlarımızın böyle bir şeye ihtiyacı olursa, çözüm için kafalarında bir fikir oluşmasına yardımcı olabilir.

Linux dünyasındaysanız, bu soruya  birden çok çözüm bulabilirsiniz, benim aklıma gelen çözüm;

sunucu ismimizi değiştireceğiz.

Mevcut ismimiz e8470p olsun, yeni ismimizde zurbahan olacak.


Öncelikle etc altındaki dosyaları find komutuyla tespit ettiririz.
Burada önemli nokta find ile arama yaparken -type f ile sadece dosyaları tespit ettirmemiz. Özellikle dosyaları  aratmazsanız, sed komutuna dizin ve başka tip dosyalarda parametre olarak gider.  Gerisi hikaye. :)

Sonrasında sed arkadaşa diyoruz ki, bu dosyanın içeriğine bak, içinde e8470p görürsen zurbahan olarak değiştir.

Komutumuz;

find /etc/ -type f -exec sed -i 's/e8470p/zurbahan/g' {} \;


Alternatif olarak aşağıdaki gibide değiştirebiliriz. Fakat yukarıdaki çözüm tercih ettiğim bir çözüm. :)

find etc/ -type f | xargs -n 1 sed -i 's/e8470p/zurbahan/g'


Sizinde aklınızda alternatif çözüm varsa yoruma yazabilirsiniz.

22 Aralık 2015 Salı

"Enterprise Grade" dedikleri nedir?




Bir disk ünitesinin enterprise seviyede olması için sahip olması gereken özellikler  nasıl?

Yukarıdakilerini sağlayan kaç ürün vardır?

13 Aralık 2015 Pazar

Oracle Enterprise Linux kernel sürümündeki numaraların anlamı (alıntı)

Oracle enterprise linux kernel sürümündeki numaraların anlamını merak edenler için;
uname -r
3.  8. 13-118.2.2.el7uek.x86_64
^  ^    ^    ^    ^
|    |    |     |     |   
|    |    |     |     Security Errata
|    |    |     |
|    |    |     Errata Kernel version
|    |    |    
|    |   The third number is the patch level version.
|    |
|    The second number is the minor revision number.
|
The first number is the major version number.


Umarım meraklılar için faydalı olur. :)

12 Aralık 2015 Cumartesi

virtualbox kernel modülü derlenme sorunu RHEL/OEL/Centos 7

RHEL 7 tabanlı(oracle, centos vs.)  linux sistemi kullanıyorsanız,
kernel güncellemesinden  sonra virtualbox çalışmadığını
/sbin/vboxconfig komutunu çalıştırmanızı söyleyecektir.
Bu komut çalıştırdığınız halde virtualbox modülleri oluşmadıysa vboxdrv.sh setup kullanarak sorunu giderebilirisiniz

[root@zurbahan ~]# /usr/lib/virtualbox/vboxdrv.sh
Usage: /usr/lib/virtualbox/vboxdrv.sh {start|stop|stop_vms|restart|force-reload|status|setup}
[root@zurbahan ~]# /usr/lib/virtualbox/vboxdrv.sh setup
Stopping VirtualBox kernel modules                         [  TAMAM  ]
Recompiling VirtualBox kernel modules                      [  TAMAM  ]
Starting VirtualBox kernel modules                         [  TAMAM  ]
[root@zurbahan ~]#

10 Aralık 2015 Perşembe

Bir paketin sistemde yüklü olup, olmadığını öğrenmek

ihtiyacımız olan bir paketin sistemde(redhat tabanlı) öğrenmek için yum info komutundan faydalanırız.


[root@zurbahan ~]# yum info mc
Yüklü eklentiler: langpacks, ulninfo
Kurulan Paketler
Ad        : mc
Mimari        : x86_64
Epoch       : 1
Sürüm     : 4.8.7
Dağıtım     : 8.el7
Boyut        : 5.6 M
Depo        : installed
Depodan   : ol7_latest
Özet     : User-friendly text console file manager and visual shell
URL         : http://www.midnight-commander.org/
Lisans     : GPLv3+
Açıklama : Midnight Commander is a visual shell much like a file manager, only
         : with many more features. It is a text mode application, but it also
         : includes mouse support. Midnight Commander's best features are its
         : ability to FTP, view tar and zip files, and to poke into RPMs for
         : specific files.

Mevcut sistemde kullandığımız bir programın bağımlı olduğu paketleri listelemek

Zaman zaman kullanıdığımız programın ihtiyaç duyduğu yüzlerce dosya olabilir.
Bu yüzlerce dosyanın hangi paket içerisinde olduğunu listelememiz gerektiği zamanda yardımımıza bash scripti yetişir.


Hazırladığım basit scripte aşağıdaki linkten erişebilirsiniz.

http://s3.dosya.tc/server6/y2ov4l/gerekli-paketler.sh.rar.html


Dosyayı açtıktan sonra, çalıştırabilmeniz için "chmod +x  gerekli-paketler.sh"
unutmayalım. :)


Linkteki dosyanın içeriği;




#!/bin/bash
# Remzi AKYUZ
# linuxliste@gmail.com
# 2015.12.10
# Sistemde mevcut olan hangi bir programin  ihtiyac duydugu kutuphaneleri listeler
# Sistem redhat tabanli sistemlerde calisir.


tmpfile="/tmp/tmpfile-"`date +%Y%m%W%N`
if test $# -gt 0

then

printf '\n\n<%s> programinin ihtiyac duydugu paketler \n\n' "$@"

ldd `which $1` |cut -d\> -f 2 |cut -d\( -f1 > $tmpfile

for i in `cat $tmpfile`

do

rpm -qf $i >> $tmpfile.2

done
sort $tmpfile.2|uniq
rm -f $tmpfile $tmpfile.2

exit 0
fi

printf '\n\n\nLutfen  ornekteki gibi kullanininiz :  %s ls \n\nTesekkurler\n\n\n'  "$0"



# script sonu


8 Aralık 2015 Salı

Oracle VM - OVA dan template oluşturarak kullanma - Reklam :)

Oracle vm her hangi bir fiziksel sunucuyu,  vmware veya başka bir

sanallaştırma  ortamından aldığınız ova formatını rahatlıkla kullanabilirsiniz.

Nasıl mı?

Çok basit ; ova dosyasını ovm'e import et, import ettiğin ova dosyasından

template  oluştur ve kullan!

Gördüğünüz gibi oracle vm de sadece oracle vm için hazırlanmış templateleri

değil, ova  formatındaki her hangi bir template(örneğin vmwarden ova 

formatında alacağınız bir export dosyasını) kullanabilirisiniz!


Sanallaştırma ile ilgilenenler için aşağıdaki dökümanı incelemelerini tavsiye ediyorum.

İnceleyince ne mi göreceksiniz?  Bu da size kalmış :)





Oracle VM Template for Oracle Solaris 11.3 Readme
===============================================================


This document is applicable to Oracle VM templates for Solaris 11 on x86/x64
platforms.

File Template Version
-------------------- ----------------
sol-11_3-ovm-x86.ova 1.0

This document contains:

1. Introduction
2. Prerequisites
3. Importing an Oracle VM Template into Oracle VM Manager 3.2
3.1 Importing from an Oracle VM Server
3.2 Importing the Template
4. Virtual Machine Configuration
5. Additional Software

1. Introduction
======================

The template is a large server installation of the Solaris 11.3 OS on
x86 (64-bit) platforms.

Notes for Oracle VM Template for Oracle Solaris 11.3
------------------------------------------------------------------
1) The Solaris 11.3 template supports x86_64 architecture.

To check if Solaris is running in 64 bit from command line run
the following:

#/usr/bin/isainfo -kv

On a 64-bit Solaris system, you'll see:
64-bit amd64 kernel modules

2) Solaris 11.3 OS runs as a hardware virtual machine (HVM) which requires HVM
support (Intel VT or AMD-V) on the underlying hardware platform, but Solaris
11.3 OS has the paravirtualized (PV) drivers as part of the OS installed by
default.

2. Prerequisites
================
2.1 Hardware prerequisites
1) 140GB free space on Oracle VM Server storage pool.
2) 2048MB free memory size on Oracle VM Server.
3) The server has HVM support. To check if the server is HVM capable, you
can run xm info command from the dom0 of the Oracle VM server to verify if
hvm is listed as the attribute of virt_caps.

# xm info

virt_caps : hvm


2.2 Software prerequisites
Oracle VM 3.2 or above

3. Importing an Oracle VM Template into Oracle VM Manager 3.2 and Above
=======================================================================

Links in this section refer to Oracle VM Manager 3.2 documentation.
Documentation for Oracle VM Manager 3.3 can be found at:

http://docs.oracle.com/cd/E50245_01/index.html

1) Copy the downloaded .ova file to a location accessible to the Oracle VM
Manager via http, https, or ftp.

2) Follow Oracle VM 3.2 Getting Started Guide to import an assembly:
http://docs.oracle.com/cd/E35328_01/E35331/html/vmgsg-resources-assembly.html

3) Create a VM template by importing from the assembly, see Oracle VM 3.2
Getting Started Guide
http://docs.oracle.com/cd/E35328_01/E35331/html/vmgsg-vms-create-assembly.html

4) Create a VM from the imported template, see Oracle VM 3.2 Getting Started
Guide
http://docs.oracle.com/cd/E35328_01/E35331/html/vmgsg-vms-create-template.html


4. Virtual Machine Configuration
================================
When you connect to the virtual machine console, you will see the virtual
machine boots up. Proceed through configuration screens that prompt for
hostname, timezone, default user and passwd, and root passwd.

Log in as the default user configured in the previous step.

Network Information
-------------------
By default the VM is not configured for networking. For information on setting
up a network in a Solaris 11.3 environment see "Configuring and Administering
IP Interfaces and Addresses" section in "Configuring and Administering Network
Components in Oracle Solaris 11.3":

http://docs.oracle.com/cd/E53394_01/html/E54745/ipconfig-123.html#scrolltoc

5. Additional Software
======================

Additional software may be downloaded from the configured repository. For
example, the GNOME desktop environment can be installed with the command:

# pkg install solaris-desktop

See the following for detailed instructions:

http://docs.oracle.com/cd/E53394_01/html/E54739/index.html

Additional Resources:
---------------------

* Oracle Solaris 11 Product Documentation
www.oracle.com/technetwork/server-storage/solaris11/documentation/

* Oracle Premier Support for Operating Systems
www.oracle.com/us/support/systems/operating-systems/index.html

* Oracle Solaris Premier Subscription for non-Oracle Hardware
www.oracle.com/us/products/servers-storage/solaris/non-sun-x86-081976.html

* Link to Solaris 11 Third-Party License information:
http://www.oracle.com/pls/topic/lookup?ctx=solaris11&id=OSPLG

Sanallaştırma!

Merhaba,

Bu günlerde insanların kullanmayacakları özelliklere tonlarca $$$$ vermesini

üzüldüğümü belirterek başlıyorum.

Oracle VM, xen, oVirt, kvm, qemu, proxmox, vs. vs. genel ihtiyaçlarını

karşılayacak  açık kaynak kodlu, çoğu ücretsiz (

 Yalnış anlamayın, güncelleme ve destek ücrete tabi!!! Böylede olmalı, sonuçta

ürün geliştirmeye devam etmek, maddi güç ister!!!) çözümler varken neden

gider $$$$  lisans parası vererek ücretli ürünleri alırlar anlamıyorum!

Yalnış anlaşılmasın o çözümlere gerçekten ihtiyaç varsa ve özellikleri

kullanılacaksa alınmasına bir şey demiyorum.

Sadece  temel özellikleri(snapshot, live migration, clone, template import gibi)

kullanılacaksa neden gidip $$$$ lisans vererek çözüm alıyorlar?

Düşündüm düşündüm ve aklıma gelen cevaplar;

1. Ön yargı + bilgisizlik +öğrenmekten kaçınma + sorun olduğunda sorunu

kendisine değilde ürüne mal etmek.

2. Alternatif çözümleri öğrenme kabiliyetine sahip olmamak!

3. Çalıştığı firma/kurum/kuruluşu kendi firması olarak görmemek!!!
   
Sizlerinde aklınızdaki cevapları benimle paylaşırsanız sevinirim.


Bu kadar konuşmuşken ben çözüm olarak ne mi kullanıyorum?

Bir kaç çözümü birlikte kullanıyorum, fakat başlıca kullandığım çözümler;

Oracle VM, Proxmox, KVM + QEMU, ovirt

Bununla birlikte destek verdiğimiz müşterilerimizin ısrarlı isteği doğrultusunda

vmware + microsoft hyper v çözümünü, müşterilerimiz için kullanıyorum.

7 Aralık 2015 Pazartesi

ovm ip uçları

OVM manager kullanıcı parolası değiştirme veya yeni kullanıcı ekleme;

# /u01/app/oracle/ovm-manager-3/bin/ovm_admin --createuser

# /u01/app/oracle/ovm-manager-3/bin/ovm_admin --modifyuser

30 Kasım 2015 Pazartesi

26 Kasım 2015 Perşembe

Güzel bir proje

Lafı uzatmaya gerek yok, hoşuma giden bir projeyi sizlerle paylaşıyorum.

http://farmhack.org/tools/culticycle

Umarım ülkemizde böyle çalışmalar yapılır.

18 Kasım 2015 Çarşamba

Günün komutu - Linux sistemlerinde {2015.11.18} - cryptsetup - Diskimizi şifreleyelim!


Bir diski veya diskin bir bölümünü şifreleyerek kullanabiliriz.

Bunun için yüklü olması gereken paket cryptsetup-luks paketi.


Gerekli paket yüklüyse, yapılması gereken adımlar;

1. Disk veya diskin bir bölümü şifrelenir.

 cryptsetup luksOpen /dev/sdd1 crypt-disk


2. Sistem açılırken otomatik mount edilmesi istiyorsak key dosyasi ilave yapılır.

 cryptsetup luksAddKey /dev/sdd1 /etc/crypt.pwd

# cat  /etc/crypt.pwd
welcome1

parola dosyasının sahipliğinide sadece okunabilir yapıyoruz.
# chmod 400 crypt.pwd  
#  ls -la /etc/crypt.pwd
-r--------. 1 root root 9 Kas 18 14:14 /etc/crypt.pwd



3. /etc/crypttab dosyasını oluştururuz.

[root@1z0-105-ocfs2-node1 ~]# cat /etc/crypttab
# <target name> <source device> <key file>          <options>
crypt-disk              /dev/sdd1            /etc/crypt.pwd     luks



4. Sistemi yeniden başlatmadan kullanıma almak için

cryptsetup luksOpen  /dev/sdd1 crypt-disk


5. Kullanıma alınan şifreli bölüm veya disk formatlanır;

  Şifreli diski formatlarız;

# mkfs.ext4 -Lhome /dev/mapper/crypt-disk

6. Kullanıma almak için fstab dosyasını güncelleriz;



/dev/mapper/crypt-disk    /home ext4 noatime,nodiratime 0 0

fstab düzenlendikten sonra;
                                                                 #mount -a
 komutu yeterli olur.

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       19G  3,0G   15G  17% /
tmpfs                 849M     0  849M   0% /dev/shm
/dev/sda1             477M   71M  377M  16% /boot
/dev/mapper/crypt-disk
                       12G   30M   12G   1% /home




Sistemi yeniden başlattığınızda, parola dosyasından parola okunarak kullanıma alınır. Şayet parola dosyası oluşturmazsanız açılış esnasında sizden parola soracaktır!

17 Kasım 2015 Salı

Günün komutu - Linux sistemlerinde {2015.11.17} - nc ile bağlantı kontrolü

Bu gün eski dostlardan birtanesi olan nc komutunu hatırlatıyorum.

nc ile bir çok şeyler yaplıdığını araştırılınca görürsünüz.

En güzel tarafıda bir servise erişebilirlik kontrolü.

Oldukça basit, sadece -z paremetresi ip ve portu vermemiz yeterli oluyor.

#  nc -z 172.16.0.49 7777
Connection to 172.16.0.49 7777 port [tcp/cbt] succeeded!

 nc — arbitrary TCP and UDP connections and listens
DESCRIPTION
     The nc (or netcat) utility is used for just about anything under the sun
     involving TCP, UDP, or UNIX-domain sockets.  It can open TCP connections,
     send UDP packets, listen on arbitrary TCP and UDP ports, do port scan‐
     ning, and deal with both IPv4 and IPv6.  Unlike telnet(1), nc scripts
     nicely, and separates error messages onto standard error instead of send‐
     ing them to standard output, as telnet(1) does with some.


   -z      Specifies that nc should just scan for listening daemons, without
             sending any data to them.  It is an error to use this option in
             conjunction with the -l option.

16 Kasım 2015 Pazartesi

Oracle Enterprise Linux 6.7 - ocfs2 global heartbeat sorunu

Oracle Enterprise Linux 6 ile birlikte ocfs2 kullanımında local heartbeat den

global heartbeat moduna geçmek istediğinizde, global heartbeat aygıtının

bulunamadığına dair hata alarak kullanamayacaksınız. Bunun nedeni

OEL6 ile birlikte gelen ocfs2-tools-1.8.0-16.el7.x86_64.rpm paketi.

Hatadan kurtulmanın yolu  ocfs2-tools 1.8.4  sürümüne elle yükseltmektir.



https://oss.oracle.com/pipermail/ocfs2-users/2013-January/005950.html


5 Kasım 2015 Perşembe

Günün komutu - Linux sistemlerinde {2015.11.05} - wall


Bu günde wall komutunu hatırlayalım.

Linux sistemlerinde genelde komutlar yaptığı işlemden gelen işimler alsada,
wall ile yaptığı iş arasında direk bir bağlantı yoktur.

Tüm sisteme yayın(broadcast) olarak mesaj göndermek istersek kullanılır.

Kullanımı oldukça basit; wall yazıp enter tuşuna bastıktan sonra, mesajınızı yazın ve ctrl+D tuşuna basın.  Yazdığınız mesaj sistemdeki tüm kullanıcılara ulaşacaktır.


man wall:
AME
     wall — write a message to users

SYNOPSIS
     wall [-n] [-t TIMEOUT] [file]

DESCRIPTION
     Wall displays the contents of file or, by default, its standard input, on
     the terminals of all currently logged in users. The command will cut over
     79 character long lines to new lines. Short lines are white space padded
     to have 79 characters. The command will always put carriage return and
     new line at the end of each line.

     Only the super-user can write on the terminals of users who have chosen
     to deny messages or are using a program which automatically denies mes‐
     sages.

     Reading from a file is refused when the invoker is not superuser and the
     program is suid or sgid.

4 Kasım 2015 Çarşamba

NAS Çözümü - rockstor

Bu gün linux tabanlı güzel bir nas çözümünü, duymayanlara duyurayım istiyorum.

Çözüm rockstor. 

http://rockstor.com/docs/

Description

Rockstor is a Network Attached Storage (NAS) and private cloud storage solution based on advanced Linux technologies like BTRFS, Docker and others. In addition to standard NAS features like file sharing via NFS, Samba, SFTP and AFP, advanced features such as online volume management, CoW Snapshots, asynchronous replication, compression, and bitrot protection are supported based on BTRFS.

Rockstor also provides apps like ownCloud, Syncthing, OpenVPN, and Plex to name a few. Apps or "Rock-ons" are powered by a Docker-based application hosting framework. And new ones can be simply added. These Rock-ons, combined with advanced NAS features, turn Rockstor into a private cloud storage solution accessible from anywhere, giving users complete control of cost, ownership, privacy and data security.

Rockstor UI is written in Javascript, making it simple to manage everything from your Web browser. The backend is written in Python and exposes RESTful APIs to easily extend functionality!


Merak edenler aşağıdaki linkten indirerek deneyebilir.

31 Ekim 2015 Cumartesi

linux sistemlerinde vbox kullanımında dosya seçimi

lvm + xfs güzel bir ikili oluşturuyor.
Virtualbox için oluştuduğum dosya sistemi iki ayrı disk üzerine 4k bloklardan oluşmaktadır.  LVM strip size ve xfs bloklarının 4k olması performansa ciddi bir faydası oluyor. i/o performansı meraklıları test edebilir. :)




[root@zurbahan ~]# lvcreate  -L2126997504B -i2 -I4 -nxfs-log depo
File descriptor 7 (pipe:[422885]) leaked on lvcreate invocation. Parent PID 18130: bash
  Rounding up size to full physical extent 1,98 GiB
  Logical volume "xfs-log" created.
[root@zurbahan ~]# lvcreate  -L400G -i2 -I4k -nvbox depo
File descriptor 7 (pipe:[422885]) leaked on lvcreate invocation. Parent PID 18130: bash
  Logical volume "vbox" created.
[root@zurbahan ~]# mkfs  -t xfs -L vboxs -l logdev=/dev/mapper/depo-xfs--log  /dev/mapper/depo-vbox
meta-data=/dev/mapper/depo-vbox  isize=256    agcount=16, agsize=6553599 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=104857584, imaxpct=25
         =                       sunit=1      swidth=2 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =/dev/mapper/depo-xfs--log bsize=4096   blocks=520192, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@zurbahan ~]#

Dosya sistemini, sisteminize bağlarken log diskinide belirtmemiz gerekiyor.

[root@zurbahan ~]# grep vbox /etc/fstab
/dev/depo/vbox /mnt/vboxs xfs noatime,nodiratime,logdev=/dev/mapper/depo-xfs--log 0 0
[root@zurbahan ~]#


Günün komutu - Linux sistemlerinde {2015.10.31} - findsmb, smbtree

Ağımızda bulunan windwos paylaşımlarını listelemek/aramak için findsmb komutundan faydalanabiliriz.


findsmb - list info about machines that respond to SMB name queries on a subnet

smbtree - A text based smb network browser

Bu komutlar samba-client paketi ile gelmektedir.
# rpm -qf /usr/bin/findsmb
samba-client-3.6.23-20.0.1.el6.x86_64

Detaylı bilgi için samba-client paketi ile sistemimize yüklenen paketleri inceleyebilirsiniz.

# rpm -ql samba-client-3.6.23-20.0.1.el6.x86_64
/usr/bin/findsmb
/usr/bin/nmblookup
/usr/bin/rpcclient
/usr/bin/sharesec
/usr/bin/smbcacls
/usr/bin/smbclient
/usr/bin/smbget
/usr/bin/smbprint
/usr/bin/smbspool
/usr/bin/smbta-util
/usr/bin/smbtar
/usr/bin/smbtree
/usr/share/man/man1/findsmb.1.gz
/usr/share/man/man1/nmblookup.1.gz
/usr/share/man/man1/rpcclient.1.gz
/usr/share/man/man1/sharesec.1.gz
/usr/share/man/man1/smbcacls.1.gz
/usr/share/man/man1/smbclient.1.gz
/usr/share/man/man1/smbget.1.gz
/usr/share/man/man1/smbtar.1.gz
/usr/share/man/man1/smbtree.1.gz
/usr/share/man/man8/smbspool.8.gz
/usr/share/man/man8/smbta-util.8.gz

27 Ekim 2015 Salı

solaris 11.3 çıktı

 Solaris meraklılarının beklediği sürüm çıktı.

http://www.oracle.com/technetwork/server-storage/solaris11/downloads/install-2245079.html


http://solaris11.ddns.net:10080

http://solaris11.ddns.net/oracle/software/os

alinti - dmesg

Notlar arasında bulduğum bir alias tanımlamasını paylaşıyorum.
Alias bana ait değil, alıntıdır.
Merak edenler google amca ve
http://linuxaria.com/article/how-to-make-dmesg-timestamp-human-readable
linklerine bakabilir :)


Bash kullanıyorsanız; önce dmesg komutunu çalıştırın.
Sonrasında aşağıdakilerini uyguladıktan sonra çalıştırın.

-------------------------------------------------------------------------------------------------------------------------
dmesg_with_human_timestamps () {     $(type -P dmesg) "$@" | perl -w -e 'use strict;
        my ($uptime) = do { local @ARGV="/proc/uptime";<>}; ($uptime) = ($uptime =~ /^(\d+)\./);
        foreach my $line (<>) {
            printf( ($line=~/^\[\s*(\d+)\.\d+\](.+)/) ? ( "[%s]%s\n", scalar localtime(time - $uptime + $1), $2 ) : $line )
        }'; }


alias dmesg=dmesg_with_human_timestamps
-------------------------------------------------------------------------------------------------------------------------

Artık dmesg çıktısındaki tarihleri insan oğlunun anlayacağı şekilde görüyorsunuz.


19 Ekim 2015 Pazartesi

Günün komutu - Linux sistemlerinde {2015.10.18} - chage

Sistemimizdeki bir kullanıcının, ömrünü, belli sürelerle zorunlu parola değiştirmeye zorlamaya yarayan, bilmediğimiz, kullanmadığımız bir komut.


chage :Usage: chage [options] LOGIN

Options:

-d, --lastday LAST_DAY set date of last password change to LAST_DAY

-E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE

-I, --inactive INACTIVE set password inactive after expiration to INACTIVE

-l, --list show account aging information

-m, --mindays MIN_DAYS set minimum number of days before password change to MIN_DAYS

-M, --maxdays MAX_DAYS set maximim number of days before password change to MAX_DAYS

-R, --root CHROOT_DIR directory to chroot into

-W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS


[root@zurbahan ~]# useradd remzi
 
[root@zurbahan ~]# chage -l remzi
Last password change                    : Eki 18, 2015
Password expires                    : never
Password inactive                    : never
Account expires                        : never
Minimum number of days between password change        : 0
Maximum number of days between password change        : 99999
Number of days of warning before password expires    : 7
 
 [root@zurbahan ~]# chage -M 360 -W 30  -m 3 -I 7   remzi
 
[root@zurbahan ~]# chage -l remzi
Last password change                    : Eki 18, 2015
Password expires                    : Eki 12, 2016
Password inactive                    : Eki 19, 2016
Account expires                        : never
Minimum number of days between password change        : 3
Maximum number of days between password change        : 360
Number of days of warning before password expires    : 30






15 Ekim 2015 Perşembe

Reactos - Desteklenmesi gereken proje

Bu gün güzel ama yeteri kadar desteklenmeyen projelerden Reactos hatırlatmak istiyorum.

İndirip bir kere test etmekde destektir. Zamanı olan herkese Reactos'u indirip,
en azından virtualbox, vmware üzerinden test etmesini tavsiye ederim.

Nedir ReactOS?

ReactOS® is a free open source operating system based on the best design principles found in the Windows NT® architecture (Windows versions such as Windows XP, Windows 7, Windows Server 2012 are built on Windows NT architecture). Written completely from scratch, ReactOS is not a Linux based system, and shares none of the UNIX architecture.
The main goal of the ReactOS® project is to provide an operating system which is binary compatible with Windows. This will allow your Windows® applications and drivers to run as they would on your Windows system. Additionally, the look and feel of the Windows operating system is used, such that people accustomed to the familiar user interface of Windows® would find using ReactOS straightforward. The ultimate goal of ReactOS® is to allow you to use it as alternative to Windows® without the need to change software you are used to.
ReactOS 0.3.17 is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

8 Ekim 2015 Perşembe

Günün komutu - Linux sistemlerinde {2015.10.08} - smem

Bu gün sistemdeki hafıza kullanımını raporlayan araçlardan smem hatırlatmak

istiyorum.  Özellikle grafiklerden hoşlananlar için, basit ama güzel bir araç

Örnek kullanımı;  smem -u --pie=user ; smem -u --bar=user



https://www.selenic.com/smem/

Umarım sizlerinde hoşuna gider.

bash kullanırken > yönlendirme ile kazara mevcut dosyayı uçurmamak, yeniden oluşturmamak!!!

bash altında script yazarken, çıktıları her hangi bir dosyaya yönlendirebilir.
Fakat yönlendirdiğimiz dosya mevcut ve içeriğinin değişmesini istemediğimiz durumlarda olabilir. Bu durumda  bash  için noclobber özelliğini aktif yapmamız gerekiyor.

Aşağıdaki örneğin açıklayıcı olacaktır;

# test dosyasının içerisine istediğimizi yazıyoruz.
$echo testtt > test
# mevcut dosyanın üzerine yazabiliyoruz
$echo testtt2 > test

#dosyanin icerinğini korumak için noclobber  ayarlıyoruz.

$set -o noclobber

#dosyanin sonuna bilgi ekleyebiliyoruz.
 $echo testtt3 >> test



# Fakat dosyayi tamamen uçurup, yeniden oluşturamıyoruz.

$echo testtt3 > test
bash: test: cannot overwrite existing file

noclobber devre dışıbırakmak istediğimizde;
                                                                       set +o noclobber
kullanabiliriz.

6 Ekim 2015 Salı

Günün komutu - Linux sistemlerinde {2015.10.06} - mpstat

Bundan sonra her gün, sık kullanılmayan, hatta ismini bile duymadığımız bir linux komutundan kısaca bahsedeceğim.

1. mpstat : işlemcilerin durumlarını raporlar


Meraklı olanlar, detaylı bilgi için herzaman olduğu gibi man den faydalanmalı.

man mpstat

MPSTAT(1)                     Linux User’s Manual                    MPSTAT(1)

NAME
       mpstat - Report processors related statistics.

SYNOPSIS
       mpstat [ -A ] [ -I { SUM | CPU | ALL } ] [ -u ] [ -P { cpu [,...] | ON | ALL } ] [ -V ] [ interval [ count ] ]

5 Ekim 2015 Pazartesi

Böyle hizmet olur mu? Yurtiçi Kargo!!!!

Yurtiçi Kargo = Hayatım boyunca karşılaştığım en kötü taşımacılık hizmeti veren firma, sizlerinde karşılaşabileceği en kötü kargo firması...

Bir hafta boyunca getirmediler ve ikinci haftasında, adreste ulaşılamadı diye not düşmüşler. Şubeden kimse telefona bakma zahmetinide göstermiyor.

Bir hafta boyunca, aldığı emaneti teslim etmeyen firmadan ne bekleyebilirsiniz ki...








Böyle hizmet olur mu? Yurtiçi Kargo!!!!

Şikayet etmeyi, sızlanmayı sevmem fakat, yurtiçi kargonun ürün dağıtımı konusunda buraya yazmadan geçemeyeceğim.

Cuma günü kargıya verilen ürün cumartesi teslim edilemez mi?
Hadi cumartesi teslim etmiyorsunuz, pazartesi edin.
Yok bunlar canları isteyince kargoyu teslim ediyorlarmış.

Ürün dağıtım günleri dışında ürün dağıtımı yapmıyorlarmış.
Birde bu çıkmış! Ürün dağıtım günü!!!
Hizmet sektöründe, hizmetin günü olur mu!

Yurtiçi kargo, artık bu kargo hizmet sektorünü bırakın.
Bu iş sizlere uygun iş değil. Kendinize başka bir iş bulun artık.








Neden NFS4

NFSv3 yerine NFSv4 kullanmanın bir çok nedeni olabilir.
Bana göre kullanmanın en büyük nedeni ise sunucu-kullanıcı arasında tek birportun(nfs/2049) yeterli olması.

Aralarında başka hangi farklılıklar olduğunu merak edenler için kısaca;

http://docs.oracle.com/cd/E37670_01/E41138/html/ol_about_nfs.html

linkine bakmaları yeterli olur.

3 Ekim 2015 Cumartesi

Genel olarak linux sistemi kurulu bir bilgisayar/sunucunun başlama işlemleri

Aşağıdaki kaynak Oracle Linux Administrator's Guide for Release 6 dan alınmıştır.   Linux kullanıcıları olarak aşağıdaki adımları bilmemiz gerektiğini düşündüğümden buradan paylaşıyorum.

4.1 About the Boot Process

Understanding the Oracle Linux boot process can help you if you need to troubleshoot problems while booting a system. The boot process involves several files and errors in these files is the usual cause of boot problems.
When an Oracle Linux system boots, it performs the following operations:
  1. The computer's BIOS performs a power-on self-test (POST), and then locates and initializes any peripheral devices including the hard disk.
  2. The BIOS reads the Master Boot Record (MBR) into memory from the boot device. (For GUID Partition Table (GPT) disks, this MBR is the protective MBR on the first sector of the disk.) The MBR stores information about the organization of partitions on that device. On a computer with x86 architecture, the MBR occupies the first 512 bytes of the boot device. The first 446 bytes contain boot code that points to the bootloader program, which can be on the same device or on another device. The next 64 bytes contain the partition table. The final two bytes are the boot signature, which is used for error detection. The default bootloader program used on Oracle Linux is GRUB, which stands for GRand Unified Bootloader.
  3. The GRUB bootloader loads the Oracle Linux kernel into memory.
  4. The kernel initializes and configures the system hardware.
  5. The kernel reads the initramfs file, extracts its contents into a temporary, memory-based file system (tmpfs), and loads the modules that the file system contains.
  6. The kernel starts the /sbin/init process with a process ID of 1 (PID 1). init is the ancestor of all processes on a system. init reads its job configuration from the /etc/init directory. The /etc/init/rcS.conf file controls how init handles system initialization.
  7. init reads /etc/inittab to determine the default run level. The entry in /etc/inittab should take the form id:N:initdefault:, where N is the default run level. If the file does not define a default boot level, the default run level is 3.
    Note
    Do not edit /etc/inittab other than to change or comment out the default run level.
    The sole function of /etc/inittab is to define the default run level. The *.conf scripts in /etc/init determine how init should behave in response to changes in system state.
    You can use a kernel boot parameter to override the default run level. See Section 4.2.1.1, “Kernel Boot Parameters”.
  8. init runs /etc/rc.sysinit to initialize the system, including:
    • setting the host name
    • initializing the network
    • mounting the /proc file system
    • initializing SELinux based on its configuration
    • printing a welcome banner
    • initializing the system hardware based on kernel boot arguments
    • mounting the file systems
    • cleaning up directories in /var
    • starting swapping
  9. init executes scripts in the /etc/rcX.d directory to bring the system to the default run level, X. The /etc/init/rc.conf file controls how init starts individual run levels. See Section 4.3, “About Run Levels” and Section 4.3.4, “About Service Scripts”.
  10. init runs any actions that you have defined in /etc/rc.local.
Note
The Upstart version of init in Oracle Linux does not keep track of system run levels. Instead, user-space utilities such as initctl implement run levels. The processes that init manages are known as jobs, which are defined by files in the /etc/init directory. init is an event-based daemon, starting or stopping jobs in response to changes in the system state, which can be the result of other jobs starting or stopping.
For information on Upstart and on how to write Upstart event handlers, see the init(5), init(8), and initctl(8) manual pages.


4.1 About the Boot Process

Understanding the Oracle Linux boot process can help you if you need to troubleshoot problems while booting a system. The boot process involves several files and errors in these files is the usual cause of boot problems.
When an Oracle Linux system boots, it performs the following operations:
  1. The computer's BIOS performs a power-on self-test (POST), and then locates and initializes any peripheral devices including the hard disk.
  2. The BIOS reads the Master Boot Record (MBR) into memory from the boot device. (For GUID Partition Table (GPT) disks, this MBR is the protective MBR on the first sector of the disk.) The MBR stores information about the organization of partitions on that device. On a computer with x86 architecture, the MBR occupies the first 512 bytes of the boot device. The first 446 bytes contain boot code that points to the bootloader program, which can be on the same device or on another device. The next 64 bytes contain the partition table. The final two bytes are the boot signature, which is used for error detection. The default bootloader program used on Oracle Linux is GRUB, which stands for GRand Unified Bootloader.
  3. The GRUB bootloader loads the Oracle Linux kernel into memory.
  4. The kernel initializes and configures the system hardware.
  5. The kernel reads the initramfs file, extracts its contents into a temporary, memory-based file system (tmpfs), and loads the modules that the file system contains.
  6. The kernel starts the /sbin/init process with a process ID of 1 (PID 1). init is the ancestor of all processes on a system. init reads its job configuration from the /etc/init directory. The /etc/init/rcS.conf file controls how init handles system initialization.
  7. init reads /etc/inittab to determine the default run level. The entry in /etc/inittab should take the form id:N:initdefault:, where N is the default run level. If the file does not define a default boot level, the default run level is 3.
    Note
    Do not edit /etc/inittab other than to change or comment out the default run level.
    The sole function of /etc/inittab is to define the default run level. The *.conf scripts in /etc/init determine how init should behave in response to changes in system state.
    You can use a kernel boot parameter to override the default run level. See Section 4.2.1.1, “Kernel Boot Parameters”.
  8. init runs /etc/rc.sysinit to initialize the system, including:
    • setting the host name
    • initializing the network
    • mounting the /proc file system
    • initializing SELinux based on its configuration
    • printing a welcome banner
    • initializing the system hardware based on kernel boot arguments
    • mounting the file systems
    • cleaning up directories in /var
    • starting swapping
  9. init executes scripts in the /etc/rcX.d directory to bring the system to the default run level, X. The /etc/init/rc.conf file controls how init starts individual run levels. See Section 4.3, “About Run Levels” and Section 4.3.4, “About Service Scripts”.
  10. init runs any actions that you have defined in /etc/rc.local.
Note
The Upstart version of init in Oracle Linux does not keep track of system run levels. Instead, user-space utilities such as initctl implement run levels. The processes that init manages are known as jobs, which are defined by files in the /etc/init directory. init is an event-based daemon, starting or stopping jobs in response to changes in the system state, which can be the result of other jobs starting or stopping.
For information on Upstart and on how to write Upstart event handlers, see the init(5), init(8), and initctl(8) manual pages.

28 Eylül 2015 Pazartesi

Linux sistemlerinde belli bir kullanıcıya ait, belli dosyaları silme (Yeni başlayanlar için :) )


Bir kullanıcıya ait sonu tmp ile biten dosyaları silmek için find komutunu kullanabiliriz.

Örnek;

find /home -uid 32768 -name \*.tmp -exec rm -f {} \; -print

kendi kullanıcınızın id si ile 32768 değiştirmeyi unutmayınız.

Detaylı bilgi için: man find

25 Eylül 2015 Cuma

Common administrative commands in Red Hat Enterprise Linux 5, 6, and 7 - from Redhat


https://access.redhat.com/articles/1189123


System basics

TaskRHEL5RHEL6RHEL7
View subscription information/etc/sysconfig/rhn/systemid/etc/sysconfig/rhn/systemid
subscription-manager identity
subscription-manager identity
Configure subscriptionrhn_register
subscription-manager 1
rhn_register
rhnreg_ks
subscription-manager
subscription-manager2
rhn_register 3
View RHEL version information/etc/redhat-release
View system profilesosreport
dmidecode
hwbrowser
sosreport
dmidecode
lstopo
lscpu

Basic configuration

TaskRHEL5RHEL6RHEL7
Graphical configuration toolssystem-config-*gnome-control-center
Text-based configuration toolssystem-config-*-tui
Configure printersystem-config-printer
Configure networksystem-config-networknmcli
nmtui
nm-connection-editor
Configure system languagesystem-config-languagelocalectl
Configure time and datesystem-config-date
date
timedatectl
date
Synchronize time and datentpdate
/etc/ntp.conf
timedatectl
/etc/chrony.conf
ntpdate
Configure keyboardsystem-config-keyboardlocalectl
Configure SSH/etc/ssh/ssh_config
/etc/ssh/sshd_config
~/.ssh/config ssh-keygen

Jobs and services

TaskRHEL5RHEL6RHEL7
List all serviceschkconfig --list
ls /etc/init.d/
systemctl -at service
ls /etc/systemd/system/*.service
ls /usr/lib/systemd/system/*.service
List running servicesservice --status-allsystemctl -t service --state=active
Start/stop serviceservice name start
service name stop
systemctl start name.service
systemctl stop name.service
Enable/disable servicechkconfig name on
chkconfig name off
systemctl enable name.service
systemctl disable name.service
View service statusservice name statussystemctl status name.service
Check if service is enabledchkconfig name --list systemctl is-enabled name
Create new service file or modify configurationchkconfig --addsystemctl daemon-reload
/etc/systemd/system/*.service
View run level/targetrunlevel
who -r
systemctl get-default
who -r
Change run level/target/etc/inittab
init run_level
systemctl isolate name.target
systemctl set-default
Configure logging/etc/syslog.conf/etc/rsyslog.conf/etc/rsyslog.conf
/etc/rsyslog.d/*.conf
/var/log/journal
systemd-journald.service
View logs/var/log/var/log
journalctl
Configure system auditadd audit=1 to kernel cmdline
auditctl
/etc/audit/auditd.conf
/etc/audit/audit.rules
authconfig
/etc/pam.d/system-auth
pam_tty_audit kernel module
View audit outputaureport /var/log/faillog
Schedule/batch taskscron
at
batch
Find file by namelocate
Find file by characteristicfind
Create archivetar
cpio
zip

Kernel, boot, and hardware

TaskRHEL5RHEL6RHEL7
Single user/rescue modeappend 1 or s or init=/bin/bash to kernel cmdlineappend rd.break or init=/bin/bash to kernel cmdline
Shut down systemshutdown
Power off systempoweroffpoweroff
systemctl poweroff
Halt systemhalthalt
systemctl halt
Reboot systemrebootreboot
systemctl reboot
Configure default run level/target/etc/inittabsystemctl set-default
Configure GRUB bootloader/boot/grub/grub.conf/etc/default/grub
grub2-mkconfig
grub-set-default
Configure kernel modulemodprobe
View hardware configuredhwbrowserlshw (in EPEL)
Configure hardware deviceudev
View kernel parameterssysctl -a
cat /proc/cmdline
Load kernel modulemodprobe
Remove kernel modulemodprobe -r
View kernel versionrpm -q kernel
uname -r

Software management

TaskRHEL5RHEL6RHEL7
Install softwareyum install
yum groupinstall
yum install
yum group install
View software infoyum info
yum groupinfo
yum info
yum group info
Update softwareyum update
Upgrade softwareyum upgrade
Configure software repositorysubscription-manager repos
/etc/yum.repos.d/*.repo
Find package owning filerpm -qf filename
yum provides filename-glob
View software versionrpm -q packagename
View installed softwarerpm -qa
yum list installed

User management

TaskRHEL5RHEL6RHEL7
Graphical user managementsystem-config-users
Create user accountuseradd
Delete user accountuserdel
View/change user account detailsusermod
/etc/passwd
vipw
id
Create user groupgroupadd
Delete user groupgroupdel
Change group detailsgroupmod
/etc/group
Change user passwordpasswd
Change user permissionsusermod
visudo
Change group permissionsgroupmod
visudo
Change password policychage
View user sessionsw

File systems, volumes, and disks

TaskRHEL5RHEL6RHEL7
Default file systemext3ext4xfs
Create/modify disk partitionsfdisk
parted
fdisk
gdisk
parted
ssm create
Format disk partitionmkfs.filesystem_type (ext4, xfs)
mkswap
mkfs.filesystem_type (ext4, xfs)
mkswap
ssm create
Defragment disk spacecopy data to new file system
fsck (look for 'non-contiguous inodes')
copy data to new file system
fsck (look for 'non-contiguous inodes')
xfs_fsr
Mount storagemount
/etc/fstab
mount
/etc/fstab
ssm mount
Mount and activate swap/etc/fstab
swapon -a
Configure static mounts/etc/fstab
View free disk spacedf
View logical volume infolvdisplay
lvs
vgdisplay
vgs
pvdisplay
pvs
Create physical volumepvcreatepvcreate
ssm create (if backend is lvm)
Create volume groupvgcreatevgcreate
ssm create (if backend is lvm)
Create logical volumelvcreatelvcreate
ssm create (if backend is lvm)
Enlarge volumes formatted with default file systemvgextend
lvextend
resize2fs
vgextend
lvextend
xfs_growfs
ssm resize
Shrink volumes formatted with default file systemresize2fs
lvreduce
vgreduce
XFS cannot currently be shrunk; copy desired data to a smaller file system.
Check/repair file systemfsckfsck
ssm check
View NFS shareshowmount -e
mount
Configure NFS share/etc/exports
service nfs reload
/etc/exports
systemctl reload nfs.service
Configure on-demand auto-mounts/etc/auto.master.d/*.autofs
/etc/auto.*
Change file permissionschmod
chown
chgrp
umask (future file creation)
Change file attributeschattr
Change access control listsetfacl

Networking

TaskRHEL5RHEL6RHEL7
Configure name resolution/etc/hosts
/etc/resolv.conf
/etc/hosts
/etc/resolv.conf
nmcli con mod
Configure hostname/etc/sysconfig/networkhostnamectl
/etc/hostname
nmtui
View network interface infoip addr
ifconfig
brctl
ip addr
nmcli dev show
teamdctl
brctl
bridge
Configure network interface/etc/sysconfig/network-scripts/ifcfg-* /etc/sysconfig/network-scripts/ifcfg-*
nmcli con [add|mod|edit]
nmtui
nm-connection-editor
View routesip route
Configure routesip route add
system-config-network
/etc/sysconfig/route-iface
ip route add
nmcli
nmtui
nm-connection-editor
/etc/sysconfig/route-iface
Configure firewalliptables and ip6tables
/etc/sysconfig/ip*tables
iptables and ip6tables
/etc/sysconfig/ip*tables
system-config-firewall
firewall-cmd
firewall-config
View ports/socketsss
lsof
netstat
ss
lsof

Security and identity

TaskRHEL5RHEL6RHEL7
Configure system security/etc/selinux/config
chcon
restorecon
semanage
setsebool
system-config-selinux
Report on system securitysealert
LDAP, SSSD, Kerberosauthconfig
authconfig-tui
authconfig-gtk
Network usersgetent

Resource management

TaskRHEL5RHEL6RHEL7
Trace system callsstrace
Trace library callsltrace
Change process prioritynice
renice
Change process run locationtaskset
Kill a processkill
pkill
killall
View system usagetop
ps
sar
iostat
netstat
vmstat
mpstat
numastat
top
ps
sar
iostat
netstat
ss
vmstat
mpstat
numastat
tuna
top
ps
sar
iostat
ss
vmstat
mpstat
numastat
tuna
View disk usagedf df
iostat

22 Eylül 2015 Salı

lvm i hızlandırmak (Gazlamak :) ) { SSD diski cache disk olarak kullanmak md_cache}

Linux dağıtımlarından her hangi birinde, softraid ve lvm kullanıyorsanız, performansınız düşüklüğünden şikayetçi iseniz, bir adet ssd disk + lvmcache  yardımınıza koşacaktır. lvmcache güncel linux dağıtımlarında standart bulunmaktadır.

Kullandığınız dağıtımda bu özelliğin olup olmadığını öğrenmek için;

                     #modinfo dm_cache

komutundan faydalanabilirsiniz.


Bu komut sizlere aşağıdaki gibi bir çıktı veriyorsa sorun yok.

root@ultra27:~# modinfo dm_cache
filename:       /lib/modules/4.2.0-10-generic/kernel/drivers/md/dm-cache.ko
license:        GPL
author:         Joe Thornber <ejt@redhat.com>
description:    device-mapper cache target
srcversion:     5B4207739B7A6C60B2A22CE
depends:        dm-persistent-data,dm-bio-prison
intree:         Y
vermagic:       4.2.0-10-generic SMP mod_unload modversions
signer:         Build time autogenerated kernel key
sig_key:        F3:83:3C:CF:74:C7:88:F8:B9:EC:CF:4D:A2:19:C0:B6:39:84:EE:58
sig_hashalgo:   sha512
parm:           cache_copy_throttle:A percentage of time allocated for copying to and/or from cache (uint)
root@ultra27:~#

Şayet sisteminizde mevcut değilse sisteminizi/kernelinizi güncellemeniz yeterli olur.

dm_cache kullanılan sistemde lvs çıktısı;






Kullanımını;
                  man lvmcache
ile öğrenebilirsiniz. Yok ben man den öğrenemiyorum diyenlerdenseniz;


Unutmamak gereken önemli nokta, cache olarak kaliteli ssd kullanılması gerektiği.  ssd diskinizden emin değilseniz, 2 tane ssd yi mirror olarak kullanabilirsiniz.

Kendim ssd cache olarak "Intel SSD DC S3700 Series 100GB, SATA" disklerinden kullanıyorum.

    Model Number:       INTEL SSDSC2BA100G3                    
    Firmware Revision:  5DV10270

Sizlerede tavsiye ederim.

 

uzun bir aranın ardından biraz yenilik iyi olur diyerek tekrardan linux lvm cache kullanmaya başladım. Başlamışkenden bu bilgiyi hatırlamak için tahtaya yazıyorum.

Kişisel lab ortamlarında kullanabilirsiniz. 

Sistem disklerimiz;

Data diskimiz : /dev/sda                (normal sata 3.5" disk)

Cache diskimiz : /dev/sdb

                              /dev/sdc

Cache metadata diskimiz:   /dev/nvme0n1p3

                                                 /dev/nvme1n1p3                      

lvmcache cachemetada data için en fazla 16GB destekler, buda fazlasıyla yeterli.

cache metadatayı nvme diskimiz  üzerinde, cache olarak ssd sata diskimizi, data diskimiz olarak normal sata diski kullanıyoruz. ufacık milyonlarca dosyanız varsa metadatayı yüksek tutabiliriz.

Hadi başlayalım.


    1. Volum grubu oluşturuyoruz

         # vgcreate vg_data /dev/sd[abc} /dev/nvme0n1p3 /dev/nvme1n1p3

    2. Data lv yi oluşturuyoruz

        lvcreate -L16T -n lv_data vg_data /dev/sda

    3. Cache lv yi oluşturalım

        # lvcreate -L1T -i2 -n lv_cache vg_data /dev/sdb /dev/sdc

    4. Cache meta datayı oluşturalım

       # lvcreta -L16G -i2 -n lv_cachemetadata vg_data /dev/nvme0n1p3 /dev/nvme1n1p3 

    5. cache pool olarak ayarlayalım

       # lvconvert --type cache-pool --poolmetadata vg_data/lv_cachemetadata vg_data/lv_cache

    6. Kontrol edelim

         # lvs

         # lvs -a -o +devices vg_data

 


19 Eylül 2015 Cumartesi

sparc sistemlerde boot diski seçmek

reset
reset-all
probe-scsi-all

{0} ok devalias
ttya                     /ebus@c0/serial@0,ca0000
nvram                    /virtual-devices/nvram@3
net3                     /pci@0/pci@0/pci@1/pci@0/pci@3/network@0,1
net2                     /pci@0/pci@0/pci@1/pci@0/pci@3/network@0
net1                     /pci@0/pci@0/pci@1/pci@0/pci@2/network@0,1
net0                     /pci@0/pci@0/pci@1/pci@0/pci@2/network@0
net                      /pci@0/pci@0/pci@1/pci@0/pci@2/network@0
cdrom                    /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/storage@2/disk@0:f
disk7                    /pci@0/pci@0/pci@2/scsi@0/disk@7
disk6                    /pci@0/pci@0/pci@2/scsi@0/disk@6
disk5                    /pci@0/pci@0/pci@2/scsi@0/disk@5
disk4                    /pci@0/pci@0/pci@2/scsi@0/disk@4
disk3                    /pci@0/pci@0/pci@2/scsi@0/disk@3
disk2                    /pci@0/pci@0/pci@2/scsi@0/disk@2
disk1                    /pci@0/pci@0/pci@2/scsi@0/disk@1
disk0                    /pci@0/pci@0/pci@2/scsi@0/disk@0
disk                     /pci@0/pci@0/pci@2/scsi@0/disk@0
scsi                     /pci@0/pci@0/pci@2/scsi@0
virtual-console          /virtual-devices/console@1
name                     aliases
{0} ok set boot-device /pci@0/pci@0/pci@2/scsi@0/disk@4
Unimplemented action # 1 on object (f02733b0) , whose maximum action # is -1

{0} ok setenv boot-device /pci@0/pci@0/pci@2/scsi@0/disk@4
boot-device =           /pci@0/pci@0/pci@2/scsi@0/disk@4
{0} ok boot
Boot device: /pci@0/pci@0/pci@2/scsi@0/disk@4  File and args:


 {0} ok show-disks



14 Eylül 2015 Pazartesi

Bildiğimizi zannettiğimiz, kulaktan dolma bilgilerle...


Merhabalar,

Bu gün bir soruya cevap verirken, düşünmeden, araştırmadan, hızlıca cevap verdiğimizi fark ettim.

 "Linux, Microsoft Windows 7 Nedir? Aralarındaki temel farkı tek cümle ile özetleyiniz." sorusuna 55 den fazla cevap  içerisinde tane bile doğru cevap çıkmaması.

55 tane cevap veren farklı insanlardan hiç birisi,  arama motorlarına(google/yandex vs.)  "linux nedir"  sorusunu sormamış olması çok ilginç.

Galiba bu bizim toplumsal yapımızı gösteriyor..



Cevabı merak edip, araştırmayan için cevap;

Linux  kernel(işletim sistemleri için), microsoft windows 7 ise işletim sistemidir.

Redhat/Debian/Suse gibi dağıtımları işletim sistemi olarak kabul edebiliriz.


8 Eylül 2015 Salı

freebsd ve qmail meraklıları için

Merhabalar,

üzerinden çıkalı yıllar geçsede önemini kaybetmeyen freebsd ve qmail kurulumu hakkında bir kaynağı paylaşmak istiyorum.

http://www.freebsdrocks.net/index.php/documents/17-qmail-2-0-testing-only

Umarım meraklılarına faydalı olur.

6 Eylül 2015 Pazar

78 diskli sunucu ( disk sunucusu)


Bu gün, Türkiye'de satılmayın(umarım reklamdan sonra satan birileri çıkar!!) bir ürün reklamı yapmak istiyorum.


Bu ürün oldukça özel bir sunucu. Üzerinde 78 adet disk takılabilin bir sunucu.

Yüksek disk pakasitesine ihtiyacı olanlar lütfen dikkatlice inceleyiniz. Hatta incelemekle kalmayıp,
üreticiye Türkiye'de satılıp satılmadığını, fiyatını sormanız çok güzel olur.


http://www.quantaqct.com/Product/Storage/Storage-Servers/4U/New-QuantaPlex-T21P-4U-p291c77c71c150c222


QuantaPlex T21P-4U

Storage
SKU 1: 2 MBs with 70x 3.5"/2.5” hot plug, each MB manages 35 hard drives
SKU 2: 1 MB with 78x 3.5"/2.5” hot plug

Processor
Processor Type
(2) Intel® Xeon® processor E5-2600 v3 product family,
Max. TDP Support
135W
Number of Processors
2
Internal Interconnect
6.4 / 8.0/ 9.6 GT/s
L3 Cache
Up to 45MB


 Storage Controller
Onboard
Wellsburg PCH RSTe
Optional Controller (more options refer to the CCL)
Quanta LSI® 3008 12Gb/s SAS mezzanine, RAID 0,1,10
Quanta LSI® 3108 12Gb/s RAID mezzanine, RAID 0, 1, 5, 10; RAID 6 requires additional RAID key


 Onboard Storage
(2) 2.5" hot-plug SSD
(1) SATADOM 

QuantaPlex T21P-4U
Ultra-Dense Extreme Performance Storage Server
Tailored to meet the growing storage capacity demand in hyper scale datacenter, the QuantaPlex T21P-4U equips up to seventy-eight hot-swappable and screw-less 3.5” drives and two high-computing server nodes into an ultra-dense 4U chassis. Capable of delivering up to 620 terabytes of storage in one system, the QuantaPlex T21P-4U efficiently achieve the most demanding cloud storage environments planning today and future.

The QuantaPlex T21P-4U is a highly sophisticated, dense storage server built to provide outstanding low dollar-per-GB costs for cold, warm and even hot storage workloads. With the latest Intel® Xeon® E5-2600v3 processors and Quanta System Manager (QSM), the QuantaPlex T21P-4U offers cloud planners the storage capacity and the manageability they need.
Maximized Storage Density
Aimed at streaming file, massive object or block level data stores for cloud environments, archive and data analytics with up to seventy-eight 3.5” SAS/SATA hard drives, each up to 8TB in capacity, QuantaPlex T21P-4U provides exceptionally high storage density while leveraging high-efficiency power to maximize performance-per-watt savings to reduce TCO. Two 2.5” SSD boot drives provide extra capability for high-performance storage within each node for fast access to frequently-used data.
Efficient System Assembly and Deployment
Driven by social media, mobile applications, and devices boosted by mega hyper scale datacenters, server and storage platforms are requiring more capacity to store the increasing volume of data and retain the data for longer periods of time than ever. To install higher density and large number of hard drives into one system is time consuming for system integrators and IT administrators. With innovated screw-less hard drive carrier design, QuantaPlex T21P-4U allows operators can complete the system assembly in the short time, which is significantly reduce the deployment and service time.
Flexible and Versatile I/O Expansion
QuantaPlex T21P-4U support QCT made OCP LAN mezzanine card with varied type of Ethernet connectivity from 1Gb, 10Gb and 40Gb. Along with the support up to three additional PCIe Gen3 slots, offers flexible and versatile I/O expansion capability to eliminate costly bottlenecks. Deliver high availability even under heavy loading with up to four 1600W Platinum-efficiency power supplies that provide fully-redundant 2+2 split zone power configuration capabilities.
About QCT
QCT (Quanta Cloud Technology) is a global datacenter solution provider extending the power of hyperscale datacenter design in standard and open SKUs to all datacenter customers.  Product lines include servers, storage, network switches, integrated rack systems and cloud solutions, all delivering hyperscale efficiency, scalability, reliability, manageability, serviceability and optimized performance for each workload.  QCT offers a full spectrum of datacenter products and services from engineering, integration and optimization to global supply chain support, all under one roof.  The parent of QCT is Quanta Computer Inc., a Fortune Global 500 technology engineering and manufacturing company.

ansible ile yerel quay sunucusu üzerinden execution environment kullanımı

 Yerel quay veya registry sunucularımızdaki ee leri ansible ile kullanabiliyoruz. Bunun için kendi yaptığımız ee leri veya hazır ee leri yük...