.

Can's Windows Server Blog

Azcık Windows Failover Cluster

Failover cluster for VM (Virtual machines)

İki host makina cluster landiktan sonra artik VM (sanal makinalar) birer kaynaktır (resource).

VM in calistigi makina digger cluster uyelerine heartbeat (kalp atisi) sinyallerini gondermekten sorumludur.

Heartbeat kesilince (5 sn, tipik port 3343) failover işlemi başlar. Burada önemli nokta disk ortak olduğu icin aslında sadece işlemci gücü diğer makinaya gecer.

Failover planli bir sekilde de gerceklestirilebilir. Amaç hizmet veren VM in hizmetlerinde kesinti olmadan bakım vs diğer faaliyetlerin yapılması ve donanımsal arıza olması durumunda da otomatik hizmetlerin devamlılığının sağlanması amaçlanmaktadır.

ailover islemi heartbeat gelmeyince baslar.

Birden çok node varsa hiyerarşik bir sıra olmalı ve failover bu sıraya göre gerçekleşmelidir.

Hatta bazen bazıları failover da üzerine bazi sistemleri almamak üzerede ayarlanabilir.

Genelde failover cluster da birden cok VM hostlar üzerinde koşar. Failover oldugunda bir hosta aşırı yüklenilmesi yerine yükün dagitilmasi daha iyi olur.

Failback ise üzerindeki VM leri atarak cluster dan çıkan node un geri gelmesi durumunda eski VM lerini geri almasi durumudur.

]]>

Sistemler burası ve düşünceler

Bir kaç ay önce başladığım Windows adminliği maceramda notlarımı burada yazıyorum ama sanki burası giderek karmaşaya dönüyor.Bir şekilde daha iyi düzenlemem ve hatta belki farklı sub-domainler ile devam etmem iyi olacak.

Tabii zaman bulup kurmakta lazım…

Aslında seneye benim firmaya taşısam mı? Hosting hacmi daha büyük.

]]>

Windows HyperV cluster Storage

THIS IS A DRAFT PAGE NEEDS TO BE UPDATED A LOT 🙂

Create a storage. 

1- install iSCSI target service 

    a-  Click file and storage services –> iSCSI it shall prompt you to install it. If not install iSCSI virtual disk can not be created

2- file and storage services –> iSCSI –> Select Create –> go through the Wizard and select a system(most of the time the host that we already use) as target 

    a- systems should be in a domain (AD) before hand. and in iSCSI disk creation process when it comes to the “Select a method to identify the initiator” use browse to add cluster nodes  to it.

    b- those are the nodes which are allowed to connect to iSCSI virtual disk.

    c- authentification if required.

    d- systems will look as if they are not connected.

3- Find (in services) “Microsoft iSCSI initiator Service” and set it to automatic. if not started start. Do it for all nodes.

    a- powershell commands :

        I – enter-pssession cluster1

            A- First establish an iSCSI target portal-

                a)  New-IscsiTargetPortal -TargetPortalAddress lab-dc1

            B- then  list iSCSI targets.

                b) Get-IscsiTarget

                    1) this show address and that it is not connected so we will connect

                c) Get-Iscssitarget | Connect-IscsiTarget

                    1) now when we do “Get-IscsiTarget” we should see connected.

                    2) We can also use “Get-IscsiConnection”

                    3) also “Get-IscsiSession” shows details of the connection. Like addresses, authentications, persistence…..etc

                    4) If we do “Get-IscsiConnection|Get-Disk” then we see the 3 disks we have created see their status online-offline etc.

                ​    5) we want our iSCSI sesssion is persistent. And it looks false so we want to change it to persistent. (it should always be persistent)

                        a- Get-iscsiTarget | Connect-IscsiTarget -IsPersistent $True

        II- enter-pssession cluster1

            A- Connect to IscsitargetPortal

                a) New-IscsiTargetPortal -TargetPortalAddress lab-dc1

                b) Get-iscsiTarget | Connect-IscsiTarget -IsPersistent $True

                c)  Get-IscsiConnection|Get-Disk     –> see the disk are same

        Getting the disks online

        III- enter-pssession -ComputerName cluster1

            A- get-disk -Number 1 |fl

            B- Initialize-Disk -Number 1 -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume

            C- Initialize-Disk -Number 2 -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume

            D- Initialize-Disk -Number 3 -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume

                a) Get-Partition  —> to see partitions

                b) Install-WindowsFeature Multipath-IO –> not done

            E- Exit-Pssession

            F- Enter-Pssession cluster2

            G- Get-partition

                a) will list one actual partition (the others are for system recovery ..etc)

            H- Get-Disk 

                a) will show disks and will show them offline (we are int he second note)

4- go to GUI and add “Failover Cluster” role on the AD node (because we will use AD machine to manage it)

    Powershell

    ​a) Get-WindowsFeature failover-clustering   —> if not install 

TIME 18:44

(        -PassThru (if I am not mistaken) is used to add commands not that much related one after another .  In the example left side of it causes no output and with passthru it makes (hey lets take the disk we had been working on and pass it to ) the right side next command in the pipe. )

  II- Start-Service msiscsi

* Failover cluster management is the tool we will use to validate configuration

* launch wizard.

* Click validate configuration and add the names of the servers that you want to use then it verifies the servers exists and can communicate with them

* And then run tests.. Run all test will list thest and perform them. And give information about the process. Click on the errors and warnings and click view report so you can see the details 

* After that create the cluster will create the cluster.

* the IP address it show in a specific network is the administrative access point . Basically the ip address of the cluster itsself.

* you can unclick “add all eligible storage to the cluster” so you can manage the disks

* While the process goes you can see the cluster being formed in AD

* Later on the failover cluster manager on storage menu –> disks (left click) –> add disk and you can add disks.

* After disks selection should set the roles example is a standard general ile server . 

    * to do that on failover cluster manager rightclick on the top line where the name of the cluster is shown. and select “Configure Role”

    * this will start “High Availability wizard”

    * then give it a name TestlabsFS and an IP adres which will be used for the actual file server.

    ​*TIME 24 :62

select disks (decide 1 or more )

    * finish the process  it will create online cluster

    * 

so first we configured Iscsi than failover cluster



]]>

Creating failover cluster

reate a storage. 

1- install iSCSI target service 

    a-  Click file and storage services –> iSCSI it shall prompt you to install it. If not install iSCSI virtual disk can not be created

2- file and storage services –> iSCSI –> Select Create –> go through the Wizard and select a system(most of the time the host that we already use) as target 

    a- systems should be in a domain (AD) before hand. and in iSCSI disk creation process when it comes to the “Select a method to identify the initiator” use browse to add cluster nodes  to it.

    b- those are the nodes which are allowed to connect to iSCSI virtual disk.

    c- authentification if required.

    d- systems will look as if they are not connected.

3- Find (in services) “Microsoft iSCSI initiator Service” and set it to automatic. if not started start. Do it for all nodes.

    a- powershell commands :

        I – enter-pssession cluster1

            A- First establish an iSCSI target portal-

                a)  New-IscsiTargetPortal -TargetPortalAddress lab-dc1

            B- then  list iSCSI targets.

                b) Get-IscsiTarget

                    1) this show address and that it is not connected so we will connect

                c) Get-Iscssitarget | Connect-IscsiTarget

                    1) now when we do “Get-IscsiTarget” we should see connected.

                    2) We can also use “Get-IscsiConnection”

                    3) also “Get-IscsiSession” shows details of the connection. Like addresses, authentications, persistence…..etc

                    4) If we do “Get-IscsiConnection|Get-Disk” then we see the 3 disks we have created see their status online-offline etc.

                ​    5) we want our iSCSI sesssion is persistent. And it looks false so we want to change it to persistent. (it should always be persistent)

                        a- Get-iscsiTarget | Connect-IscsiTarget -IsPersistent $True

        II- enter-pssession cluster1

            A- Connect to IscsitargetPortal

                a) New-IscsiTargetPortal -TargetPortalAddress lab-dc1

                b) Get-iscsiTarget | Connect-IscsiTarget -IsPersistent $True

                c)  Get-IscsiConnection|Get-Disk     –> see the disk are same

        Getting the disks online

        III- enter-pssession -ComputerName cluster1

            A- get-disk -Number 1 |fl

            B- Initialize-Disk -Number 1 -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume

            C- Initialize-Disk -Number 2 -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume

            D- Initialize-Disk -Number 3 -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume

                a) Get-Partition  —> to see partitions

                b) Install-WindowsFeature Multipath-IO –> not done

            E- Exit-Pssession

            F- Enter-Pssession cluster2

            G- Get-partition

                a) will list one actual partition (the others are for system recovery ..etc)

            H- Get-Disk 

                a) will show disks and will show them offline (we are int he second note)

4- go to GUI and add “Failover Cluster” role on the AD node (because we will use AD machine to manage it)

    Powershell

    ​a) Get-WindowsFeature failover-clustering   —> if not install 

TIME 18:44

(        -PassThru (if I am not mistaken) is used to add commands not that much related one after another .  In the example left side of it causes no output and with passthru it makes (hey lets take the disk we had been working on and pass it to ) the right side next command in the pipe. )

  II- Start-Service msiscsi

* Failover cluster management is the tool we will use to validate configuration

* launch wizard.

* Click validate configuration and add the names of the servers that you want to use then it verifies the servers exists and can communicate with them

* And then run tests.. Run all test will list thest and perform them. And give information about the process. Click on the errors and warnings and click view report so you can see the details 

* After that create the cluster will create the cluster.

* the IP address it show in a specific network is the administrative access point . Basically the ip address of the cluster itsself.

* you can unclick “add all eligible storage to the cluster” so you can manage the disks

* While the process goes you can see the cluster being formed in AD

* Later on the failover cluster manager on storage menu –> disks (left click) –> add disk and you can add disks.

* After disks selection should set the roles example is a standard general ile server . 

    * to do that on failover cluster manager rightclick on the top line where the name of the cluster is shown. and select “Configure Role”

    * this will start “High Availability wizard”

    * then give it a name TestlabsFS and an IP adres which will be used for the actual file server.

    ​*TIME 24 :62

NOT FINISHED YET

]]>

IPv6 Global Unicast Adres Yapısı

bir IpV6 adresi

2001:908:413: 15a0: eda4:74ff:fe4d:b972

burada ilk 3 16bitlik bölüm : 2001:908:413: –> 48 bit Global Routing Prefix

sonra ki 16 bitlik bölüm : 15a0 –> Subnet ID

ve son 64 bitlik bölüm : eda4:74ff:fe4d:b972 –> Interface Identifier. Yada Host kısmı.

Global Unicast Adres in ilk 64 biti default gateway den gelir. Diğer kısmını ise bizim cihazımız üretir.

İlk 64 bit hiyerarşik bir şekilde üretilir.

IANA ilk 16 biti 2001/16 routing prefix olarak tüm sistemlere Unicast global adres olarak atamıştır. Yeni bir rakam belki 9 milyon yıl sonra gelecektir.

sonraki seviye ise bölgesel ISP dir. Türk Telekom, Süperonline vs.. bunlarda 16 bitlik kısmı atarlar yani adres 2001:1234/32 olur.

Sonra ki ise yine bir alt ISP ye gider (Türkiye de durum nasıl bilmiyorum) ancak burada da bir 16 bitlik kısım eklenir ve adres 2001:1234:5678/48 olur.

Artık firma (yada ev) in gateway ine gelir. burada da bir 16 bit eklenir ve adres 2001:1234:5678:abcd/64 olur.

Artık bu gateway in arkasında ki her sistemin ilk 64 biti bu şekilde olacaktır.

Diğer 64 bit ise EUI-64 methodu ,le oluşturulmaktadır. detayını daa önce açıklamıştım buradan bulabilirsiniz.

https://can.buyukburc.de/2019/01/24/ipv6-link-local-adres-nasil-olusturulur/
]]>

Ipv6 Link Local Adres nasıl oluşturulur?

Link Local adres sistemin kendi kendine oluşturduğu bir adrestir. Bu adres sistem boot olurken oluşturulur. Sadece local networkte geçerlidir ve routerlar bu paketleri yönlendirmezler.

Ipv4 teki karşılığı 169.254.0.0./16 dır. Veya APIPA olarak bilinir.

  • prefix olarak FE80::/64 tür.
  • Her IPv6 kabiliyetli arayüzde link-local-unicast adres olmak zorundadır
  • Neighbor Discovery protocol NDP tarafından komşu arayüzlerin keşfinde kullanılmaktadır.

Yapısı

Interface ID ise 48 bitlik MAC adresinin 64 bite EUI-64 (Extended Unique Identifier) tekniği ile çoğaltılması ile oluşur.

Örneğin MAC adresimiz 00 12 7F EB 6B 40. bir MAC adresi 2 bölümden oluşur. OUI ve NIC-Specific. OUI : Organizationally Unique Identifier yani arayüzü üreten firmanın kodu. Ve NIC-Specific kısmı yani üretim seri numarası gibi birşey.

Bunu OUI den sonra bölüp araya FF FE ekliyoruz.



Daha sonra ilk 8 bit içinde ki (ilk 00) 7 nci bir ters çeviriliyor (0–>1 oluyor) .

Bunu sebebi RFC2373 te bölüm 2.5.1 de açıklanmıştır. Tam anlamasamda henüz şöyle birşeyler diyor.


The motivation for inverting the “u” bit when forming the interface identifier is to make it easy for system administrators to hand configure local scope identifiers when hardware tokens are not available. This is expected to be case for serial links, tunnel end-points, etc. The alternative would have been for these to be of the form 0200:0:0:1, 0200:0:0:2, etc., instead of the much simpler ::1, ::2, etc.

Ancak bu yöntemi kullanmak zorunlu değildir. CISCO IOS, Linux ve unix ler EUI-64 yöntemini kullanırken MS Windows ikinci yarıyı random değer kullanmaktadır.

]]>

IPv6 IP tipleri

Ipv& konusu son derece derin incelenmesi gereken bir konu çeşitli ülkelerin IpV6 çalışma geliştirme komiteleri var o derece yani.

Kısaca da olsa Ip tipleri aşağıda ki gibi özetlenebilir.

Unicast addresler6 tiptir

Global Unicast : internette acik olan IP lerdir.Globallroutable Ip  
address.Her zaman 2001::/3 le baslarlar yani ilk 3 bit her zaman 001  
dir.

Nasıl oluşturulduğunu aşağıda ki yazı ile anlattım.

https://can.buyukburc.de/2019/01/24/ipv6-global-unicast-adres-yapisi/

Link-Local Unicast : nonroutable Ip lerdir. Mesela sadece Router ve PC  
arasinda veri iletisimi yapilacaksa link-local adresler kullanilir ve  
router bunlari hicbir zaman forward etmez. (ip headerinda link-local  
adres varsa)
Tekbir interface e atanirlar ve Ip grubu her zaman FE80::/10 ile  
baslar.Yani bir IP adresi FE80 ile baslarsa link local dir. IPv4 te  
karsiligi 169.254.0.0/16 grbundan IP lerdir yanibilgisayarin kendi  
kendine atadigi IPgrubundan. Nasıl oluşturulduğunu aşağıdaki yazı ile açıkladım.

https://can.buyukburc.de/2019/01/24/ipv6-link-local-adres-nasil-olusturulur/

Site Local Unicast : IPv4 teki private IP grubu ipler gibidir. FEC0: ile başlarlar ancak Unique Local Unicast adreslerle değişmişlerdir.

Unique Local Unicast : FD00::/8 veya FC00 ile baslar. IPv4 private address grubudur  
(mesela 10.0.0.0/8, 192.168..) gibi internette routing yapmakta  
kullanilamazlar. Sadece gateway içi iletişimde kullanılırlar. NAT arkası private IP ler gibi.

Loopback : ise daha çok 127.0.0.1 in karşılığıdır. Ipv6 Loopback unicast denemektedir.

Unspecified : ::/128 ise ipv4 teki 0.0.0.0 IPsinin karşılığıdır. DHCP arayan arayüzler bu IPye istek gönderirler. BU hiçbir zaman bir arayüze IP olarak verilemez.

IPv4 Compatible IP : ::123.456.789.123 şeklinde dir ama daha detaylı araştırmalıyım.

Multicast adressler

ff00::/8 grubundandir . Bir grup interface i kastederler. bir kac  
makinayamesaj gondermek icin kullanilirlar.
ff02::1 IPv4 broadcast gibidir. bir agdaki tüm interfacelere mesaj  
atmak icin kullanilirlar.
ff02::2 ise sadece agdaki tüm router lari tanimlar. Tüm routerlara  
ulasmakicin bu kullanilir.

Anycast adresler

Tek adres cok cihaz. Ancak buIpye gönderilen mesajlar o gruptaki   
sadece tek bir cihaza erisir. (multicastten farkli). Routing en yakin  
olana gönderilir. Böylece en efektif sekilde routing yapilir.

IPv6 konusunda aslında subnetting masking auto IPv6 nasıl olur gibi konularıda zamanı gelince incelemek istiyorum ancak o zaman ne zaman kim bilir.

]]>

Windows Powershell Disk Management

Bu çalışmayı Virtualbox üzerinde eklediğim 6 adet sanal disk ile yapıyorum. Öncelikle disklerimizi görelim.


PS C:\Users\Administrator> Get-PhysicalDisk
FriendlyName  SerialNumber        CanPool OperationalStatus HealthStatus Usage        Size
------------  ------------        ------- ----------------- ------------ -----        ----
VBOX HARDDISK                     True    OK                Healthy      Auto-Select  5 GB
VBOX HARDDISK                     True    OK                Healthy      Auto-Select  5 GB
VBOX HARDDISK                     True    OK                Healthy      Auto-Select  5 GB
VBOX HARDDISK                     True    OK                Healthy      Auto-Select  5 GB
VBOX HARDDISK                     True    OK                Healthy      Auto-Select  5 GB
VBOX HARDDISK                     True    OK                Healthy      Auto-Select  5 GB
VBOX HARDDISK VB8575610c-01e2797e False   OK                Healthy      Auto-Select 50 GB

Ancak son disk işletim sisteminin olduğu disk ve ilk çalışma için bana 4 adet disk yeterli.

PS C:\Users\Administrator> Get-PhysicalDisk |? CanPool|? HealthStatus| select -first 4
FriendlyName  SerialNumber CanPool OperationalStatus HealthStatus Usage       Size
------------  ------------ ------- ----------------- ------------ -----       ----
VBOX HARDDISK              True    OK                Healthy      Auto-Select 5 GB
VBOX HARDDISK              True    OK                Healthy      Auto-Select 5 GB
VBOX HARDDISK              True    OK                Healthy      Auto-Select 5 GB
VBOX HARDDISK              True    OK                Healthy      Auto-Select 5 GB

Ayrıca sadece belirli diskleri seçmek istersek

PS C:\Users\Administrator> Get-PhysicalDisk|? Canpool|ft UniqueId
UniqueId
--------
{78f3d471-15cb-11e9-9df3-806e6f6e6963}
{78f3d472-15cb-11e9-9df3-806e6f6e6963}
{78f3d473-15cb-11e9-9df3-806e6f6e6963}
{78f3d474-15cb-11e9-9df3-806e6f6e6963}
{78f3d475-15cb-11e9-9df3-806e6f6e6963}
{78f3d476-15cb-11e9-9df3-806e6f6e6963}
PS C:\Users\Administrator> Get-PhysicalDisk|? Canpool|? {"{78f3d471-15cb-11e9-9df3-806e6f6e6963};{78f3d472-15cb-11e9-9df
3-806e6f6e6963}".Contains($_.UniqueId)}
FriendlyName  SerialNumber CanPool OperationalStatus HealthStatus Usage       Size
------------  ------------ ------- ----------------- ------------ -----       ----
VBOX HARDDISK              True    OK                Healthy      Auto-Select 5 GB
VBOX HARDDISK              True    OK                Healthy      Auto-Select 5 GB

Artık disklerimizi seçip kuruluma geçebiliriz.


PS C:\Users\Administrator> New-StoragePool -FriendlyName "CanPooledDisks" -StorageSubSystemFriendlyName "Windows*" -Phys
icalDisks $Stordisks |New-VirtualDisk -FriendlyName "CanPooledDisks" -Size 20GB -ProvisioningType Thin|Initialize-Disk -
PassThru |New-Partition -AssignDriveLetter -UseMaximumSize|Format-Volume
DriveLetter FileSystemLabel FileSystem DriveType HealthStatus OperationalStatus SizeRemaining     Size
----------- --------------- ---------- --------- ------------ ----------------- -------------     ----
F                           NTFS       Fixed     Healthy      OK                     19.81 GB 19.87 GB

Burada dikkat edilmesi gereken bir konu StorageSubSystemFriendlyName çünkü her ismi kabul etmiyor.

Get-StorageSubSystem|fl komutu ile FriendlyName i öğrenebiliriz. böylece CanPooledDisks adında disk poolu oluşturmuşl ve onu otomatik olarak sisteme bağlayıp format atmış olduk. Ancak burada her hangi bir RAID vs yok.

Server Manager Görüntüsü bu şekilde olacaktır. Pool a eklenmeyen 2 adet disk Primordial olarak görünüyor. Raw Diskler ve işlem yapımamış Sisteme fiziksel olarak bağlanmış bekliyorlar.

]]>

Windows Disk Terminology

Simple – Tek disk

Spanned – Art arda eklenmiş diskler alan ihtiyacı olduğunda disk eklenerek genişletilebiliyor ancak bir disk arızasında herşey gidiyor.

Stripe – Default 64kB chunkların çeşitli disklere yazılması write ve read performansı iyi ancak disk arızasında herşey giditor. (Raid-0)

Mirror – RAID-1

RAID-5 – parity mevcut ve striping ile yapılıyor.
Parity dağınık yani ayrı bir diske yazılmıyor. Mevcut diskler kullanılıyor.

RAID-6 – Çift Parity. Parity dağınık yani ayrı bir diske yazılmıyor. Mevcut diskler kullanılıyor.

RAID-10 – Veri önce mirrorlanıyor ve sonra her bir mirror grubu içinde stripelanıyor.

RAID – 50 -önce mirror ve her bir mirror grubu içinde parity ile striping.

]]>

Windows Powershell Add Roles and Features

Sistemi yeni kurdum ve serverımda ihtiyacım olan yapılar.

DNS, Web-server, AD DS ve Hyper-V işte bunların kurulumları için gerekli olan komutlar.

Install-WindowsFeature -Name AD-Domain-Services,Hyper-V,DNS,Web-Server -IncludeManagementTools -IncludeAllSubFeatures -Restart  

Tek tek de verebilirim ancak restart komutu her seferinde gerekliyse restart ettiğinden çok uzun sürer.

]]>