Jump to content

kavag

Administrators
  • Posts

    222
  • Joined

  • Last visited

  • Days Won

    49

Blog Entries posted by kavag

  1. kavag
    What an exciting day October 1st was!
    I received an email saying:
    I’ m very proud and honored for this award as it shows that my work and effort have been recognized and this fact gives me the strength and the inspiration to continue my contribution to the IT Pros community.

    I would like to thank all community members, autoexec.gr and friends, many of whom are or were fellow MVPs, for their help, support and guidance throughout this last year.
    Last but not least I would like to thank my friends working at Microsoft Hellas for continuously supporting the community and for the confidence they showed me, ‘’pushing’’ me forward.
    I look forward to continuing my contribution to the IT Pros community with the same passion for the years to come.
    The post Microsoft Hyper-V MVP Award 2014 (EN) appeared first on Vaggelis Kappas.


  2. kavag
    What an exciting day October 1st was!
    I received an email saying:http://vkappas.cloudapp.net/wp-content/uploads/2014/10/MVP01.png
    I’ m very proud and honored for this award as it shows that my work and effort have been recognized and this fact gives me the strength and the inspiration to continue my contribution to the IT Pros community.

    I would like to thank all community members, autoexec.gr and friends, many of whom are or were fellow MVPs, for their help, support and guidance throughout this last year.
    Last but not least I would like to thank my friends working at Microsoft Hellas for continuously supporting the community and for the confidence they showed me, ‘’pushing’’ me forward.
    I look forward to continuing my contribution to the IT Pros community with the same passion for the years to come.
    The post Microsoft Hyper-V MVP Award 2014 (EN) appeared first on Vaggelis Kappas.
  3. kavag
    Πρόσφατα προστέθηκε η δυνατότητα του Multi Factor Authentication (MFA) για όλους τους χρήστες του Office 365. Για τους χρήστες με δικαιώματα διαχειριστή της συνδρομής στο Office 365, η δυνατότητα αυτή του MFA ήταν διαθέσιμη και σχεδόν υποχρεωτική από τον Ιούνιο του 2013.
    Τι είναι όμως η δυνατότητα του Multi Factor Authentication και γιατί τον όρο MFA τον ακούμε όλο και συχνότερα στις μέρες μας;
    Multi Factor Authentication ή Two Factor Authentication είναι η ταυτοποίηση εκείνη στην οποία χρησιμοποιούνται τουλάχιστον δύο από τους τρεις παράγοντες ταυτοποίησης. Οι τρεις αυτοί παράγοντες ταυτοποίησης είναι οι εξής :
    Γνώση. Κάτι που γνωρίζουμε, όπως το password το pin κ.α.
    Κατοχή. Κάτι που έχουμε, όπως smart card, συσκευή one time password, κινητό τηλέφωνο.
    Προσδιορισμός. Κάτι που μας προσδιορίζει, όπως τα βιομετρικά χαρακτηριστικά μας π.χ. δακτυλικό αποτύπωμα κ.α.

    Όπως φαίνεται λοιπόν η δυνατότητα του Multi Factor Authentication, επεκτείνει και ενισχύει της ασφάλεια της πρόσβασης στην πληροφορία πέρα από τον κωδικό χρήστη.
    Έτσι για να συνδεθεί ο χρήστης στις υπηρεσίες του Office 365, εκτός του κωδικού του θα πρέπει να χρησιμοποιήσει ένα pin που θα λάβει μέσω SMS ή να απαντήσει σε ένα αυτοματοποιημένο τηλεφώνημα ή να χρησιμοποιήσει την εξειδικευμένη εφαρμογή του τηλεφώνου του για την έκδοση και την χρήση του απαραίτητου pin.
    Η σύνδεση στις υπηρεσίες του Office 365 μπορεί να ταυτοποιηθεί μέσω Multi Factor Authentication τόσο όταν αυτή γίνεται μέσω ενός Web Browser όσο και όταν γίνεται από τις εφαρμογές του Microsoft Office. Στην περίπτωση αυτή όμως θα πρέπει ο χρήστης να έχει εκδώσει τα λεγόμενα App Passwords εκ των προτέρων. Αυτό όμως είναι κάτι που θα αλλάξει στο μέλλον όταν θα αναβαθμιστούν οι εφαρμογές του Office και θα συμπεριλαμβάνουν εγγενώς την δυνατότητα του MFA.
    Τα προγράμματα του Office 365 για τα οποία είναι διαθέσιμη η δυνατότητα του Multi Factor Authentication και μάλιστα δωρεάν, είναι τα εξής :
    Office 365 για μεσαίες επιχειρήσεις
    Όλα τα προγράμματα του για μεγάλες επιχειρήσεις
    Τα μεμονωμένα προγράμματα Exchange Online και SharePoint Online
    Τα προγράμματα των εκπαιδευτικών ιδρυμάτων (academic)
    Τα προγράμματα των μη κερδοσκοπικών οργανισμών

    Τέλος η δυνατότητα του MFA μπορεί να ενεργοποιηθεί ακόμη και για τους χρήστες που έχουν προκύψει μέσω συγχρονισμού (federation) από το Windows Active Directory της εταιρείας.
    Ας δούμε όμως πως γίνεται η ενεργοποίηση του Multi Factor Authentication και τι τελικά αλλάζει σε αυτό που βλέπει ο χρήστης.
    H ενεργοποίηση γίνεται εύκολα, επιλέγοντας Set up στο τμήμα Set Multi-factor authentication requirements.
    Από την καθολική λίστα με τους Users, επιλέγουμε εκείνους για τους οποίους θέλουμε να κάνουμε την ενεργοποίηση
    Αυτό το κάνει ο διαχειριστής πατώντας πάνω στο Enable. Το σύστημα ενημερώνει για τις δυνατότητες ρυθμίσεων που έχει ο κάθε χρήστης και ολοκληρώνει την ενεργοποίηση.Την επόμενη φορά που θα συνδεθεί στο Portal ο χρήστης θα πληροφορηθεί για την αλλαγή και θα οδηγηθεί να συμπληρώσει τα απαιτούμενα στοιχεία
    Σαν επιπλέον στοιχείο για την ταυτοποίηση, μπορούμε να χρησιμοποιήσουμε κάτι από τα παρακάτω :
    Κλήση σε κινητό τηλέφωνο. Ο χρήστης λαμβάνει μία κλήση στο κινητό του που τον καλεί να πατήσει το πλήκτρο με την δίεση. Το πατάει και η ταυτοποίηση ολοκληρώνεται
    Κλήση σε σταθερό τηλέφωνο. Είναι ακριβώς η ίδια διαδικασία, όπως και παραπάνω, μόνο που χρησιμοποιείται ένα σταθερό τηλέφωνο εάν ο χρήστης δεν έχει μαζί του το κινητό
    Λήψη κωδικού μέσω SMS. Ο χρήστης λαμβάνει έναν εξαψήφιο κωδικό μέσω SMS που πρέπει να εισάγει στο portal για να ολοκληρωθεί η ταυτοποίηση
    Επιβεβαίωση μέσω εφαρμογής κινητού (MFA App). Ο χρήστης κατεβάζει την ειδική εφαρμογή για το κινητό του, κάνει τις απαραίτητες ρυθμίσεις για την σύνδεση της με την υπηρεσία και μετά κάθε φορά που θέλει να συνδεθεί στο Office 365, το MFA App αυτόματα του ζητάει επιβεβαίωση. Εφαρμογές MFA Apps υπάρχουν για Windows Phone, iPhone και Android.
    Λήψη κωδικού μέσω εφαρμογής κινητού (MFA App). Χρησιμοποιείται η ίδια εφαρμογή, όπως και προηγουμένως, μόνο που η επιβεβαίωση γίνεται μέσω εξαψήφιου κωδικού που λαμβάνει ο χρήστης στο MFA App που μετά πρέπει να βάλει στο portal για να συνδεθεί.

    Εάν επιλέξουμε την επιβεβαίωση μέσω της εφαρμογής του κινητού μας (MFA App), όταν προσπαθήσουμε να συνδεθούμε στο portal του Office 365 το MFA App θα μας ζητήσει επιβεβαίωση

    Πέραν των αρχικών ρυθμίσεων σχετικά, με τον επιπλέον παράγοντα ταυτοποίησης που θα
    χρησιμοποιήσουμε για να συνδεθούμε στις υπηρεσίες του Office 365, μπορούμε να αλλάξουμε επιλογή είτε κατά την διάρκεια της σύνδεσης μας στο PortalΕίτε μέσω του τμήματος των επιπλέον ρυθμίσεων ασφαλείας του προφιλ μας στο Office 365Κωδικοί εφαρμογών (App Passwords) στο Multi-Factor Authentication
    Μέχρι τώρα έχουμε αναπτύξει τις δυνατότητες που έχουμε για Multi-Factor Authentication, στην περίπτωση που θέλουμε να συνδεθούμε στις υπηρεσίες του Office 365 μέσω του Web Browser στο Portal.
    Όταν θέλουμε να χρησιμοποιήσουμε Desktop εφαρμογές όπως το Microsoft Outlook, το Lync, το Word κ.α. για να συνδεθούμε στο Office 365, τότε θα πρέπει να εκδώσουμε τα λεγόμενα App Passwords.
    Τα App Passwords είναι τυχαίοι κωδικοί 16 χαρακτήρων που αφού εκδοθούν, μπορούν να χρησιμοποιηθούν μέσα από τις εφαρμογές που αναφέραμε και να πετύχουμε έτσι το Multi Factor Authentication
    Αφού γίνει η έκδοση του κωδικού αυτός εμφανίζεται στην σχετική λίστα και μπορούμε, εάν θέλουμε, να τον διαγράψουμε.
    Η δυνατότητα της έκδοσης App Passwords δεν είναι διαθέσιμη μέσω PowerShell CmdLets ενώ μπορούμε, εάν το επιβάλουν ειδικοί κανόνες ασφάλειας, να την απενεργοποιήσουμε εντελώς από την συνδρομή μας.
    The post Multi Factor Authentication δυνατότητες στο Office 365 appeared first on Vaggelis Kappas.
     
    Source
  4. kavag
    A client of mine has asked me if it would be possible to run pfSense as a Microsoft Azure IaaS Virtual Machine. pfSense® software is a free, open source customized distribution of FreeBSD, specifically tailored for use as a firewall and router that is entirely managed via web interface.
    At that time, I had in mind that running FreeBSD 10 under Hyper-V and in Microsoft Azure, is something that can be done. So, I decided to build a deployment as a Proof of Concept and to write a blog post about this deployment.

    This post will provide instructions and all the necessary steps to prepare, upload and run pfSense-2.2.3 in Microsoft Azure.
    Please note, that FreeBSD is not currently an endorsed distribution in Microsoft Azure and therefore is not supported.
    Resources
    Latest Stable Version of pfSense Running FreeBSD in Azure User Defined Routes and other Azure Virtual Network enhancements that announced at Microsoft Ignite 2015 Design
    Let’s put, what we want to achieve, into context. The deployment’s design is as follows:
     
    Procedure
    In order to prepare a pfSense image for Microsoft Azure, we should download the latest x64 image and install it locally, on a server with Windows Server 2012 R2, as a Hyper-V Virtual Machine:
    Download the latest x64 pfSense image from Latest Stable Version of pfSense (As of July 2015 the latest version is 2.2.3) Decompress the image file to extract the Installation ISO pfSense-LiveCD-2.2.3-RELEASE-amd64-20150623-1637.iso Attach the ISO file as a DVD Drive to newly created Hyper-V Virtual Machine
    Start the installation of pfSense
    After successful installation of pfSense, enable SSH
    Install Python 2.7 and required modules [2.2.3-RELEASE][[email protected]]/: pkg install python27 py27-asn1 Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking integrity... done (0 conflicting) The following 3 package(s) will be affected (of 0 checked): New packages to be INSTALLED: python27: 2.7.10 py27-asn1: 0.1.7,1 py27-setuptools27: 17.0 The process will require 67 MiB more space. Proceed with this action? [y/N]: y [1/3] Installing python27-2.7.10... [1/3] Extracting python27-2.7.10: 100% [2/3] Installing py27-setuptools27-17.0... [2/3] Extracting py27-setuptools27-17.0: 100% [3/3] Installing py27-asn1-0.1.7,1... [3/3] Extracting py27-asn1-0.1.7,1: 100% Message for python27-2.7.10: ===================================================================== Note that some standard Python modules are provided as separate ports as they require additional dependencies. They are available as: bsddb databases/py-bsddb gdbm databases/py-gdbm sqlite3 databases/py-sqlite3 tkinter x11-toolkits/py-tkinter ===================================================================== [2.2.3-RELEASE][[email protected]]/: You should symlink the new python 2.7 binary
    [2.2.3-RELEASE][[email protected]]/: ln -s /usr/local/bin/python2.7 /usr/bin/python  Install sudo Typically on Azure, root account is disabled and we using uprovileged user to login. An unprivileged user should utilize sudo to run commands with elevated privileges.
    [2.2.3-RELEASE][[email protected]]/: pkg install sudo Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: sudo: 1.8.14 The process will require 3 MiB more space. 796 KiB to be downloaded. Proceed with this action? [y/N]: y Fetching sudo-1.8.14.txz: 100% 796 KiB 815.0kB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Installing sudo-1.8.14... [1/1] Extracting sudo-1.8.14: 100% [2.2.3-RELEASE][[email protected]]/:  Install the Azure Linux Agent GitHub is the repository where you can find the latest version of Azure Linux Agent
    https://github.com/Azure/WALinuxAgent
    Version 2.0.10 or later is required for FreeBSD. Branch 2.0 is typically very stable and as of July 2015 the latest version is 2.0.14.
    [2.2.3-RELEASE][[email protected]]/: wget https://raw.githubusercontent.com/Azure/WALinuxAgent/2.0/waagent --2015-07-23 13:25:16-- https://raw.githubusercontent.com/Azure/WALinuxAgent/2.0/waagent Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.31.17.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.31.17.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 245087 (239K) [text/plain] Saving to: 'waagent' waagent 100%[======================================================>] 239.34K 624KB/s in 0.4s 2015-07-23 13:25:17 (624 KB/s) - 'waagent' saved [245087/245087] [2.2.3-RELEASE][[email protected]]/: mv ./waagent /usr/sbin/ [2.2.3-RELEASE][[email protected]]/: chmod 755 /usr/sbin/waagent [2.2.3-RELEASE][[email protected]]/: /usr/sbin/wa [2.2.3-RELEASE][[email protected]]/: /usr/sbin/waagent -install [2.2.3-RELEASE][[email protected]]/:
    Set IP Addresses Configure WAN (hn0) Interface as DHCP client.
    Assign Static IP Address, 172.16.2.10, to LAN (hn1) Interface

     Shutdown The pfSense Virtual Machine Now the pfSense Virtual Machine is ready for running in Microsoft Azure.
    Upload the pfSense-2.3.3 VHD to Azure
    Using the following PowerShell commands, first we upload the pfSense VHD to Microsoft Azure Storage Account and then we create a custom image:
    # Variables Section $DestFile = "https://pfsa.blob.core.windows.net/vhds/pfSense-2.2.3-amd64.vhd" $SourceFile = "C:\Hyper-V\pfSense\Virtual Hard Disks\pfSense-2-2-3.vhd" # VHD Upload Add-AzureVhd -Destination $DestFile -LocalFilePath $SourceFile # Create an Image Add-AzureVMImage -ImageName "pfSense-2.2.3" -MediaLocation $DestFile -OS Linux Note that we are using OS type Linux instead of FreeBSD as it is not currently supported.
    Create a Multi-NIC Virtual Machine
    The custom image that we created previously, can be used in order to create a pfSense Virtual Machine with two Virtual Network Interfaces (vNIC), in Microsoft Azure. More details about creating a Virtual Machine with Multiple vNICs in Microsoft Azure, you can find in a previous post here:
    Create a Virtual Machine with Multiple NICs in Azure IaaS
    A pfSense Virtual Machine with two vNICs will be created by running the following PowerShell commands:
    $location = "West Europe" $serviceName = "pfsvc" $vnet = "pf-VNET" $subscriptionName = 'My MSDN Subscription' $storageAccount = 'pfsa' $adminUser = "adminuser" $pwd = "*********" $imageName = "pfSense-2.2.3" $MultiVM = New-AzureVMConfig -ImageName $ImageName ` -Name "pfSense-FW01" -InstanceSize ExtraLarge | Add-AzureProvisioningConfig -Linux -LinuxUser $adminUser ` -Password $pwd | Set-AzureSubnet -SubnetNames "Front-End" | Set-AzureStaticVNetIP -IPAddress "172.16.1.10" | Add-AzureNetworkInterfaceConfig -Name "LAN NIC" ` -SubnetName "LAN-Subnet" -StaticVNetIPAddress 172.16.2.10 New-AzureVM -ServiceName $serviceName ` -Location $location ` -VNetName $vnet ` -VMs $MultiVM
    Setup User Defined Routes
    With user defined routes, we have complete control over the traffic flow in our virtual network. Virtual network by default provides system routes for traffic flow between virtual machines. Now, we can customize the routing table by defining routes and that is allowing us to direct traffic through pfSense Virtual Machine that we have just created. Routes can be defined inside a routing table and applied to subnets. Every VM within a subnet automatically inherits the routes from the routing table.
    The following PowerShell commands, allowing us to:
    Create the routing tables Create routes in the routing tables Apply routing tables to subnets Enable IP Forwarding on pfSense’s vNICs # # Variables Section # $Location="West Europe" $VNetName="pf-VNET" $FrontendName="FE-Subnet" $LANName="LAN-Subnet" $ServiceName = "pfsvc" $VM = Get-AzureVM -Name "pfSense-FW01" -ServiceName $serviceName # Set the route table of the Frontend network: # $FrontRT = New-AzureRouteTable -Name $FrontendName ` -Location $Location -Label "FE-RT" Set-AzureRoute -RouteTable $FrontRT -RouteName "DMZ-Route" ` -AddressPrefix "172.16.2.0/24" -NextHopType "VirtualAppliance" ` -NextHopIpAddress "172.16.1.10" Set-AzureSubnetRouteTable -VirtualNetworkName $VNetName ` -SubnetName $FrontendName -RouteTableName $FrontendName # Set the route table of the LAN network: # $LANRT = New-AzureRouteTable -Name $LANName ` -Location $Location -Label "LAN-RT" Set-AzureRoute -RouteTable $LANRT -RouteName "FE-Route" ` -AddressPrefix 172.16.1.0/24 -NextHopType VirtualAppliance ` -NextHopIpAddress 172.16.2.10 Set-AzureRoute -RouteTable $LANRT -RouteName default -AddressPrefix 0.0.0.0/0 ` -NextHopType VirtualAppliance -NextHopIpAddress 172.16.2.10 Set-AzureSubnetRouteTable -VirtualNetworkName $VNetName -SubnetName $LANName ` -RouteTableName $LANName # Enable IP Forwarding on the main NIC and secondary NICs: # Set-AzureIPForwarding -ServiceName $ServiceName -VM $VM -Enable Set-AzureIPForwarding -ServiceName $ServiceName -VM $VM ` -NetworkInterfaceName "LAN NIC" -Enable The pfSense Virtual Machines must be able to receive incoming traffic that is not addressed to itself and this is the reason to enable IP forwarding. The post Running pfSense as an Azure IaaS Virtual Machine appeared first on Vaggelis Kappas.


  5. kavag
    A client of mine has asked me if it would be possible to run pfSense as a Microsoft Azure IaaS Virtual Machine. pfSense® software is a free, open source customized distribution of FreeBSD, specifically tailored for use as a firewall and router that is entirely managed via web interface.
     
    At that time, I had in mind that running FreeBSD 10 under Hyper-V and in Microsoft Azure, is something that can be done. So, I decided to build a deployment as a Proof of Concept and to write a blog post about this deployment.
     
    This post will provide instructions and all the necessary steps to prepare, upload and run pfSense-2.2.3 in Microsoft Azure.
     
    Read More
  6. kavag
    A client of mine has asked me if it would be possible to run pfSense as a Microsoft Azure IaaS Virtual Machine. pfSense® software is a free, open source customized distribution of FreeBSD, specifically tailored for use as a firewall and router that is entirely managed via web interface.
    At that time, I had in mind that running FreeBSD 10 under Hyper-V and in Microsoft Azure, is something that can be done. So, I decided to build a deployment as a Proof of Concept and to write a blog post about this deployment.

    This post will provide instructions and all the necessary steps to prepare, upload and run pfSense-2.2.3 in Microsoft Azure.
    Please note, that FreeBSD is not currently an endorsed distribution in Microsoft Azure and therefore is not supported.
    Resources
    Latest Stable Version of pfSense Running FreeBSD in Azure User Defined Routes and other Azure Virtual Network enhancements that announced at Microsoft Ignite 2015 Design
    Let’s put, what we want to achieve, into context. The deployment’s design is as follows:
     http://vaggeliskappas.com/wp-content/uploads/2015/07/pfSense01.png
    Procedure
    In order to prepare a pfSense image for Microsoft Azure, we should download the latest x64 image and install it locally, on a server with Windows Server 2012 R2, as a Hyper-V Virtual Machine:
    Download the latest x64 pfSense image from Latest Stable Version of pfSense (As of July 2015 the latest version is 2.2.3) Decompress the image file to extract the Installation ISO pfSense-LiveCD-2.2.3-RELEASE-amd64-20150623-1637.iso Attach the ISO file as a DVD Drive to newly created Hyper-V Virtual Machine http://vaggeliskappas.com/wp-content/uploads/2015/07/pfSense02.png
    Start the installation of pfSense http://vaggeliskappas.com/wp-content/uploads/2015/07/pfSense03.png
    After successful installation of pfSense, enable SSH http://vaggeliskappas.com/wp-content/uploads/2015/07/pfSense04.png
    Install Python 2.7 and required modules [2.2.3-RELEASE][[email protected]]/: pkg install python27 py27-asn1 Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking integrity... done (0 conflicting) The following 3 package(s) will be affected (of 0 checked): New packages to be INSTALLED: python27: 2.7.10 py27-asn1: 0.1.7,1 py27-setuptools27: 17.0 The process will require 67 MiB more space. Proceed with this action? [y/N]: y [1/3] Installing python27-2.7.10... [1/3] Extracting python27-2.7.10: 100% [2/3] Installing py27-setuptools27-17.0... [2/3] Extracting py27-setuptools27-17.0: 100% [3/3] Installing py27-asn1-0.1.7,1... [3/3] Extracting py27-asn1-0.1.7,1: 100% Message for python27-2.7.10: ===================================================================== Note that some standard Python modules are provided as separate ports as they require additional dependencies. They are available as: bsddb databases/py-bsddb gdbm databases/py-gdbm sqlite3 databases/py-sqlite3 tkinter x11-toolkits/py-tkinter ===================================================================== [2.2.3-RELEASE][[email protected]]/: You should symlink the new python 2.7 binary
    [2.2.3-RELEASE][[email protected]]/: ln -s /usr/local/bin/python2.7 /usr/bin/python  Install sudo Typically on Azure, root account is disabled and we using uprovileged user to login. An unprivileged user should utilize sudo to run commands with elevated privileges.
    [2.2.3-RELEASE][[email protected]]/: pkg install sudo Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: sudo: 1.8.14 The process will require 3 MiB more space. 796 KiB to be downloaded. Proceed with this action? [y/N]: y Fetching sudo-1.8.14.txz: 100% 796 KiB 815.0kB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Installing sudo-1.8.14... [1/1] Extracting sudo-1.8.14: 100% [2.2.3-RELEASE][[email protected]]/:  Install the Azure Linux Agent GitHub is the repository where you can find the latest version of Azure Linux Agent
    https://github.com/Azure/WALinuxAgent
    Version 2.0.10 or later is required for FreeBSD. Branch 2.0 is typically very stable and as of July 2015 the latest version is 2.0.14.
    [2.2.3-RELEASE][[email protected]]/: wget https://raw.githubusercontent.com/Azure/WALinuxAgent/2.0/waagent --2015-07-23 13:25:16-- https://raw.githubusercontent.com/Azure/WALinuxAgent/2.0/waagent Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.31.17.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.31.17.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 245087 (239K) [text/plain] Saving to: 'waagent' waagent 100%[======================================================>] 239.34K 624KB/s in 0.4s 2015-07-23 13:25:17 (624 KB/s) - 'waagent' saved [245087/245087] [2.2.3-RELEASE][[email protected]]/: mv ./waagent /usr/sbin/ [2.2.3-RELEASE][[email protected]]/: chmod 755 /usr/sbin/waagent [2.2.3-RELEASE][[email protected]]/: /usr/sbin/wa [2.2.3-RELEASE][[email protected]]/: /usr/sbin/waagent -install [2.2.3-RELEASE][[email protected]]/:
    Set IP Addresses Configure WAN (hn0) Interface as DHCP client.
    Assign Static IP Address, 172.16.2.10, to LAN (hn1) Interface
    http://vaggeliskappas.com/wp-content/uploads/2015/07/pfSense05.png
     Shutdown The pfSense Virtual Machine Now the pfSense Virtual Machine is ready for running in Microsoft Azure.
    Upload the pfSense-2.3.3 VHD to Azure
    Using the following PowerShell commands, first we upload the pfSense VHD to Microsoft Azure Storage Account and then we create a custom image:
    # Variables Section $DestFile = "https://pfsa.blob.core.windows.net/vhds/pfSense-2.2.3-amd64.vhd" $SourceFile = "C:\Hyper-V\pfSense\Virtual Hard Disks\pfSense-2-2-3.vhd" # VHD Upload Add-AzureVhd -Destination $DestFile -LocalFilePath $SourceFile # Create an Image Add-AzureVMImage -ImageName "pfSense-2.2.3" -MediaLocation $DestFile -OS Linux Note that we are using OS type Linux instead of FreeBSD as it is not currently supported.
    Create a Multi-NIC Virtual Machine
    The custom image that we created previously, can be used in order to create a pfSense Virtual Machine with two Virtual Network Interfaces (vNIC), in Microsoft Azure. More details about creating a Virtual Machine with Multiple vNICs in Microsoft Azure, you can find in a previous post here:
    Create a Virtual Machine with Multiple NICs in Azure IaaS
    A pfSense Virtual Machine with two vNICs will be created by running the following PowerShell commands:
    $location = "West Europe" $serviceName = "pfsvc" $vnet = "pf-VNET" $subscriptionName = 'My MSDN Subscription' $storageAccount = 'pfsa' $adminUser = "adminuser" $pwd = "*********" $imageName = "pfSense-2.2.3" $MultiVM = New-AzureVMConfig -ImageName $ImageName ` -Name "pfSense-FW01" -InstanceSize ExtraLarge | Add-AzureProvisioningConfig -Linux -LinuxUser $adminUser ` -Password $pwd | Set-AzureSubnet -SubnetNames "Front-End" | Set-AzureStaticVNetIP -IPAddress "172.16.1.10" | Add-AzureNetworkInterfaceConfig -Name "LAN NIC" ` -SubnetName "LAN-Subnet" -StaticVNetIPAddress 172.16.2.10 New-AzureVM -ServiceName $serviceName ` -Location $location ` -VNetName $vnet ` -VMs $MultiVM
    Setup User Defined Routes
    With user defined routes, we have complete control over the traffic flow in our virtual network. Virtual network by default provides system routes for traffic flow between virtual machines. Now, we can customize the routing table by defining routes and that is allowing us to direct traffic through pfSense Virtual Machine that we have just created. Routes can be defined inside a routing table and applied to subnets. Every VM within a subnet automatically inherits the routes from the routing table.
    The following PowerShell commands, allowing us to:
    Create the routing tables Create routes in the routing tables Apply routing tables to subnets Enable IP Forwarding on pfSense’s vNICs # # Variables Section # $Location="West Europe" $VNetName="pf-VNET" $FrontendName="FE-Subnet" $LANName="LAN-Subnet" $ServiceName = "pfsvc" $VM = Get-AzureVM -Name "pfSense-FW01" -ServiceName $serviceName # Set the route table of the Frontend network: # $FrontRT = New-AzureRouteTable -Name $FrontendName ` -Location $Location -Label "FE-RT" Set-AzureRoute -RouteTable $FrontRT -RouteName "DMZ-Route" ` -AddressPrefix "172.16.2.0/24" -NextHopType "VirtualAppliance" ` -NextHopIpAddress "172.16.1.10" Set-AzureSubnetRouteTable -VirtualNetworkName $VNetName ` -SubnetName $FrontendName -RouteTableName $FrontendName # Set the route table of the LAN network: # $LANRT = New-AzureRouteTable -Name $LANName ` -Location $Location -Label "LAN-RT" Set-AzureRoute -RouteTable $LANRT -RouteName "FE-Route" ` -AddressPrefix 172.16.1.0/24 -NextHopType VirtualAppliance ` -NextHopIpAddress 172.16.2.10 Set-AzureRoute -RouteTable $LANRT -RouteName default -AddressPrefix 0.0.0.0/0 ` -NextHopType VirtualAppliance -NextHopIpAddress 172.16.2.10 Set-AzureSubnetRouteTable -VirtualNetworkName $VNetName -SubnetName $LANName ` -RouteTableName $LANName # Enable IP Forwarding on the main NIC and secondary NICs: # Set-AzureIPForwarding -ServiceName $ServiceName -VM $VM -Enable Set-AzureIPForwarding -ServiceName $ServiceName -VM $VM ` -NetworkInterfaceName "LAN NIC" -Enable The pfSense Virtual Machines must be able to receive incoming traffic that is not addressed to itself and this is the reason to enable IP forwarding. The post Running pfSense as an Azure IaaS Virtual Machine appeared first on Vaggelis Kappas.
  7. kavag
    The way that Network Virtualization is implemented in Hyper-V and subsequently in Microsoft Azure IaaS, enables explicitly the Routing between Virtual Subnets. This is the reason why the traffic between Virtual Subnets, that are part of the same Virtual Network, is unrestricted unless we have applied Network Security Groups.
     
    Network Security Groups Is a way to control traffic between Virtual Subnets of an Azure Virtual Network as well as the Internet. Moreover, Network Security Groups provide segmentation within Azure Virtual Network, by applying rules according to our needs and design.
     
    Until Network Security Groups became Generally Available, the only way to control traffic was endpoint based Access Control Lists. By applying ACLs to a Virtual Machine’s public endpoint, we have a way to control the ingress traffic to this port of this particular Virtual Machine. Network Security Groups takes this capability a step ahead and enables us to control all inbound as well as outbound traffic of a Virtual Machine or a Virtual Subnet.
    How does a Network Security Group (NSG) work ?
     
    A Network Security Group has a name and a descriptive label and is associated to an Azure Region. It contains Inbound and Outbound traffic rules and can be applied to a Virtual Machine, a Virtual Subnet or both.
     

    Read More ....
  8. kavag
    The way that Network Virtualization is implemented in Hyper-V and subsequently in Microsoft Azure IaaS, enables explicitly the Routing between Virtual Subnets. This is the reason why the traffic between Virtual Subnets, that are part of the same Virtual Network, is unrestricted unless we have applied Network Security Groups.
    Network Security Groups Is a way to control traffic between Virtual Subnets of an Azure Virtual Network as well as the Internet. Moreover, Network Security Groups provide segmentation within Azure Virtual Network, by applying rules according to our needs and design.

    Until Network Security Groups became Generally Available, the only way to control traffic was endpoint based Access Control Lists. By applying ACLs to a Virtual Machine’s public endpoint, we have a way to control the ingress traffic to this port of this particular Virtual Machine. Network Security Groups takes this capability a step ahead and enables us to control all inbound as well as outbound traffic of a Virtual Machine or a Virtual Subnet.
    How does a Network Security Group (NSG) work ?
    A Network Security Group has a name and a descriptive label and is associated to an Azure Region. It contains Inbound and Outbound traffic rules and can be applied to a Virtual Machine, a Virtual Subnet or both.
    http://vaggeliskappas.com/wp-content/uploads/2015/06/NSG-01-300x265.png
    Associating an NSG to a VM – When an NSG is directly associated to a VM, the Network access rules in the NSG are directly applied to all traffic that is destined to the VM.
    Associating an NSG to a Subnet – When an NSG is associated to a subnet, the Network access rules in the NSG are applied to all the VMs in the subnet.
    Associating an NSG to a Subnet and a VM – It is possible that you can associate an NSG to a VM and a different NSG to the subnet where the VM resides. This is supported and in this case the VM gets two layers of protection. On the Inbound traffic the packet goes through the access rules specified in the subnet followed by rules in the VM and in the Outbound case it goes through the rules specified in the VM first before going through the rules specified in the subnet.
    Priorities and Default Rules
    As we mentioned above, an NSG contains Inbound and Outbound traffic Rules that we create according to our needs. These Rules are processed in the order of priority. Rules with lower priority number are processed before those with higher priority number and so on. Default rules are also there for a Network Security Group. These rules cannot be deleted but they have the lowest priority and, normally, they will be overridden.
    Azure Virtual Network
    Let’s assume that we want to deploy a three-tier application in Microsoft Azure IaaS offering. In this case, we create a Virtual Network as illustrated in the following figure:
    http://vaggeliskappas.com/wp-content/uploads/2015/06/NSG-02-1024x800.png
    http://vaggeliskappas.com/wp-content/uploads/2015/06/NSG-04-e1433178124170.png
    By default, Virtual Machines that are deployed to the Virtual Subnets (Front, App, DB) can communicate to each other and can have access to the Internet. This default behavior in some cases is not enough and Security and Access Control needs to be applied. By using Network Security Groups, the Virtual Network’s security is strengthened and Access Control Rules to inbound and outbound traffic are enforced.
    Create and use Network Security Groups – Step-By-Step
    As a demonstration, we are going to use the Virtual Network that we’ve created in the previous example. Let’s assume that we want to implement a more restrictive scenario, like the one shown in the following figure:
    http://vaggeliskappas.com/wp-content/uploads/2015/06/NSG-03-1024x740.pngIn order to achieve the designed security and access control we should create traffic rules, that they can be summarized in the following table:

      Front End
    Subnet Application
    Subnet Database
    Subnet Internet Front End
    Subnet - Allow - TCP/80 Deny - All Allow - All Application
    Subnet Allow - TCP/80 - Allow - TCP/1433 Allow - TCP/3389 Database
    Subnet Deny - All Allow - TCP/1433 - Allow - TCP/3389 Internet Allow - All Allow - TCP/3389 Allow - TCP/3389 - Network Security Groups can be created and applied using PowerShell and REST API. In this example we are going to use PowerShell. As always, we will use the latest PowerShell Azure Module which can be downloaded from Azure Portal.
    Using the following script we can create and apply Access Control Rules and Network Security Groups
    # Setting the variables $AzureRegion = 'West Europe' $AzureVNET = 'Three-Tier-VNET' # ---------------------Database Subnet Rules ------------------------- # Create a Network Security Group for Database Subnet New-AzureNetworkSecurityGroup -Name "DB-NSG" -Location $AzureRegion -Label "NSG for Database Subnet of $AzureVNET" # Adding a Rule to deny Inbound TCP traffic from Front End Subnet Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityRule -Name FEDeny -Type Inbound -Priority 100 ` -Action Deny -SourceAddressPrefix '172.16.1.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.3.0/24' ` -DestinationPortRange '*' -Protocol TCP # Adding a Rule to allow Inbound SQL (TCP/1433) traffic from Application Subnet Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityRule -Name SQL -Type Inbound -Priority 110 ` -Action Allow -SourceAddressPrefix '172.16.2.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.3.0/24' ` -DestinationPortRange '1433' -Protocol TCP # Adding a Rule to allow Inbound RDP (TCP/3389) traffic from Internet, for management Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityRule -Name RDP -Type Inbound -Priority 120 ` -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '*' -DestinationAddressPrefix '172.16.3.0/24' ` -DestinationPortRange '3389' -Protocol TCP # Assign the Network Security Group to Database Subnet Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityGroupToSubnet -VirtualNetworkName $AzureVNET -SubnetName "Database" # Network Security Group Rules and details Get-AzureNetworkSecurityGroup -Name "DB-NSG" -Detailed # ---------------------Application Subnet Rules ------------------------- #Create a Network Security Group for Application Subnet New-AzureNetworkSecurityGroup -Name "APP-NSG" -Location $AzureRegion -Label "NSG for Application Subnet of $AzureVNET" # Adding a Rule to deny Inbound TCP traffic from Database Subnet Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityRule -Name DBDeny -Type Inbound -Priority 100 ` -Action Deny -SourceAddressPrefix '172.16.3.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.2.0/24' ` -DestinationPortRange '*' -Protocol TCP # Adding a Rule to allow Inbound WEB (TCP/80) traffic from Front End Subnet Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityRule -Name WEB -Type Inbound -Priority 110 ` -Action Allow -SourceAddressPrefix '172.16.1.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.2.0/24' ` -DestinationPortRange '80' -Protocol TCP # Adding a Rule to allow Inbound RDP (TCP/3389) traffic from Internet, for management Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityRule -Name RDP -Type Inbound -Priority 120 ` -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '*' -DestinationAddressPrefix '172.16.2.0/24' ` -DestinationPortRange '3389' -Protocol TCP # Assign the Network Security Group to Database Subnet Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityGroupToSubnet -VirtualNetworkName $AzureVNET -SubnetName "Application" # Network Security Group Rules and details Get-AzureNetworkSecurityGroup -Name "APP-NSG" -Detailed We can get all the details about applied Network Security Groups using the command:
    Get-AzureNetworkSecurityGroup -Name "DB-NSG" -Detailed http://vaggeliskappas.com/wp-content/uploads/2015/06/NSG-05-e1433179942554.png
    Get-AzureNetworkSecurityGroup -Name "APP-NSG" -Detailed http://vaggeliskappas.com/wp-content/uploads/2015/06/NSG-06-e1433180072727.png References
    About Network Security Groups Network Security Groups  
    The post Secure Azure Virtual Network using Network Security Groups appeared first on Vaggelis Kappas.
  9. kavag
    The way that Network Virtualization is implemented in Hyper-V and subsequently in Microsoft Azure IaaS, enables explicitly the Routing between Virtual Subnets. This is the reason why the traffic between Virtual Subnets, that are part of the same Virtual Network, is unrestricted unless we have applied Network Security Groups.
    Network Security Groups Is a way to control traffic between Virtual Subnets of an Azure Virtual Network as well as the Internet. Moreover, Network Security Groups provide segmentation within Azure Virtual Network, by applying rules according to our needs and design.

    Until Network Security Groups became Generally Available, the only way to control traffic was endpoint based Access Control Lists. By applying ACLs to a Virtual Machine’s public endpoint, we have a way to control the ingress traffic to this port of this particular Virtual Machine. Network Security Groups takes this capability a step ahead and enables us to control all inbound as well as outbound traffic of a Virtual Machine or a Virtual Subnet.
    How does a Network Security Group (NSG) work ?
    A Network Security Group has a name and a descriptive label and is associated to an Azure Region. It contains Inbound and Outbound traffic rules and can be applied to a Virtual Machine, a Virtual Subnet or both.

    Associating an NSG to a VM – When an NSG is directly associated to a VM, the Network access rules in the NSG are directly applied to all traffic that is destined to the VM.
    Associating an NSG to a Subnet – When an NSG is associated to a subnet, the Network access rules in the NSG are applied to all the VMs in the subnet.
    Associating an NSG to a Subnet and a VM – It is possible that you can associate an NSG to a VM and a different NSG to the subnet where the VM resides. This is supported and in this case the VM gets two layers of protection. On the Inbound traffic the packet goes through the access rules specified in the subnet followed by rules in the VM and in the Outbound case it goes through the rules specified in the VM first before going through the rules specified in the subnet.
    Priorities and Default Rules
    As we mentioned above, an NSG contains Inbound and Outbound traffic Rules that we create according to our needs. These Rules are processed in the order of priority. Rules with lower priority number are processed before those with higher priority number and so on. Default rules are also there for a Network Security Group. These rules cannot be deleted but they have the lowest priority and, normally, they will be overridden.
    Azure Virtual Network
    Let’s assume that we want to deploy a three-tier application in Microsoft Azure IaaS offering. In this case, we create a Virtual Network as illustrated in the following figure:


    By default, Virtual Machines that are deployed to the Virtual Subnets (Front, App, DB) can communicate to each other and can have access to the Internet. This default behavior in some cases is not enough and Security and Access Control needs to be applied. By using Network Security Groups, the Virtual Network’s security is strengthened and Access Control Rules to inbound and outbound traffic are enforced.
    Create and use Network Security Groups – Step-By-Step
    As a demonstration, we are going to use the Virtual Network that we’ve created in the previous example. Let’s assume that we want to implement a more restrictive scenario, like the one shown in the following figure:
    In order to achieve the designed security and access control we should create traffic rules, that they can be summarized in the following table:

      Front End
    Subnet Application
    Subnet Database
    Subnet Internet Front End
    Subnet - Allow - TCP/80 Deny - All Allow - All Application
    Subnet Allow - TCP/80 - Allow - TCP/1433 Allow - TCP/3389 Database
    Subnet Deny - All Allow - TCP/1433 - Allow - TCP/3389 Internet Allow - All Allow - TCP/3389 Allow - TCP/3389 - Network Security Groups can be created and applied using PowerShell and REST API. In this example we are going to use PowerShell. As always, we will use the latest PowerShell Azure Module which can be downloaded from Azure Portal.
    Using the following script we can create and apply Access Control Rules and Network Security Groups
    # Setting the variables $AzureRegion = 'West Europe' $AzureVNET = 'Three-Tier-VNET' # ---------------------Database Subnet Rules ------------------------- # Create a Network Security Group for Database Subnet New-AzureNetworkSecurityGroup -Name "DB-NSG" -Location $AzureRegion -Label "NSG for Database Subnet of $AzureVNET" # Adding a Rule to deny Inbound TCP traffic from Front End Subnet Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityRule -Name FEDeny -Type Inbound -Priority 100 ` -Action Deny -SourceAddressPrefix '172.16.1.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.3.0/24' ` -DestinationPortRange '*' -Protocol TCP # Adding a Rule to allow Inbound SQL (TCP/1433) traffic from Application Subnet Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityRule -Name SQL -Type Inbound -Priority 110 ` -Action Allow -SourceAddressPrefix '172.16.2.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.3.0/24' ` -DestinationPortRange '1433' -Protocol TCP # Adding a Rule to allow Inbound RDP (TCP/3389) traffic from Internet, for management Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityRule -Name RDP -Type Inbound -Priority 120 ` -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '*' -DestinationAddressPrefix '172.16.3.0/24' ` -DestinationPortRange '3389' -Protocol TCP # Assign the Network Security Group to Database Subnet Get-AzureNetworkSecurityGroup -Name "DB-NSG" | Set-AzureNetworkSecurityGroupToSubnet -VirtualNetworkName $AzureVNET -SubnetName "Database" # Network Security Group Rules and details Get-AzureNetworkSecurityGroup -Name "DB-NSG" -Detailed # ---------------------Application Subnet Rules ------------------------- #Create a Network Security Group for Application Subnet New-AzureNetworkSecurityGroup -Name "APP-NSG" -Location $AzureRegion -Label "NSG for Application Subnet of $AzureVNET" # Adding a Rule to deny Inbound TCP traffic from Database Subnet Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityRule -Name DBDeny -Type Inbound -Priority 100 ` -Action Deny -SourceAddressPrefix '172.16.3.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.2.0/24' ` -DestinationPortRange '*' -Protocol TCP # Adding a Rule to allow Inbound WEB (TCP/80) traffic from Front End Subnet Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityRule -Name WEB -Type Inbound -Priority 110 ` -Action Allow -SourceAddressPrefix '172.16.1.0/24' -SourcePortRange '*' -DestinationAddressPrefix '172.16.2.0/24' ` -DestinationPortRange '80' -Protocol TCP # Adding a Rule to allow Inbound RDP (TCP/3389) traffic from Internet, for management Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityRule -Name RDP -Type Inbound -Priority 120 ` -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '*' -DestinationAddressPrefix '172.16.2.0/24' ` -DestinationPortRange '3389' -Protocol TCP # Assign the Network Security Group to Database Subnet Get-AzureNetworkSecurityGroup -Name "APP-NSG" | Set-AzureNetworkSecurityGroupToSubnet -VirtualNetworkName $AzureVNET -SubnetName "Application" # Network Security Group Rules and details Get-AzureNetworkSecurityGroup -Name "APP-NSG" -Detailed We can get all the details about applied Network Security Groups using the command:
    Get-AzureNetworkSecurityGroup -Name "DB-NSG" -Detailed
    Get-AzureNetworkSecurityGroup -Name "APP-NSG" -Detailed References
    About Network Security Groups Network Security Groups  
    The post Secure Azure Virtual Network using Network Security Groups appeared first on Vaggelis Kappas.


  10. kavag
    Microsoft Office 365 combines Microsoft Office desktop suite with cloud-based versions of communication and collaboration services like Microsoft Exchange Online, Microsoft SharePoint Online, Microsoft Office Web Apps, and Microsoft Lync Online. Each of these, online provided, services has its own bandwidth requirements.
    When estimating network traffic, there are many variables to consider. Some of these are:
    The online services that your company has subscribed to
    The number of client computers that is in use simultaneously
    The task each client computer is performing
    The company’s network topology and the capacity of the various pieces of network hardware
    The number and the capacity of the network connections and network segments associated with each client computer

     
    In this article we are going to provide guidelines for rough (simple) estimation of the network bandwidth, each service is going to consume. Detailed specifications are beyond the scope of this article. For detailed documentation, business requirements, assessment and deployment preparation you can go to OnRamp for Office 365Microsoft Exchange Online
    In this section we are going to estimate the network bandwidth that your company would need to access Microsoft Exchange Online. To do this, we are going to use a very useful tool called Exchange Client Network Bandwidth Calculator and you can find it here. This tool can help you to reduce the risks involved in Exchange Server network bandwidth planning and is suitable for Exchange Online as well as Exchange On Premises.
    If you are already running Exchange Server On Premises you can use PowerShell or tools like Exchange Server Profile analyzer, in order to determine mailbox size, average message size, messages sent and received per mailbox per day etc.
    In this calculation we have used User Profile data as suggested by the Exchange Client Network Bandwidth Calculator. The following table lists the message usage for light, medium, heavy, and very heavy e-mail users
    ActivityLightMediumHeavyVery HeavyMessages sent per day5102030Messages received per day204080120Average message size50 KB50 KB50 KB50 KBAverage Mailbox Size2 GB2 GB2 GB2 GB
    The network traffic that is generated by each type of user in each e-mail client, is on the following table. All values are in kilobytes (KB) per day per user.E-Mail ClientLightMediumHeavyVery HeavyOutlook 2010 (OA-Cached),Receive2435 KB3701 KB6233 KB9437 KBOutlook 2010 (OA-Cached),Send319 KB638 KB1277 KB1915 KBOWA 2010,Receive1835 KB3635 KB7229 KB10823 KBOWA 2010,Send561 KB1122 KB2244 KB3365 KBOutlook 2011 (EWS),Receive3317 KB5276 KB9194 KB14097 KBOutlook 2011 (EWS),Send1061 KB2122 KB4243 KB6365 KB
    To apply this information to your company, consider the following examples. Each example assumes that the users are in the same time zone and that they perform most of their work during the same eight hours of the day.
    Example 1, 50 Heavy Outlook 2011 users: In order to calculate the network bandwidth consumption in bytes per second, we must use the following formula
    Received bytes/sec = (50 heavy users × (9,194 KB/user ÷ day)) ÷ (8 hr/day × 3600 sec/hr) = 15.96 KB/sec
    Sent bytes/sec = (50 heavy users × (4,243 KB/user ÷ day)) ÷ (8 hr/day × 3600 sec/hr) = 7.36 KB/sec
    These are average rates, if we assume a daily peak of twice the average usage, the network connection would need to support approximately 32 KB/sec of Download Speed and 16 KB/sec of Upload speed.

    Example 2, 30 Medium OWA users: In order to calculate the network bandwidth consumption in bytes per second, we must use the following formula
    Received bytes/sec = (30 heavy users × (7,229 KB/user ÷ day)) ÷ (8 hr/day × 3600 sec/hr) = 7.53 KB/sec
    Sent bytes/sec = (50 heavy users × (2,244 KB/user ÷ day)) ÷ (8 hr/day × 3600 sec/hr) = 2.33 KB/sec
    These are average rates, if we assume a daily peak of twice the average usage, the network connection would need to support approximately 16 KB/sec of Download Speed and 6 KB/sec of Upload speed.

    You can use the Exchange Client Network Bandwidth Calculator spreadsheet and choose your users profiles mixing.Microsoft SharePoint Online
    In this section we are going to estimate the network bandwidth that your company would need to access Microsoft SharePoint Online. This estimation is based to the following assumptions:
    An average page load (interaction) transfers approximately 100 KB.
    A typical user generates about 40 interactions per hour.
    About 20 percent of a company’s users will be active at the same time.

    With that been said, consider the following example, having in mind that this example assumes that all of the users are in the same time zone and that they perform most of their work during the same eight hours of the day.
    In this example a company has 100 SharePoint Online Users and we calculate the average network traffic for each user using this formula: bits per second = (102,400 bytes/load × 8 bits/byte × 40 loads/hr) ÷ 3600 seconds/hr = 9102 bits per second
    With the assumption that only 20% of company’s users will be active at the same time, those 20 users would require 20 × 9102 bits per second = 177,77 Kilobits per second.
    if we assume a daily peak twice the average usage, the network connection would need to support approximately 360 Kb/sec.
    In addition to the bandwidth requirement, SharePoint Online requires a network latency of no greater than 250 milliseconds.
    For more detailed information about capacity planning for SharePoint Online, see Plan for bandwidth requirements.Microsoft Lync Online
    The estimation of bandwidth requirements for Microsoft Lync Online can be challenging as it depends on many parameters.
    Generally, the network bandwidth usage is based on each user. The starting point for understanding the network bandwidth requirements for Lync Online is documented in the article, Network Bandwidth Requirements for Media Traffic, published in Microsoft Technet
    There is also a bandwidth calculator available for download.
    In planning phase you can use the Transport Reliability IP Probe (TRIPP) tool using the following URLs according to your physical location:
    Amsterdam, NL: http://trippams.online.lync.com
    Blue Ridge, VA: http://trippbl2.online.lync.com
    Dublin, IE: http://trippdb3.online.lync.com
    Hong Kong: http://tripphkn.online.lync.com
    San Antonio, TX: http://trippsn2.online.lync.com
    Singapore: http://trippsg1.online.lync.com

    This tool can help you determine connectivity or bandwidth problems
    The bandwidth usage is determined by a number of factors, the Codec used (along with overhead), the Stream activity level and for video, the resolution/quality and frame rate.
    The post Simple network bandwidth consumption calculation for Office 365 appeared first on Vaggelis Kappas.
     
    Source
  11. kavag
    Κατεβάστε όλη την σειρά των άρθρων σε μορφή PDF
    Storage Spaces: Έλεγχος αντοχής και επαναφοράς από βλάβη

    Γενικά
    Σε αυτήν την σειρά των άρθρων θα κάνουμε έλεγχο της ανθεκτικότητας των Storage Spaces έναντι βλάβης ενός, δύο ή και περισσοτέρων σκληρών δίσκων πάνω στους οποίους έχουν υλοποιηθεί. Θα εξετάσουμε και τα τρία επίπεδα ασφάλειας που προσφέρονται, δηλαδή :
    Two Way Mirroring
    Three Way Mirroring και
    Parity

    Υπάρχει μια αντιστοιχία των παραπάνω επιπέδων ασφαλείας με τα γνωστά μας RAID levels, αλλά όχι απόλυτη μια που, όπως θα δούμε, μπορούμε να δημιουργήσουμε ένα Two-Way Mirror με χρήση τριών (3) δίσκων.
    Ένα πλήθος με τις συνηθέστερες ερωτήσεις και τις απαντήσεις τους σχετικά με τα Storage Spaces θα βρείτε στο παρακάτω σύνδεσμο :
    Storage Spaces Frequently Asked Questions (FAQ)
    Ενώ, πολύ χρήσιμος είναι και ο παρακάτω πίνακας στον οποίο παρουσιάζεται ο συσχετισμός των επιπέδων ασφαλείας των Storage Spaces με τον ελάχιστο απαιτούμενο αριθμό δίσκων.Resiliency typeMinimum number of columnsColumn-to-disk correlationMinimum number of disksTwo-way mirror

    1



    1:2



    2

    Three-way mirror

    1



    1:3



    5

    Parity

    3



    1:1



    3


    Για την δημιουργία των Storage Spaces και τους ελέγχους της αντοχής τους, την προσομοίωση δηλαδή της βλάβης, θα χρησιμοποιήσουμε το αγαπημένο μας εργαλείο, το PowerShell, ενώ όλες οι δοκιμές θα διεξαχθούν σε εργαστηριακό περιβάλλον που περιλαμβάνει έναν Windows Server 2012R2 Hyper-V host και ένα Guest VM με Windows Server 2012R2
    Βρείτε στα άρθρα που ακολουθούν, τα αναλυτικά βήματα ανά επίπεδο ασφάλειας :
    Two Way Mirroring
    Three Way Mirroring και
    Parity

    The post Storage Spaces: Έλεγχος αντοχής και επαναφοράς από βλάβη appeared first on Vaggelis Kappas.
     
    Source
  12. kavag
    Μία από τις πιο σημαντικές ομάδες υπηρεσιών που προσφέρει το Windows Azure, είναι η ομάδα των υπηρεσιών αποκατάστασης ομαλής λειτουργίας της υποδομής ή εν συντομία Recovery Services.
    Η ομάδα αυτή των υπηρεσιών προσφέρεται τώρα σε μορφή προεπισκόπησης (preview) αλλά αναμένουμε σύντομα την γενική διάθεση (general availability).
    Οι υπηρεσίες που περιλαμβάνονται στις Windows Azure Recovery Services, είναι οι εξής :
    Υπηρεσία αντιγράφων ασφαλείας (Backup)
    Με την υπηρεσία αυτή μπορούμε να αυτοματοποιήσουμε την λήψη αντιγράφων ασφαλείας από τους Servers μας και να αποθηκεύσουμε αυτά τα αντίγραφα, στο εξαιρετικά αξιόπιστο σύστημα αποθήκευσης αρχείων του Windows Azure.
    Η αυτοματοποίηση της διαδικασίας γίνεται μέσω της γνώριμης εφαρμογής Windows Server Backup και των κατάλληλων προσαρτημάτων (modules) που κατεβάζουμε από το management portal όταν κάνουμε εγγραφή για αξιολόγηση της υπηρεσίας.
    τα λειτουργικά συστήματα που υποστηρίζονται είναι τα εξής :
    Windows Server 2012
    Windows Server 2012 Essentials
    Windows Server 2008 R2

    Τέλος υποστηρίζεται και το System Center 2012 SP1 Data Protection Manager
    Υπηρεσία αποκατάστασης υποδομής Hyper-V. Hyper-V Recovery Manager
    Η υπηρεσία Windows Azure Hyper-V Recovery Manager, απαιτεί την ύπαρξη και την λειτουργία του System Center 2012 και προσφέρει μία αξιόπιστη και συνεχώς διαθέσιμη πλατφόρμα, για την φιλοξενία του private cloud της εταιρείας μας έτσι ώστε να αντιμετωπίζονται περιπτώσεις εκτεταμένης βλάβης ή και καταστροφής.
    To System Center 2012 Virtual Machine Manager αναλαμβάνει την αντιγραφή των Virtual Machines του private cloud της εταιρείας στο Windows Azure, ενώ μετά την αρχική αντιγραφή ξεκινά η διαδικασία της διαρκούς αποθήκευσης και εφαρμογής των τροποποιήσεων (replication) των VMs. Η διαδικασία αυτή παρέχεται από το Windows Server 2012 Hyper-V Replica και συντονίζεται από το Hyper-V Recovery Manager που έχει και την εποπτεία.
    Περισσότερες λεπτομέρειες θα βρείτε εδώ
    Windows Azure Preview Features
    Ενώ αναλυτικές οδηγίες για την χρήση των υπηρεσιών θα βρείτε εδώ
    Windows Azure Recovery Services
    θα ακολουθήσουν και άλλα άρθρα για την χρήση των υπηρεσιών αποκατάστασης, οπότε μείνετε συντονισμένοι.
    The post Windows Azure Recovery Services appeared first on Vaggelis Kappas.
     
    Source
  13. kavag
    In the unlikely event that you have not heard, Windows Server 2016 Technical Preview 3 (TP3) is now available for download.
    You can get it from TechNet Evaluation Center
    http://vaggeliskappas.com/wp-content/uploads/2015/08/WS2016TP3-Eval.png
    You can find it in Azure’s Image Gallery

    http://vaggeliskappas.com/wp-content/uploads/2015/08/WS2016TP3-Azure.png
    You can find it on your MSDN Subscription
    http://vaggeliskappas.com/wp-content/uploads/2015/08/WS2016TP3-MSDN.png
    For more information about TP3 you can visit the following Microsoft blogs:
    What’s new in Windows Server 2016 and System Center 2016 Technical Preview 3
    New Windows Server Preview Fuels Application Innovation with Containers, Software-Defined Datacenter Updates
    Announcing Windows Server 2016 Containers Preview
    Enjoy !
    The post Windows Server 2016 Technical Preview 3 (TP3) is now available appeared first on Vaggelis Kappas.
  14. kavag
    In the unlikely event that you have not heard, Windows Server 2016 Technical Preview 3 (TP3) is now available for download.
    You can get it from TechNet Evaluation Center

    You can find it in Azure’s Image Gallery


    You can find it on your MSDN Subscription

    For more information about TP3 you can visit the following Microsoft blogs:
    What’s new in Windows Server 2016 and System Center 2016 Technical Preview 3
    New Windows Server Preview Fuels Application Innovation with Containers, Software-Defined Datacenter Updates
    Announcing Windows Server 2016 Containers Preview
    Enjoy !
    The post Windows Server 2016 Technical Preview 3 (TP3) is now available appeared first on Vaggelis Kappas.


  15. kavag
    Η μεταφορά ή η αντιγραφή των Virtual Machines μεταξύ συνδρομών (Subscriptions) ή Storage Accounts είναι εφικτή μέσω της αντιγραφής των VHDs. Η αντιγραφή των VHDs, ή οποιουδήποτε άλλου blob, είναι μία εγγενής δυνατότητα του Windows Azure που γίνεται μέσω του blob copy API. Για λεπτομέρειες σχετικά με το Windows Azure Storage πατήστε εδώ
     
    Στο άρθρο αυτό θα δούμε πως μπορούμε να αντιγράψουμε VHDs με την χρήση του PowerShell. Πριν ξεκινήσουμε, σκόπιμο είναι να αναφέρουμε πως υπάρχει η δυνατότητα αντιγραφής μεταξύ των:
    Containers του ίδιου Storage Account
    Διαφορετικών Storage Accounts της ίδια συνδρομής (Subscription)
    Διαφορετικών συνδρομών στο ίδιο Data Center
    Διαφορετικών Data Centers

    Όπως είναι αναμενόμενο, ο χρόνος διάρκειας της αντιγραφής σε κάθε μία από τις παραπάνω περιπτώσεις είναι διαφορετικός πράγμα που οφείλεται στην αρχιτεκτονική του Windows Azure. To Windows Azure κατανέμει τους πόρους του Windows Azure Storage σε storage stamps που στην ουσία είναι συστοιχίες από Servers και δίσκους. Έτσι η αντιγραφή μέσα στο ίδιο storage stamp είναι ταχύτατη ενώ μεταξύ διαφορετικών storage stamps διαρκεί λίγο περισσότερο.
    Ας δούμε όμως πως μπορούμε να πραγματοποιήσουμε την αντιγραφή των VHDs με την χρήση του PowerShell.
    # Select Default SubscriptionSelect-AzureSubscription -SubscriptionName "MSDN-Kappas"# Define Source VHD: This is the system disk of an ADFS server$SourceFileURI = "https://support22stor.blob.core.windows.net/vhds/vnetadfs-07-10.vhd"# Define Source Storage Account $SourceStorageAccount = "support22stor"$SourceStorageAccountKey = "tDSNGyuDHWkrrA2vF/7pFiA=="# Define Destination Storage Account, in this demo we use the same as the source$DestStorageAccount = "support22stor"$DestStorageAccountKey = "tDSNGyuDfG/dLfPsvFiA=="# Source Storage Context creation$SrcContext = New-AzureStorageContext -StorageAccountName $SourceStorageAccount ` -StorageAccountKey $SourceStorageAccountKey# Destination Storage Context creation$DestContext = New-AzureStorageContext -StorageAccountName $DestStorageAccount ` -StorageAccountKey $DestStorageAccountKey # Create a container in destination storage account$NewContainer = "copiedvhds"New-AzureStorageContainer -Name $NewContainer -Context $DestContext# Starting the blob copy. Copy is asynchronous$cpblob = Start-AzureStorageBlobCopy -SrcUri $SourceFileURI -srcContext $SrcContext ` -DestContainer $NewContainer -DestContext $DestContext ` -DestBlob "vnetadfs-vnetadfs-copied.vhd"
    Η αντιγραφή γίνεται με την εντολή Start-AzureStorageBlobCopy αφού όμως έχουμε ορίσει το αρχείο προέλευσης και προορισμού και έχουμε δώσει στοιχεία για την πρόσβαση στα Storage Accounts μέσω των Contexts.
    Η διαδικασία της αντιγραφής είναι ασύγχρονη και μπορούμε να ξεκινήσουμε πολλές αντιγραφές παράλληλα.
    Για να δούμε την πρόοδο της αντιγραφής χρησιμοποιούμε την εντολή Get-AzureStorageBlobCopyState και εάν προσθέσουμε ένα While Loop μπορούμε να έχουμε συνεχή ενημέρωση για την πρόοδο της αντιγραφής.

    # Retrieve the progress of the Copy$status = $cpblob | Get-AzureStorageBlobCopyState# Show the progress$status# If you like you can print the status until the copy is completedwhile ($status.Status -eq "Pending"){ $status = $cpblob | Get-AzureStorageBlobCopyState Start-Sleep 10 $status }
    The post Αντιγράψτε VHDs (blobs) μεταξύ των Storage Accounts του Windows Azure appeared first on Vaggelis Kappas.
     
    Source
  16. kavag
    Στις νέες δυνατότητες και προσθήκες που έγιναν στο Windows Azure Active Directory, είχαμε αναφερθεί και τον Ιούλιο αμέσως μετά την ανακοίνωση του Alex Simons στο Active Directory Team Blog.
    Μετά λοιπόν από τις προσθήκες και τις βελτιώσεις του Ιουλίου, η δυνατότητα του Single Sign On παρέχεται προ-εγκατεστημένη στο Windows Azure Active Directory και όχι μόνο για τις
    υπηρεσίες του Microsoft Office 365, του Microsoft CRM online, του Windows Intune και γενικώς των υπηρεσιών SaaS που προσφέρονται από την Microsoft αλλά και για άλλες περίπου 70 υπηρεσίες όπως το Box, το Dropbox, το WebEx, τα Google Apps, το GMail, το Salesforce, Amazon κ.λ.π.
    Οι νέες αυτές δυνατότητες του Windows Azure που ονομάζονται Application Access Enhancements βρίσκονται σε έκδοση δοκιμής (preview) και για να τις χρησιμοποιήσουμε θα πρέπει πρώτα να κάνουμε την σχετική εγγραφήΕάν λοιπόν η επιχείρηση έχει τις κατάλληλες συνδρομές στο Windows Azure και στο Microsoft Office 365, μπορεί να ενοποιήσει το Active Directory των γραφείων της με το Windows Azure Active Directory στο Cloud και να πετύχει το Single Sign On, να δώσει δηλαδή στους χειριστές της την δυνατότητα να συνδεθούν στις υπηρεσίες του Cloud με τα Credentials που έχουν για το εσωτερικό της δίκτυο (Active Directory).
    Αναλυτική σειρά άρθρων σχετικά με το Single Sign On και πως αυτό είναι δυνατόν να επιτευχθεί, θα βρείτε εδώ
    Active Directory Synchronization, ADFS vs. Password Synch
    Μπορείτε να κατεβάσετε τον σχετικό οδηγό σε μορφή PDF κάνοντας κλικ εδώ
    Έτσι αφού έχουμε υλοποιήσει το Active Directory Synchronization και το Single Sign On και έχουμε γραφτεί στο Preview των Application Access Enhancements, μπαίνουμε στο Management Portal του Windows Azure για προσθέσουμε τις εφαρμογές που θέλουμε να έχουν πρόσβαση οι χειριστές της επιχείρησης μαςΕπιλέγοντας το Add an Application, βλέπουμε την λίστα με τις διαθέσιμες SaaS εφαρμογέςΑπό την λίστα αυτή επιλέγουμε τις εφαρμογές που θέλουμε να δώσουμε πρόσβαση στους χειριστές της επιχείρησης.
    Οι διαχειριστές της επιχείρησης μπορούν να δουν την λίστα με τις εφαρμογές, να προσθέσουν ή να αφαιρέσουν μία εφαρμογή αλλά και να κάνουν ρυθμίσεις για την πρόσβαση των χειριστών σε κάποια εφαρμογή
    Normal
    0
    false
    false
    false
    EL
    X-NONE
    X-NONE
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:”Table Normal”;
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-parent:””;
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin-top:0cm;
    mso-para-margin-right:0cm;
    mso-para-margin-bottom:8.0pt;
    mso-para-margin-left:0cm;
    line-height:107%;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:”Calibri”,”sans-serif”;
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-fareast-language:EN-US;}
    Οι χειριστές της επιχείρησης μπορούν να δουν όλες τις εφαρμογές στις οποίες έχουν πρόσβαση μέσω του AccessPanel.
    ToAccessPanelβρίσκεται στην διεύθυνση
    https://account.activedirectory.windowsazure.com/applications
    και είναι μια Webεφαρμογή που επιτρέπει στους χειριστές της επιχείρησης να έχουν συγκεντρωμένες όλες τις διαθέσιμες SaaSεφαρμογές έτσι ώστε αφενός να είναι εύκολη η πρόσβαση σε αυτές και αφετέρου να επιτυγχάνεται με την χρήση των στοιχείων εισόδου στο εσωτερικό δίκτυο της επιχείρησης.
    Η είσοδος στο AccessPanel είναι ελεύθερη για όλους τους χειριστές της επιχείρησης και γίνεται, μέσω του SingleSignOnμε τα στοιχεία (Credentials) που έχει ο κάθε ένας στο ActiveDirectoryTo Access Panel απαιτεί Web Browser με υποστήριξη JavaScript και CSS ενώ εάν οι εφαρμογές μας απαιτούν Single Sign On με αποθήκευση Username και Password, τότε θα χρειαστεί ένα plug-in που είναι διαθέσιμο για τον Internet Explorer (από την έκδοση 8.0 και πάνω) και για τον Chrome.
    To plug-in κατεβαίνει αυτόματα όταν επιλέξουμε μια εφαρμογή που απαιτεί Single Sign On με αποθήκευση Username και PasswordΗ εγκατάσταση του είναι απλή και προϋποθέτει την αποδοχή της σχετικής άδειας.Αφού γίνει η εγκατάσταση του Plug-in, έχουμε την δυνατότητα να αποθηκεύσουμε στο Windows Azure Active Directory τα στοιχεία πρόσβασης μας για κάποια από τις διαθέσιμες εφαρμογές που απαιτεί Single Sign On με αποθήκευση Username και Password.
    Η αποθήκευση των στοιχείων πρόσβασης για κάποια εφαρμογή στο Windows Azure Active Directory είναι χαρακτηριστικό του συγκεκριμένου χειριστή ενώ γίνεται με ασφαλή τρόπο.
    O τρόπος αυτός ενοποίησης κάποιων από τις διαθέσιμες SaaS εφαρμογές, η υλοποίηση δηλαδή του single Sign On με αποθήκευση του Username και Password επιτρέπει την χρήση ήδη υπαρχόντων λογαριασμών χρηστών, με συνεκτικό και ενοποιημένο τρόπο αφού ο χειριστής θα αποθηκεύσει τα στοιχεία του μια φορά και η πρόσβαση θα εξασφαλίζεται από το Access Panel και το Windows Azure Active Directory.Έτσι αφού συνδεθούμε στο Access Panel, μέσω του https://account.activedirectory.windowsazure.com/applicationsΕπιλέγουμε να αποθηκεύσουμε τα στοιχεία του λογαριασμού που έχουμε ήδη στο BoxΑφού γίνει η αποθήκευση, μετά απλώς επιλέγουμε το Box και το Access Panel κάνει την σχετική ανακατεύθυνση
    Και έχουμε πρόσβαση στην επιθυμητή εφαρμογήΕίδαμε λοιπόν πως μπορεί μία επιχείρηση, χρησιμοποιώντας τις νέες δυνατότητες του Windows Azure, που ονομάζονται Application Access Enhancements, να προσφέρει στους χειριστές της πρόσβαση σε πλήθος άλλων SaaS εφαρμογών μέσω των στοιχείων εισόδου τους (Credentials) για το εσωτερικό δίκτυο και το Access Panel.
    The post Γνωριμία με το Access Panel appeared first on Vaggelis Kappas.
     
    Source
  17. kavag
    Σημαντικό πλεονέκτημα των σύγχρονων επιχειρήσεων αποτελεί η ύπαρξη και η λειτουργική ετοιμότητα ενός σχεδίου προστασίας από βλάβη ή και καταστροφή, το λεγόμενο Disaster Recovery plan. Η πληροφοριακή υποδομή, σε ένα τέτοιο σχέδιο, αποτελεί ένα μεγάλο τμήμα του λόγω της σημαντικότητας του στην λειτουργία της οποιαδήποτε επιχείρησης.
    Σε όλες τις εγκαταστάσεις πληροφορικής το πιο ενδιαφέρον κομμάτι, το κομμάτι που θέλουμε εν τέλει να προστατέψουμε είναι η πληροφορία, δηλαδή τα δεδομένα. Θα δούμε λοιπόν, πως μπορούμε να προστατέψουμε τα δεδομένα και τα αρχεία της επιχείρησης με εύκολο και αυτόματο τρόπο με την αποθήκευση τους στο Windows Azure Backup, που είναι τμήμα των Windows Azure Recovery Services.
     
    Τι είναι τα Windows Azure Recovery Services και άλλες σχετικές πληροφορίες θα βρείτε εδώ
    Για να χρησιμοποιήσουμε την υπηρεσία Windows Azure Backup, θα πρέπει αρχικά να κάνουμε εγγραφή στις υπηρεσίες Windows Azure Recovery Services και να δημιουργήσουμε μία ασφαλή αποθήκη (vault) για τα δεδομένα μας. Αυτό μπορούμε να το κάνουμε μέσω του management portal, όπως φαίνεται παρακάτω
    Η χρήση της υπηρεσίας Windows Azure Backup προϋποθέτει την εγκατάσταση καταλλήλων agents στους Servers, τα δεδομένα των οποίων θέλουμε να προστατέψουμε. O agent του Windows Azure Backup, είναι ένα προσάρτημα που επεκτείνει την λειτουργικότητα του Windows Server Backup ενώ εγκαθίσταται στα εξής λειτουργικά συστήματα
    Windows Server 2012
    Windows Server 2008 R2 SP1
    Windows Server 2012 Essentials

    Στην περίπτωση του Windows Server 2012 Essentials, o Windows Azure Backup agent, αποτελεί επέκταση της κονσόλας διαχείρισης (Dashboard) του server και την εγκατάσταση αλλά και την λειτουργία του θα την δούμε στην συνέχεια.
    Η διαδικασία λήψης αντιγράφων ασφαλείας των πολύτιμων δεδομένων της επιχείρησης στο Windows Azure Backup, συνοπτικά έχει ως εξής :
    Εγκατάσταση του κατάλληλου agent για την λειτουργική επέκταση του Windows Server Backup
    Έκδοση και ανέβασμα στο Windows Azure κατάλληλου πιστοποιητικού (certificate) για την ταυτοποίηση του Server από τον οποίο θα ληφθούν τα αντίγραφα ασφαλείας
    Εγγραφή του Server στην υπηρεσία Windows Azure Backup
    Κρυπτογράφηση, συμπίεση και ανέβασμα των αντιγράφων ασφαλείας στο Windows Azure

    Όπως φαίνεται τα αντίγραφα ασφαλείας των πολύτιμων δεδομένων της επιχείρησης αποθηκεύονται στο Windows Azure κρυπτογραφημένα μέσω κλειδιού που βάζουμε κατά την εγκατάσταση του agent.
    Μεγάλη σημασία πρέπει να δώσουμε στην φύλαξη αυτού του κλειδιού αφού εάν χαθεί ΔΕΝ θα μπορούμε να επαναφέρουμε τα δεδομένα μας από το Windows Azure.
    The post Γνωριμία με το Windows Azure Backup appeared first on Vaggelis Kappas.
     
    Source
  18. kavag
    Για να δημιουργήσουμε Virtual Machines στο Windows Azure μπορούμε εκτός του Management Portal, να χρησιμοποιήσουμε το PowerShell.
    To PowerShell, αφού κατεβάσουμε και εγκαταστήσουμε το κατάλληλο Windows Azure module, περιλαμβάνει όλες τις εντολές, τα Cmdlets, που θα μας βοηθήσουν τόσο να δημιουργήσουμε Virtual Machines στο Windows Azure όσο και να αλλάξουμε τα χαρακτηριστικά τους, όπως τους δίσκους που έχουν συνδεδεμένους, την υπολογιστική τους ισχύ, την μνήμη τους κ.λ.π.
     
    Αφού αποκτήσουμε την απαραίτητη εξοικείωση και εμπειρία στο πως δημιουργούνται και ρυθμίζονται τα VMs μέσω του PowerShell, μπορούμε να εκτελέσουμε την διαδικασία με επαναλαμβανόμενο τρόπο και αυτόματα να δημιουργήσουμε ένα ολόκληρο δίκτυο με υποδίκτυα και πολλά VMs με ένα script !
    Για να ξεκινήσουμε, απαραίτητο είναι να έχουν προηγηθεί τα βήματα που αναφέρονται στο άρθρο :
    Διαχείριση του Windows Azure μέσω PowerShell
    Οι εντολές που θα χρησιμοποιήσουμε, στην περίπτωση μας είναι οι εξής :
    Get-AzureVMImage
    Get-AzureLocation
    Test-AzureName
    New-AzureVMConfig
    Add-AzureProvisioningConfig
    New-AzureVM

    Εκτός των παραπάνω, απαραίτητο είναι ένα Storage Account για τους δίσκους του Virtual Machine, το οποίο μπορούμε να το δημιουργήσουμε με PowerShell, σύμφωνα με το άρθρο:
    Διαχειριστείτε το Windows Azure Storage εύκολα και γρήγορα με το PowerShell
    Αφού λοιπόν ελέγξουμε την διαθεσιμότητα του ονόματος για το Storage Account, το δημιουργούμε ως εξής
    Τώρα που έχουμε το Storage Account, θα πρέπει να επιλέξουμε το image από το οποίο θα δημιουργηθεί το Virtual Machine. Τα διαθέσιμα images τα βλέπουμε με την Get-AzureVMImage
    Τα Images που περιλαμβάνονται στο library του Windows Azure είναι πάρα πολλά, με επιλογές λειτουργικών συστημάτων από Windows Server 2008R2 και Windows Server 2012 μέχρι και Linux διαφόρων διανομών. Περιέχουν εφαρμογές όπως ο Microsoft SQL Server, SharePoint Server κ.λ.π. ενώ εάν δεν βρούμε το image που θέλουμε, υπάρχει διαθέσιμο και το VM depot με μεγάλη ποικιλία από έτοιμα Images που διατίθενται από το community.
    Αποθηκεύουμε το image που θέλουμε σε μια μεταβλητή για να το χρησιμοποιήσουμε αργότερα
    $VMimage = "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201304.01-en.us-127GB.vhd"
    Εάν δεν έχουμε δημιουργήσει κάποιο Affinity Group, θα πρέπει να επιλέξουμε ένα Data Center από τα διαθέσιμα του Windows Azure, εντός του οποίου θα δημιουργηθεί το Virtual Machine. Τα διαθέσιμα Data Centers τα βρίσκουμε με την Get-AzureLocation
    Στην περίπτωση μας, έχουμε φτιάξει ένα Affinity Group και αποθηκεύουμε το όνομα του σε μια μεταβλητή
    $AFFGrp = "AutoexecLABS"
    Όταν δημιουργήσουμε το virtual Machine, θα πρέπει να φτιάξουμε ένα Cloud Service οπότε ελέγχουμε εάν το επιθυμητό όνομα είναι διαθέσιμο με τηνΑφού είναι διαθέσιμο, αποθηκεύουμε το όνομα του Cloud Service σε μια μεταβλητή
    $SVCName = "axcvmsvc"
    Τέλος φτιάχνουμε μεταβλητές με το όνομα και τον κωδικό του διαχειριστή για το Virtual Machine, αφού ο λογαριασμός του Administrator είναι απενεργοποιημένος.
    $AdminUser = "vkappas"$AdminPass = "MyPass@1234"
    Αφού συγκεντρώσουμε όλα τα απαραίτητα στοιχεία, δημιουργούμε ένα αντικείμενο (object) με τις ρυθμίσεις του Virtual Machine, όπως η υπολογιστική του ισχύς και το image του λειτουργικού του συστήματος, με την εντολή New-AzureVMConfig
    Τροποποιούμε το Virtual Machine object, για να συμπεριλάβουμε και τις υπόλοιπες ρυθμίσεις με την Add-AzureProvisioningConfig και τέλος δημιουργούμε το επιθυμητό Virtual Machine με την New-AzureVM
    Το Script που χρησιμοποιήθηκε είναι το εξής :
    Select-AzureSubscription "MSDN-Kappas"$VMimage = "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201304.01-en.us-127GB.vhd"$VMName = "dmzdc"$SVCName = "axcvmsvc"$AFFGrp = "AutoexecLABS"$AdminUser = "vkappas"$AdminPass = "MyPass@1234"New-AzureVMConfig -Name $VMName -InstanceSize Small -ImageName $VMimage | Add-AzureProvisioningConfig -Windows -AdminUsername $AdminUser -Password $AdminPass | New-AzureVM -ServiceName $SVCName -AffinityGroup $AFFGrp
    Ενώ όταν «έτρεξε» το PowerShell, δημιούργησε στο Windows Azure πρώτα το Cloud Service
    Και μετά το Virtual Machine
    Μετά την δημιουργία, ξεκινάει η εγκατάσταση του λειτουργικού συστήματος. Με την Get-AzureVM βλέπουμε την εξέλιξη της
    Όταν ολοκληρωθεί η εγκατάσταση αλλάζει το status και έχουμε
    μπορούμε να κατεβάσουμε το αρχείο για την σύνδεση RDP στο συγκεκριμένο Virtual Machine που δημιουργήθηκε, με την Get-AzureRemoteDesktopFile και εάν θέλουμε να το ανοίξουμε για να συνδεθούμε.
    Φυσικά μπορούμε, μέσω του management portal, να δούμε το νέο Virtual Machine και τα χαρακτηριστικά του
    Όπως λοιπόν είδαμε, μπορούμε να δημιουργήσουμε ένα Virtual Machine με ένα Script. Είναι προφανές ότι μέσω εντολών του PowerShell μπορούμε την διαδικασία να την επαναλάβουμε και να δημιουργήσουμε περισσότερα Virtual Machines, σύμφωνα με τις ανάγκες μας.
    The post Δημιουργία Virtual Machine στο Windows Azure με PowerShell appeared first on Vaggelis Kappas.
     
    Source
  19. kavag
    Για να μπορέσουμε να διαχειριστούμε την συνδρομή που έχουμε στο Windows Azure, θα πρέπει αρχικά να κατεβάσουμε το κατάλληλο PowerShell module, μέσω του http://www.windowsazure.com/en-us/downloads/
    Επειδή οι αλλαγές που γίνονται στο Windows Azure, τόσο στις υπηρεσίες που προσφέρει όσο και στην διαχείριση τους είναι πολλές και συχνές, θα πρέπει να επισκεπτόμαστε συχνά αυτόν τον σύνδεσμο και να κατεβάζουμε κάθε φορά την νεότερη έκδοση αυτού του module. Ανεβαίνει μία έκδοση κάθε τρεις εβδομάδες περίπου.
    Αφού γίνουν οι απαραίτητες εγκαταστάσεις, θα πρέπει να συνδεθεί ο Η/Υ μας με την συνδρομή που έχουμε στο Windows Azure και αυτό μέσω του PowerShell επιτυγχάνεται μέσω της εισαγωγής του κατάλληλου αρχείου ρυθμίσεων για να ικανοποιούνται όλες οι απαιτήσεις ασφαλείας.
    Έτσι για την λήψη αυτού του αρχείου εκτελούμε την εντολή
    Get-AzurePublishSettingsFile
    Αφού βάλουμε τα στοιχεία που θα μας ζητηθούν, UserName και Password, θα κατέβει το αρχείο ρυθμίσεων στον υπολογιστή μας.
    Αυτό το αρχείο θα πρέπει να το εισάγουμε, και αυτό γίνεται μέσω της εντολής
    Import-AzurePublishSettingsFile
    Τα παραπάνω βήματα πρέπει να τα κάνουμε μία φόρα για να πιστοποιήσουμε ότι θέλουμε να διαχειριζόμαστε τον λογαριασμό που έχουμε στο Windows Azure μέσω του συγκεκριμένου Η/Υ.
    Από την στιγμή που έχουμε πιστοποιήσει, τον συγκεκριμένο Η/Υ για την διαχείριση του Windows Azure, μπορούμε να ξεκινήσουμε.
    Ξεκινάμε πάντα με την επιλογή της συνδρομής που θα διαχειριστούμε καθώς και του λογαριασμού Storage στον οποίο θέλουμε να αποθηκευτούν τα απαραίτητα δεδομένα.
    Για να δούμε όλες τις συνδρομές που έχουμε, τρέχουμε την εντολή
    Get-AzureSubscriptionΕάν θέλουμε να δώσουμε ένα πιο φιλικό όνομα στην συνδρομή μας, χρησιμοποιούμε την
    Set-AzureSubscription
    Τέλος μέσω της εντολής
    Select-AzureSubscription
    Επιλέγουμε την συνδρομή την οποία θα διαχειριστούμε
    The post Διαχείριση του Windows Azure μέσω PowerShell appeared first on Vaggelis Kappas.
     
    Source
  20. kavag
    Στο προηγούμενο άρθρο είχαμε δει τι είναι το Windows Azure Storage και από τους τύπους αποθηκευτικών χώρων (Storage) που διαθέτει το Windows Azure, είχαμε επικεντρωθεί στον τύπο Blob Storage.
    Σε αυτό το άρθρο, θα δούμε πως μπορούμε να δημιουργήσουμε Storage Accounts και Containers και να αποθηκεύσουμε αρχεία (blob) σε αυτά, από τον υπολογιστή μας μέσω του PowerShell.
     
    Για την διαχείριση της συνδρομής μας στο Windows Azure μέσω PowerShell, απαραίτητο είναι να κάνουμε τις ενέργειες και τα βήματα που είχαμε αναλύσει σε άλλο άρθρο που θα βρείτε εδώ.
    Επιλέγουμε λοιπόν την συνδρομή που θα διαχειριστούμε, με την εντολή
    Select-AzureSubscription

    Και μετά μπορούμε να δημιουργήσουμε ένα Storage Account, με την εντολή
    New-AzureStorageAccount –StorageAccountName
    Όπως βλέπουμε, θα χρειαστεί να δώσουμε ένα όνομα για το νέο account, το οποίο θα πρέπει να είναι διαθέσιμο. Ευτυχώς μπορούμε να κάνουμε έλεγχο για την διαθεσιμότητα ή όχι ενός ονόματος με την εντολή
    Test-AzureName –Storage “όνομα”
    Η εντολή επιστρέφει, True, εάν το όνομα χρησιμοποιείται και False εάν είναι διαθέσιμο.
    Αφού λοιπόν κάνουμε τον απαιτούμενο έλεγχο για την διαθεσιμότητα του ονόματος, δημιουργούμε το Storage Account
    Σε αυτό το Storage Account, θα δημιουργήσουμε ένα container με την εντολή
    New-AzureStorageContainer
    Για να δούμε όλα τα διαθέσιμα Containers, στο Storage Account που έχουμε χρησιμοποιούμε την εντολή
    Get-AzureStorageContainer
    Αφού δημιουργήσαμε το Storage Account και το Storage Container, μπορούμε να αποθηκεύσουμε στο Container ένα αρχείο Blob.
    Εδώ πρέπει να πούμε ότι στην παρούσα φάση, μέσω PowerShell, μπορούμε να ανεβάσουμε αρχεία VHD.
    Η μεταφορά από και προς το Storage Container που έχουμε δημιουργήσει γίνεται μέσω της εντολής
    Add-AzureVhd –LocalFilePath –Source –Destination
    Kάθε φορά εναλλάσσοντας το Source και το Destination, μπορούμε είτε να ανεβάζουμε αρχεία VHD στο Windows Azure είτε να κατεβάζουμε.
    Είδαμε λοιπόν, πως μπορούμε να διαχειριστούμε το Windows Azure Storage μέσω PowerShell.
    Εκτός όμως από το PowerShell, μπορούμε να διαχειριστούμε το Windows Azure Storage και μέσω προγραμμάτων με γραφικό περιβάλλον τρίτων κατασκευαστών. Ένα τέτοιο πρόγραμμα είναι και το CloudXplorer, της ClumsyLeaf Software η προηγούμενη έκδοση του οποίου διατίθεται δωρεάν. Μπορείτε να κατεβάσετε αυτήν την έκδοση από εδώ
    http://clumsyleaf.com/products/cloudxplorer
    Αφού κάνουμε την εγκατάσταση πρέπει να δηλώσουμε τον λογαριασμό που έχουμε δημιουργήσει και για να το κάνουμε αυτό θα χρειαστούμε το κατάλληλο κλειδί
    Μετά την προσθήκη του λογαριασμού, μπορούμε με γραφικό τρόπο να διαχειριστούμε το Windows Azure Storage.
     
    The post Διαχειριστείτε το Windows Azure Storage εύκολα και γρήγορα με το PowerShell appeared first on Vaggelis Kappas.
     
    Source
  21. kavag
    To Windows Azure Virtual Network, μας επιτρέπει να επεκτείνουμε το δίκτυο της επιχείρησης μας στο Cloud, έχοντας όμως πλήρη έλεγχο στα χαρακτηριστικά του, όπως η τοπολογία, οι DNS Servers, οι διευθύνσεις IP κ.λ.π.
    Μπορούμε λοιπόν, να πετύχουμε τα ακόλουθα :
    Να φτιάξουμε ένα ιδιωτικό δίκτυο και υποδίκτυα, με διευθύνσεις που ορίζονται στο RFC1918 και είναι της μορφής :
    10.0.0.0 – 10.255.255.255 (10/8 prefix)
    172.16.0.0 – 172.31.255.255 (172.16/12 prefix)
    192.168.0.0 – 192.168.255.255 (192.168/16 prefix

     
    Να συνδέσουμε αυτό το δίκτυο με το δίκτυο της επιχείρησης, μέσω κρυπτογραφημένης και ασφαλούς σύνδεσης VPN.
    Να ορίσουμε τους δικούς μας DNS Servers για όλες τις υπηρεσίες και τα Virtual Machines που θα συνδέσουμε σε αυτό το Virtual Network.
    Όπως φαίνεται, με το Windows Azure Virtual Network έχουμε μεγάλη ευελιξία και μπορούμε να υλοποιήσουμε το δίκτυο καθώς και τα υποδίκτυα που αυτό περιλαμβάνει και μάλιστα με τα χαρακτηριστικά που θέλουμε έτσι ώστε να το εντάξουμε στις ανάγκες της επιχείρησης μας.
    Εάν σε όλα τα παραπάνω προσθέσουμε και την δυνατότητα να φτιάξουμε το δίκτυο που θέλουμε μέσω του PowerShell, τότε οι δυνατότητες μας μεγιστοποιούνται. Στο άρθρο αυτό θα δούμε πως μπορούμε να φτιάξουμε ένα Virtual Network στο Windows Azure μέσω του PowerShell.
    Το δίκτυο που θα φτιάξουμε στο Windows Azure όπως και κάθε δίκτυο, για να ενταχθεί στο εταιρικό περιβάλλον, χρειάζεται αναλυτικό και λεπτομερή σχεδιασμό. Ο αναλυτικός σχεδιασμός θα μας βοηθήσει να αποφύγουμε προβλήματα και δυσλειτουργίες τώρα αλλά και στο μέλλον.
    Έστω λοιπόν ότι θέλουμε να υλοποιήσουμε το δίκτυο που βλέπουμε στο διάγραμμα :
    Με βάση το διάγραμμα του δικτύου και των υποδικτύων που περιλαμβάνει καθώς και της διασύνδεσης με το δίκτυο της επιχείρησης μέσω της σύνδεσης VPN, μπορούμε να δημιουργήσουμε το κατάλληλο αρχείο ρυθμίσεων (configuration file). Λεπτομέρειες σχετικά με την μορφή αυτού του configuration file καθώς και πληροφορίες για τα τμήματα που περιλαμβάνει θα βρούμε εδώ :
    Windows Azure Virtual Network Configuration Schema
    Για την συγκεκριμένη περίπτωση, το configuration file που χρησιμοποιήθηκε είναι το εξής :
    <?xml version="1.0" encoding="utf-8"?><NetworkConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration"> <VirtualNetworkConfiguration> <Dns> <DnsServers> <DnsServer name="HQ-DNS" IPAddress="10.1.0.50" /> </DnsServers> </Dns> <LocalNetworkSites> <LocalNetworkSite name="HQ-NET"> <AddressSpace> <AddressPrefix>10.1.0.0/24</AddressPrefix> </AddressSpace> <VPNGatewayAddress>62.103.212.215</VPNGatewayAddress> </LocalNetworkSite> </LocalNetworkSites> <VirtualNetworkSites> <VirtualNetworkSite name="Azure-VNET" AffinityGroup="AutoexecLABS"> <AddressSpace> <AddressPrefix>10.10.0.0/16</AddressPrefix> </AddressSpace> <Subnets> <Subnet name="Front-Net"> <AddressPrefix>10.10.1.0/24</AddressPrefix> </Subnet> <Subnet name="APPs-Net"> <AddressPrefix>10.10.2.0/24</AddressPrefix> </Subnet> <Subnet name="DB-Net"> <AddressPrefix>10.10.3.0/24</AddressPrefix> </Subnet> <Subnet name="ADDS-Net"> <AddressPrefix>10.10.4.0/24</AddressPrefix> </Subnet> <Subnet name="GatewaySubnet"> <AddressPrefix>10.10.10.8/29</AddressPrefix> </Subnet> </Subnets> <DnsServersRef> <DnsServerRef name="HQ-DNS" /> </DnsServersRef> <Gateway> <ConnectionsToLocalNetwork> <LocalNetworkSiteRef name="HQ-NET" /> </ConnectionsToLocalNetwork> </Gateway> </VirtualNetworkSite> </VirtualNetworkSites> </VirtualNetworkConfiguration></NetworkConfiguration>
    Αυτό το configuration file, μπορούμε να το εισάγουμε στο Windows Azure μέσω του management portal και του PowerShell, εμείς θα το κάνουμε μέσω του PowerShell.
    Για την διαχείριση του Windows Azure μέσω του PowerShell , θα πρέπει στο περιβάλλον που χρησιμοποιούμε, να έχουν προηγηθεί τα βήματα που αναφέρονται στο άρθρο :
    Διαχείριση του Windows Azure μέσω PowerShell
    Έτσι τρέχοντας το παρακάτω Script, δημιουργούμε το Windows Azure Virtual Network
    $ConfigPath = "C:inlineBlogPostsWindows AzureVNETVnet.xml"Set-AzureVNetConfig -ConfigurationPath $ConfigPath
    Από το Management Portal, μπορούμε να κάνουμε έλεγχο στις παραμέτρους του Virtual Network που δημιουργήθηκε
    Μπορούμε να δούμε τον DNS Server που προσθέσαμε
    Ενώ όπως βλέπουμε, το Gateway για την VPN διασύνδεση με τα κεντρικά δεν έχει δημιουργηθεί
    Το δημιουργούμε με την εντολή New-AzureVNetGateway, ως εξής
    Όταν δημιουργηθεί το Gateway, έχουμε την παρακάτω εικόνα
    Τέλος μπορούμε να δούμε όλα τα υποδίκτυα που έχουν δημιουργηθεί στο Windows Azure Virtual NetworkΕίδαμε λοιπόν πως μπορούμε, μέσω του κατάλληλου σχεδιασμού και ενός αρχείου ρυθμίσεων
    να φτιάξουμε ένα εκτεταμένο δίκτυο με υποδίκτυα στο Windows Azure το οποίο να συμπεριλαμβάνει και VPN διασύνδεση με το δίκτυο της επιχείρησης.
    The post Δικτυωθείτε, φτιάξτε ένα Virtual Network στο Windows Azure appeared first on Vaggelis Kappas.
     
    Source
  22. kavag
    3. Έλεγχος αντοχής προστασίας τύπου Parity
    Στο τρίτο και τελευταίο μέρος αυτού του blogpost θα ασχοληθούμε με τον έλεγχο της αντοχής ενός Storage Space με επίπεδο προστασίας Parity, που είναι κάτι αντίστοιχο με το γνωστό μας RAID 5.
    Στην περίπτωση αυτού του επιπέδου ασφαλείας, του Parity, o ελάχιστος αριθμός σκληρών δίσκων για την υλοποίηση είναι τρεις (3), ενώ προσφέρεται προστασία των δεδομένων στην περίπτωση βλάβης ενός δίσκου.3.1 Δημιουργία δίσκων
    Το πρώτο βήμα είναι η δημιουργία των σκληρών δίσκων και η προσθήκη τους στο σύστημα των δοκιμών που είναι ένα Virtual Machine με λειτουργικό σύστημα Windows Server 2012R2.
     
    Για να γίνει αυτό θα χρησιμοποιήσουμε το PowerShell και τις παρακάτω εντολές στον Hyper-V host.
    # Create three VHDXs1..3| %{New-VHD -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-$_.vhdx" -SizeBytes 20GB -Dynamic}# Attach VHDX disks to a VM1..3|%{Add-VMHardDiskDrive -VMName W2012R2 -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-$_.vhdx" -ControllerType SCSI}
    Διαπιστώνουμε τόσο την δημιουργία των δίσκων όσο και την σύνδεση τους στο VM, με την Get-PhysicalDisk στο VM
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size------------ ------- ----------------- ------------ ----- ----PhysicalDisk3 True OK Healthy Auto-Select 20 GBPhysicalDisk0 False OK Healthy Auto-Select 127 GBPhysicalDisk2 True OK Healthy Auto-Select 20 GBPhysicalDisk1 True OK Healthy Auto-Select 20 GB 3.2 Δημιουργία Storage Pool
    Αφού δημιουργήσαμε τους σκληρούς δίσκους και τους συνδέσαμε στο VM, φτιάχνουμε το Storage Pool με τις παρακάτω εντολές στο VM
    # Create Storage Pool$disks=Get-PhysicalDisk -CanPool $true$StorSubSys=Get-StorageSubSystem -FriendlyName *Spaces*New-StoragePool -FriendlyName StorPool01 -PhysicalDisks $disks -StorageSubSystemFriendlyName $StorSubSys.FriendlyName
    Πιστοποιούμε την ολοκλήρωση του Storage Pool, με την παρακάτω εντολή στο VM
    PS C:> Get-StoragePool | ft -AutoSizeFriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly------------ ----------------- ------------ ------------ ----------StorPool01 OK Healthy False FalsePrimordial OK Healthy True False 3.3 Υλοποίηση Storage Space
    Αφού ολοκληρώθηκε η δημιουργία του Storage Pool, μπορούμε να φτιάξουμε το Storage Space με το επίπεδο ασφάλειας που επιθυμούμε. Στην συγκεκριμένη περίπτωση θα δημιουργήσουμε ένα Parity Storage Space, με τις εξής εντολές στο VM
    # Create Storage Space (Parity)$StorPool=Get-StoragePool -FriendlyName StorPool01Set-ResiliencySetting -StoragePool $StorPool -Name Parity -AutoNumberOfColumns$StorPool | New-VirtualDisk -FriendlyName StorSpace01 -ResiliencySettingName Parity -UseMaximumSize
    To Storage Space που δημιουργήθηκε είναι ένας νέος δίσκος για το σύστημα μας, ο οποίος χρειάζεται αρχικοποίηση (initialization), δημιουργία partition και format, κατά τα γνωστά.
    # Assign Drive Letter and format new drive$DiskNo = (Get-VirtualDisk -FriendlyName StorSpace01 | Get-Disk).NumberSet-Disk -Number $DiskNo -IsReadOnly 0Set-Disk -Number $DiskNo -IsOffline 0Initialize-Disk -Number $DiskNo -PartitionStyle MBRNew-Partition -DiskNumber $DiskNo -DriveLetter S -UseMaximumSizeInitialize-Volume -DriveLetter S -FileSystem NTFS -Confirm:$false
    Εάν θέλουμε να δούμε την κατάσταση του Storage Space, του partition και των φυσικών δίσκων πάνω στους οποίους έχουν δημιουργηθεί, τότε χρησιμοποιούμε την παρακάτω εντολή
    # Display Physical Disks that construct a volumeGet-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft –AutoSize
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size------------ ------- ----------------- ------------ ----- ----PhysicalDisk3 False OK Healthy Auto-Select 19.25 GBPhysicalDisk2 False OK Healthy Auto-Select 19.25 GBPhysicalDisk1 False OK Healthy Auto-Select 19.25 GBPS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSizeFriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size------------ --------------------- ----------------- ------------ -------------- ----StorSpace01 Parity OK Healthy False 36 GB 3.4 Προσομοίωση βλάβης δίσκου
    Θα προσομοιώσουμε την βλάβη ενός δίσκου της συστοιχίας Parity και θα παρατηρήσουμε την συμπεριφορά του Storage Pool και του Storage Space.
    Οι ενέργειες που θα γίνουν θα είναι οι εξής
    Αφαίρεση δίσκου
    Επαναφορά δίσκου
    Αφαίρεση και αντικατάσταση με νέο
    Προσθήκη του χαλασμένου δίσκου μετά την αντικατάσταση
    3.4.1 Αφαίρεση
    Η αφαίρεση του δίσκου, γίνεται με την παρακάτω εντολή στον Hyper-V Host
    # Remove a DiskRemove-VMHardDiskDrive -VMName W2012R2 -ControllerNumber 0 -ControllerLocation 2 -ControllerType SCSI
    Στο guest VM, διαπιστώνουμε την βλάβη, ως εξής
    ]PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size------------ ------- ----------------- ------------ ----- ----PhysicalDisk3 False OK Healthy Auto-Select 19.25 GBPhysicalDisk0 False OK Healthy Auto-Select 127 GBPhysicalDisk2 False OK Healthy Auto-Select 19.25 GBPhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    Ενώ έχουμε και εγγραφές στο System Event Log
    PS C:Windowssystem32> Get-EventLog -LogName System -Source Disk | flIndex : 1065EntryType : WarningInstanceId : 2147745949Message : Disk 1 has been surprise removed.Category : (0)CategoryNumber : 0ReplacementStrings : {DeviceHarddisk1DR5, 1}Source : diskTimeGenerated : 25/6/2014 4:59:12 μμTimeWritten : 25/6/2014 4:59:12 μμUserName :
    Η κατάσταση του Storage Pool είναι η εξής
    ]PS C:> Get-StoragePool | ft -AutoSizeFriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly------------ ----------------- ------------ ------------ ----------StorPool01 Degraded Warning False FalsePrimordial OK Healthy True False
    Η κατάσταση του Storage Space είναι η εξής
    ]PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSizeFriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size------------ --------------------- ----------------- ------------ -------------- ----StorSpace01 Parity Incomplete Warning False 36 GB

    Μετά την αφαίρεση του δίσκου λοιπόν, το Storage Pool είναι Degraded (υποβαθμισμένο) και το Storage Space είναι σε κατάσταση προειδοποίησης (Warning).
    Η λειτουργική κατάσταση όμως του Storage Space με βαθμό προστασίας Parityμετά την αφαίρεση του δίσκου, είναι καλή και τα δεδομένα που είναι αποθηκευμένα εκεί είναι διαθέσιμα.3.4.2 Επαναφορά
    Για την επαναφορά του δίσκου που αφαιρέθηκε παραπάνω, χρησιμοποιούμε την παρακάτω εντολή στον Hyper-V host
    # Reconnect the disk drivesAdd-VMHardDiskDrive -VMName W2012R2 -Path 'C:Hyper-VW2012R2Virtual Hard DisksDisk-1.vhdx' -ControllerType SCSI
    Στο Guest VM παρατηρούμε την κατάσταση των φυσικών δίσκων
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size------------ ------- ----------------- ------------ ----- ----PhysicalDisk2 False OK Healthy Auto-Select 19.25 GBPhysicalDisk0 False OK Healthy Auto-Select 127 GBPhysicalDisk1 False OK Healthy Auto-Select 19.25 GBPhysicalDisk4 False OK Healthy Auto-Select 19.25 GB
    Η κατάσταση του Storage Pool είναι
    PS C:> Get-StoragePool | ft -AutoSizeFriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly------------ ----------------- ------------ ------------ ----------StorPool01 OK Healthy False FalsePrimordial OK Healthy True False
    Και του Storage Space
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSizeFriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size------------ --------------------- ----------------- ------------ -------------- ----StorSpace01 Parity OK Healthy False 36 GB
    Επομένως το Storage Subsystem και συγκεκριμένα τα Storage Spaces, κατάλαβαν την επανασύνδεση του δίσκου και έκαναν όλες τις απαραίτητες ενέργειες αποκατάστασης ώστε η κατάσταση της συστοιχίας να είναι και πάλι Healthy.
    Όλες αυτές οι ενέργειες έγιναν στο παρασκήνιο, ενώ τα δεδομένα μας ήταν συνεχώς διαθέσιμα.3.4.3 Αφαίρεση και αντικατάσταση με νέο
    Στην παράγραφο αυτή θα προσομοιώσουμε την βλάβη ενός δίσκου, τον οποίο στην συνέχεια θα αντικαταστήσουμε με έναν καινούριο.
    Για την αφαίρεση του δίσκου, χρησιμοποιούμε την παρακάτω εντολή στον Hyper-V Host
    # Remove a DiskRemove-VMHardDiskDrive -VMName W2012R2 -ControllerNumber 0 -ControllerLocation 2 -ControllerType SCSI
    Στο Guest VM διαπιστώνουμε την βλάβη με τους τρόπους που παρουσιάστηκαν στην προηγούμενη παράγραφο 3.4.1 Αφαίρεση.
    Η κατάσταση λοιπόν της συστοιχίας είναι η εξής
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSizeFriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size------------ --------------------- ----------------- ------------ -------------- ----StorSpace01 Parity Incomplete Warning False 36 GB
    Για να αντικαταστήσουμε τον «χαλασμένο» δίσκο, θα δημιουργήσουμε έναν καινούριο, τον οποίο μετά θα τον συνδέσουμε στο Guest VM. Οι παρακάτω εντολές στον Hyper-VHost, θα κάνουν τις ενέργειες αυτές.
    # New Disk creationNew-VHD -Path 'C:Hyper-VW2012R2Virtual Hard DisksDisk-1-New.vhdx' -SizeBytes 20GB -Dynamic# Add new disk to VMAdd-VMHardDiskDrive -VMName W2012R2 -Path 'C:Hyper-VW2012R2Virtual Hard DisksDisk-1-New.vhdx' -ControllerType SCSI -ControllerNumber 0
    Ο νέος δίσκος εμφανίζεται στο Guest VM, όπως φαίνεται παρακάτω
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size------------ ------- ----------------- ------------ ----- ----PhysicalDisk2 False OK Healthy Auto-Select 19.25 GBPhysicalDisk4 True OK Healthy Auto-Select 20 GBPhysicalDisk0 False OK Healthy Auto-Select 127 GBPhysicalDisk1 False OK Healthy Auto-Select 19.25 GBPhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    Ο νέος δίσκος είναι στην διάθεση μας και μπορούμε να τον προσθέσουμε στο Storage Pool και να ξεκινήσει η διαδικασία της αποκατάστασης της συστοιχίας.
    Για να ξεκινήσει όμως η επιδιόρθωση της συστοιχίας θα πρέπει να αφαιρεθεί ο χαλασμένος δίσκος από το Storage Pool και να προστεθεί ο καινούριος. Αυτό γίνεται με τις εξής εντολές στο Guest VM
    Get-PhysicalDisk | where OperationalStatus -like Lost* | Set-PhysicalDisk -Usage RetiredPS C:Windowssystem32> Get-PhysicalDisk | where OperationalStatus -like Lost* | Set-PhysicalDisk -Usage RetiredPS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size------------ ------- ----------------- ------------ ----- ----PhysicalDisk2 False OK Healthy Auto-Select 19.25 GBPhysicalDisk4 True OK Healthy Auto-Select 20 GBPhysicalDisk0 False OK Healthy Auto-Select 127 GBPhysicalDisk1 False OK Healthy Auto-Select 19.25 GBPhysicalDisk-1 False Lost Communication Warning Retired 19.25 GB
    Αφού θέσουμε τον «χαλασμένο» δίσκο σε κατάσταση Retired, προσθέτουμε τον νέο δίσκο στο Storage Pool με την παρακάτω εντολή στο Guest VM
    # Add New disk to Storage PoolAdd-PhysicalDisk -StoragePoolFriendlyName StorPool01 -PhysicalDisks (Get-PhysicalDisk -CanPool $true)
    Ενώ για να ξεκινήσει η διαδικασία της αποκατάστασης εκτελούμε την παρακάτω εντολή στο Guest VM
    # Repair Storage SpaceRepair-VirtualDisk -FriendlyName StorSpace01
    Με την ολοκλήρωση της αποκατάστασης, η λειτουργική κατάσταση του Storage Space είναι και πάλι καλή (Healthy).
    PS C:Windowssystem32> Repair-VirtualDisk -FriendlyName StorSpace01PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSizeFriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size------------ --------------------- ----------------- ------------ -------------- ----StorSpace01 Parity OK Healthy False 36 GB
    Ελέγχοντας όμως το Storage Pool, παρατηρούμε ότι είναι σε κατάσταση Degraded (υποβαθμισμένο)
    PS C:> Get-StoragePool | ft -AutoSizeFriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly------------ ----------------- ------------ ------------ ----------StorPool01 Degraded Warning False FalsePrimordial OK Healthy True False
    Αυτό συμβαίνει γιατί περιλαμβάνει και τους δίσκους που έχουν χαλάσει και έχουν αντικατασταθεί
    PS C:Windowssystem32> Get-StoragePool -FriendlyName StorPool01 | Get-PhysicalDisk| ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size----------- ------- ----------------- ------------ ----- ----PhysicalDisk2 False OK Healthy Auto-Select 19.25 GBPhysicalDisk4 False OK Healthy Auto-Select 19.25 GBPhysicalDisk1 False OK Healthy Auto-Select 19.25 GBPhysicalDisk-1 False Lost Communication Warning Retired 19.25 GB
    Όμως αυτόν τον δίσκο μπορούμε να τον αφαιρέσουμε εύκολα από το Storage Pool ως εξής
    # Remove Failed DisksRemove-PhysicalDisk -StoragePoolFriendlyName StorPool01 -PhysicalDisks (Get-PhysicalDisk | where OperationalStatus -like Lost*)
    Μετά την αφαίρεση η κατάσταση του Storage Pool είναι και πάλι Healthy
    PS C:Windowssystem32> Get-StoragePool | ft -AutoSizeFriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly------------ ----------------- ------------ ------------ ----------StorPool01 OK Healthy False FalsePrimordial OK Healthy True False
    Είναι βέβαια περιττό να αναφέρουμε , ότι όλες αυτές οι ενέργειες γίνονταν στο παρασκήνιο ενώ τα δεδομένα μας είναι διαρκώς διαθέσιμα.3.4.4 Προσθήκη του χαλασμένου δίσκου μετά την αντικατάσταση του
    Στην δοκιμή αυτή θα εξετάσουμε εάν υπάρχει κάποια επίπτωση στην λειτουργική κατάσταση του storage Space, στην περίπτωση που ο χαλασμένος δίσκος αφού αφαιρέθηκε και αντικαταστάθηκε με νέο, επανασυνδεθεί στο Guest VM.
    Ξεκινάμε λοιπόν με την προσθήκη του δίσκου, εκτελώντας στον Hyper-V host την εξής εντολή
    # Reconnect the disk drivesAdd-VMHardDiskDrive -VMName W2012R2 -Path 'C:Hyper-VW2012R2Virtual Hard DisksDisk-1.vhdx' -ControllerType SCSI
    Με την προσθήκη του δίσκου, στο Guest VM έχουμε την εξής εικόνα
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSizeFriendlyName CanPool OperationalStatus HealthStatus Usage Size------------ ------- ----------------- ------------ ----- ----PhysicalDisk2 False OK Healthy Auto-Select 19.25 GBPhysicalDisk4 False OK Healthy Auto-Select 19.25 GBPhysicalDisk0 False OK Healthy Auto-Select 127 GBPhysicalDisk1 False OK Healthy Auto-Select 19.25 GBPhysicalDisk5 False Unrecognized Metadata Unhealthy Unknown 20 GB
    Παρατηρούμε λοιπόν ότι ο δίσκος αναγνωρίζεται ως Unhealthy με Unrecognized Metadata, δεδομένα δηλαδή των οποίων την περιγραφή δεν φαίνεται να την γνωρίζει το VM.
    Η επανασύνδεση του δίσκου δεν είχε καμία απολύτως επίπτωση στην λειτουργική κατάσταση του Storage Space, όπως φαίνεται και παρακάτω
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSizeFriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size------------ --------------------- ----------------- ------------ -------------- ----StorSpace01 Parity OK Healthy False 36 GB
    Στην περίπτωση που θέλουμε να χρησιμοποιήσουμε αυτούς τους δίσκους θα πρέπει να κάνουμε επαναφορά (reset) της κατάστασης τους, ως εξής
    Get-PhysicalDisk | where OperationalStatus -like Unrecognized* | Reset-PhysicalDisk 3.5 Βλάβη δύο (2) δίσκων δίσκων
    Όπως αναφέραμε στην αρχή, το Storage Space με προστασία τύπου Parity επιτρέπει την απρόσκοπτη λειτουργία σε περίπτωση βλάβης ενός δίσκου. Εάν υποστούν βλάβη περισσότεροι του ενός δίσκοι, τότε αναμένεται η συστοιχία να μην λειτουργεί και τα δεδομένα που είναι αποθηκευμένα επάνω της να μην είναι διαθέσιμα.
    Αφαιρώντας λοιπόν δύο δίσκους με την παρακάτω εντολή στον Hyper-V host
    # Remove two disks3..4 | %{Remove-VMHardDiskDrive -VMName W2012R2 -ControllerNumber 0 -ControllerLocation $_ -ControllerType SCSI}
    Παρατηρούμε ότι το Storage Pool είναι σε κατάσταση εκτεταμένης βλάβης
    PS C:Windowssystem32> Get-StoragePool | ft -AutoSizeFriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly------------ ----------------- ------------ ------------ ----------StorPool01 Read-only Unhealthy False FalsePrimordial OK Healthy True False
    Ενώ το Storage Space δεν υπάρχει
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft -AutoSize
    Get-Volume : No MSFT_Volume objects found with property ‘DriveLetter’ equal to ‘S’. Verify the value of the property and r
    At line:1 char:1
    + Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | f …
    + ~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (S:Char) [Get-Volume], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_DriveLetter,Get-Volume
    Εάν επανασυνδέσουμε τους δίσκους στο VM τότε το Storage Pool και το Storage Space θα έρθουν και πάλι σε καλή λειτουργική κατάσταση.
    The post Έλεγχος αντοχής των Storage Spaces με την χρήση του PowerShell (Parity) appeared first on Vaggelis Kappas.
     
    Source
  23. kavag
    2. Έλεγχος αντοχής Three-Way Mirroring
    Στο δεύτερο μέρος αυτού του blogpost θα ασχοληθούμε με τον έλεγχο της αντοχής ενός Storage Space με επίπεδο προστασίας Three-Way Mirroring.
    Για την υλοποίηση αυτού του Storage Space, o ελάχιστος αριθμός σκληρών δίσκων που θα χρειαστούν είναι πέντε (5), ενώ η ακεραιότητα των δεδομένων εξασφαλίζεται ακόμη και στην περίπτωση βλάβης δύο (2) δίσκων.
    2.1 Δημιουργία δίσκων
    Όπως αναλύσαμε στο προηγούμενο άρθρο, το κάθε Storage Space δημιουργείται επί ενός Storage Pool το οποίο με την σειρά του περιλαμβάνει τους σκληρούς δίσκους του συστήματος.
    Το πρώτο βήμα λοιπόν, είναι η δημιουργία αυτών των σκληρών δίσκων και η προσθήκη τους στο σύστημα των δοκιμών με λειτουργικό σύστημα Windows Server 2012R2.
    Τους δίσκους τους δημιουργούμε και τους συνδέουμε με το VM των δοκιμών μας, εύκολα και απλά μέσω του PowerShell και των παρακάτω εντολών στον Hyper-V host.
    # Create five VHDX1..5| %{New-VHD -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-$_.vhdx" -SizeBytes 20GB -Dynamic}# Attach VHDX disks to a VM1..5|%{Add-VMHardDiskDrive -VMName W2012R2 -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-$_.vhdx" -ControllerType SCSI}
    Διαπιστώνουμε τόσο την δημιουργία των δίσκων όσο και την σύνδεση τους στο VM, με την Get-PhysicalDisk στο VM
    PS C:> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk2 True OK Healthy Auto-Select 20 GB
    PhysicalDisk3 True OK Healthy Auto-Select 20 GB
    PhysicalDisk0 False OK Healthy Auto-Select 127 GB
    PhysicalDisk5 True OK Healthy Auto-Select 20 GB
    PhysicalDisk1 True OK Healthy Auto-Select 20 GB
    PhysicalDisk4 True OK Healthy Auto-Select 20 GB2.2 Δημιουργία Storage Pool
    Αφού δημιουργήσαμε τους σκληρούς δίσκους και τους συνδέσαμε στο VM, φτιάχνουμε το Storage Pool με τις παρακάτω εντολές στο VM
    # Create Storage Pool$disks=Get-PhysicalDisk -CanPool $true$StorSubSys=Get-StorageSubSystem -FriendlyName *Spaces*New-StoragePool -FriendlyName StorPool01 -PhysicalDisks $disks -StorageSubSystemFriendlyName $StorSubSys.FriendlyName
    Πιστοποιούμε την ολοκλήρωση του Storage Pool, με την παρακάτω εντολή στο VM
    PS C:> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool01 OK Healthy False False
    Primordial OK Healthy True False2.3 Υλοποίηση Storage Space
    Αφού ολοκληρώθηκε η δημιουργία του Storage Pool, μπορούμε να φτιάξουμε το Storage Space με το επίπεδο ασφάλειας που επιθυμούμε. Στην συγκεκριμένη περίπτωση θα δημιουργήσουμε ένα Three-Way Mirror, με τις εξής εντολές στο VM
    # Create Storage Space$StorPool=Get-StoragePool -FriendlyName StorPool01Set-ResiliencySetting -StoragePool $StorPool -Name Mirror -NumberOfColumnsDefault 1 -NumberOfDataCopiesDefault 3$StorPool | New-VirtualDisk -FriendlyName StorSpace01 -ResiliencySettingName Mirror -UseMaximumSize
    To Storage Space που δημιουργήθηκε είναι ένας νέος δίσκος για το σύστημα μας, ο οποίος χρειάζεται αρχικοποίηση (initialization), δημιουργία partition και format, κατά τα γνωστά.
    # Assign Drive Letter and format new drive$DiskNo = (Get-VirtualDisk -FriendlyName StorSpace01 | Get-Disk).NumberSet-Disk -Number $DiskNo -IsReadOnly 0Set-Disk -Number $DiskNo -IsOffline 0Initialize-Disk -Number $DiskNo -PartitionStyle MBRNew-Partition -DiskNumber $DiskNo -DriveLetter S -UseMaximumSizeInitialize-Volume -DriveLetter S -FileSystem NTFS -Confirm:$false
    Εάν θέλουμε να δούμε την κατάσταση του StorageSpace, του partition και των φυσικών δίσκων πάνω στους οποίους έχουν δημιουργηθεί, τότε χρησιμοποιούμε την παρακάτω εντολή
    # Display Physical Disks that construct a volumeGet-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft –AutoSize
    PS C:> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk5 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk4 False OK Healthy Auto-Select 19.25 GB2.4 Συμπεριφορά σε βλάβη
    Όπως είπαμε και στην αρχή, τα δεδομένα που είναι αποθηκευμένα στο Storage Space με προστασία Three-Way Mirror, είναι εξασφαλισμένα ακόμη και στην περίπτωση βλάβης δύο δίσκων.
    Θα προσομοιώσουμε λοιπόν την βλάβη δύο δίσκων της συστοιχίας Three-Way Mirror και θα παρατηρήσουμε την συμπεριφορά του Storage Pool και του Storage Space.
    Οι ενέργειες που θα γίνουν θα είναι οι εξής
    Αφαίρεση δίσκων
    Επαναφορά δίσκων
    Αφαίρεση και αντικατάσταση με νέους δίσκους
    Προσθήκη του χαλασμένων δίσκων, μετά την αντικατάσταση τους
    2.4.1 Αφαίρεση
    Η αφαίρεση των δίσκων και συγκεκριμένα των δύο τελευταίων, γίνεται με την παρακάτω εντολή στον Hyper-V Host
    # Remove two disks5..6 | %{Remove-VMHardDiskDrive -VMName W2012R2 -ControllerNumber 0 -ControllerLocation $_ -ControllerType SCSI}
    Στο Guest VM, διαπιστώνουμε την βλάβη των δίσκων, ως εξής
    PS C:> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 127 GB
    PhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    Ενώ έχουμε και εγγραφές στο SystemEventLog
    PS C:> Get-EventLog -LogName System -Source Disk | fl
    Index : 649
    EntryType : Warning
    InstanceId : 2147745949
    Message : Disk 5 has been surprise removed.
    Category : (0)
    CategoryNumber : 0
    ReplacementStrings : {DeviceHarddisk5DR14, 5}
    Source : disk
    TimeGenerated : 23/6/2014 3:23:44 μμ
    TimeWritten : 23/6/2014 3:23:44 μμ
    UserName :
    Index : 648
    EntryType : Warning
    InstanceId : 2147745949
    Message : Disk 4 has been surprise removed.
    Category : (0)
    CategoryNumber : 0
    ReplacementStrings : {…DR13, 4}
    Source : disk
    TimeGenerated : 23/6/2014 3:23:43 μμ
    TimeWritten : 23/6/2014 3:23:43 μμ
    UserName :
    Η κατάσταση του Storage Pool είναι η εξής
    PS C:> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool01 Degraded Warning False False
    Primordial OK Healthy True False
    Η κατάσταση του Storage Space είναι η εξής
    PS C:> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace01 Mirror Incomplete Warning False 30 GB
    Μετά την αφαίρεση του δίσκου λοιπόν, το Storage Pool είναι Degraded (υποβαθμισμένο) και το Storage Space είναι σε κατάσταση προειδοποίησης (Warning).
    Η λειτουργική κατάσταση όμως του Storage Space με βαθμό προστασίας Three-Way Mirroring μετά την αφαίρεση δύο δίσκων, είναι καλή και τα δεδομένα που είναι αποθηκευμένα εκεί είναι διαθέσιμα.2.4.2 Επαναφορά
    Τους δίσκους που αφαιρέσαμε στην προηγούμενη δοκιμή τους επαναφέρουμε με την παρακάτω εντολή στον Hyper-Vhost
    # Reconnect the disk drives5..6 | %{Add-VMHardDiskDrive -VMName W2012R2 -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-$_.vhdx" -ControllerType SCSI -ControllerNumber 0 -ControllerLocation $_}
    Στο Guest VM παρατηρούμε την κατάσταση των φυσικών δίσκων
    PS C:> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 127 GB
    PhysicalDisk4 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk5 False OK Healthy Auto-Select 19.25 GB
    Η κατάσταση του Storage Pool είναι
    PS C:> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool01 OK Healthy False False
    Primordial OK Healthy True False
    Και του Storage Space
    PS C:> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk4 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk5 False OK Healthy Auto-Select 19.25 GB
    Επομένως το Storage Subsystem και συγκεκριμένα τα Storage Spaces, κατάλαβαν την επανασύνδεση των δίσκων, έκαναν όλες τις απαραίτητες ενέργειες αποκατάστασης και η κατάσταση της συστοιχίας είναι και πάλι Healthy.
    Όλες αυτές οι ενέργειες έγιναν στο παρασκήνιο, ενώ τα δεδομένα μας ήταν συνεχώς διαθέσιμα.2.4.3 Αφαίρεση και αντικατάσταση με νέους δίσκους
    Στην παράγραφο αυτή θα προσομοιώσουμε την ταυτόχρονη βλάβη δύο δίσκων και την αντικατάσταση τους με νέους.
    Για την αφαίρεση των δίσκων, χρησιμοποιούμε την παρακάτω εντολή στον Hyper-VHost
    # Remove two disks5..6 | %{Remove-VMHardDiskDrive -VMName W2012R2 -ControllerNumber 0 -ControllerLocation $_ -ControllerType SCSI}
    Στο Guest VM διαπιστώνουμε την βλάβη με τους τρόπους που παρουσιάστηκαν στην προηγούμενη παράγραφο 2.4.2 Αφαίρεση.
    Η κατάσταση λοιπόν της συστοιχίας είναι η εξής
    PS C:> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace01 Mirror Incomplete Warning False 30 GB
    Για να αντικαταστήσουμε τους προηγούμενους δίσκους με νέους, πρέπει πρώτα να τους δημιουργήσουμε. Αυτό γίνεται με την εξής εντολή στον Hyper-VHost
    1..2| %{New-VHD -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-New-$_.vhdx" -SizeBytes 20GB -Dynamic}
    Ενώ η προσθήκη στο guest VM γίνεται με την παρακάτω εντολή
    1..2|%{Add-VMHardDiskDrive -VMName W2012R2 -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-New-$_.vhdx" -ControllerType SCSI}
    Οι δύο νέοι δίσκοι εμφανίζονται στο Guest VM, όπως φαίνεται παρακάτω
    PS C:> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk5 True OK Healthy Auto-Select 20 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 127 GB
    PhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    PhysicalDisk4 True OK Healthy Auto-Select 20 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    Οι νέοι δίσκοι είναι έτοιμοι να προστεθούν στο StoragePoolκαι να ξεκινήσει η διαδικασία της αποκατάστασης της συστοιχίας.
    Πρώτα όμως θα πρέπει να τοποθετηθούν οι «χαλασμένοι» δίσκοι σε κατάσταση Retired. Αυτό γίνεται στο Guest VM ως εξής
    Get-PhysicalDisk | where OperationalStatus -like Lost* | Set-PhysicalDisk -Usage Retired
    PS C:> Get-PhysicalDisk | where OperationalStatus -like Lost* | Set-PhysicalDisk -Usage Retired
    PS C:> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk5 True OK Healthy Auto-Select 20 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 127 GB
    PhysicalDisk-1 False Lost Communication Warning Retired 19.25 GB
    PhysicalDisk4 True OK Healthy Auto-Select 20 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Retired 19.25 GB
    Προσθέτουμε τους νέους δίσκους στο Storage Pool με την εντολή στο Guest VM
    Add-PhysicalDisk -StoragePoolFriendlyName StorPool01 -PhysicalDisks (Get-PhysicalDisk -CanPool $true)
    Ενώ για να ξεκινήσει η διαδικασία της αποκατάστασης εκτελούμε την παρακάτω εντολή στο Guest VM
    Repair-VirtualDisk -FriendlyName StorSpace01
    Με την ολοκλήρωση της αποκατάστασης, η λειτουργική κατάσταση του Storage Space είναι και πάλι καλή (Healthy).
    PS C:>
    Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace01 Mirror OK Healthy False 30 GB

    Ελέγχοντας το StoragePool, παρατηρούμε ότι είναι σε κατάσταση Degraded (υποβαθμισμένο)
    PS C:> Get-StoragePool | ft -AutoSize

    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool01 Degraded Warning False False
    Primordial OK Healthy True False

    Αυτό συμβαίνει γιατί περιλαμβάνει και τους δίσκους που έχουν χαλάσει και έχουν αντικατασταθεί
    PS C:> Get-StoragePool -FriendlyName StorPool01 | Get-PhysicalDisk| ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk5 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Retired 19.25 GB
    PhysicalDisk4 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Retired 19.25 G
    Τους δίσκους αυτούς μπορούμε να τους αφαιρέσουμε από το Storage Pool ως εξής
    # Remove Failed DisksRemove-PhysicalDisk -StoragePoolFriendlyName StorPool01 -PhysicalDisks (Get-PhysicalDisk | where OperationalStatus -like Lost*)
    Μετά την αφαίρεση η κατάσταση του Storage Pool είναι και πάλι Healthy
    PS C:> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool01 OK Healthy False False
    Primordial OK Healthy True False
    Είναι βέβαια περιττό να αναφέρουμε , ότι όλες αυτές οι ενέργειες γίνονταν στο παρασκήνιο ενώ τα δεδομένα μας είναι διαρκώς διαθέσιμα.2.4.4 Προσθήκη των χαλασμένου δίσκων μετά την αντικατάσταση τους
    Στην δοκιμή αυτή θα εξετάσουμε εάν υπάρχει κάποια επίπτωση στην λειτουργική κατάσταση του Storage Space, στην περίπτωση που οι χαλασμένοι δίσκοι, αφού αφαιρέθηκαν και αντικαταστάθηκαν με νέους, επανασυνδεθούν στο Guest VM.
    Ξεκινάμε λοιπόν με την προσθήκη αυτών των δίσκων εκτελώντας στον Hyper-V host την εξής εντολή
    # Reconnect the disk drives4..5 | %{Add-VMHardDiskDrive -VMName W2012R2 -Path "C:Hyper-VW2012R2Virtual Hard DisksDisk-$_.vhdx" -ControllerType SCSI }
    Αφού προστεθούν οι δίσκοι, στο Guest VM έχουμε την εξής εικόνα
    PS C:> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk5 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 127 GB
    PhysicalDisk7 False Unrecognized Metadata Unhealthy Unknown 20 GB
    PhysicalDisk4 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk8 False Unrecognized Metadata Unhealthy Unknown 20 GB
    Παρατηρούμε λοιπόν ότι οι δίσκοι αναγνωρίζονται ως Unhealthy με Unrecognized Metadata, δεδομένα δηλαδή των οποίων την περιγραφή δεν φαίνεται να την γνωρίζει το VM.
    Η επανασύνδεση αυτών των δίσκων δεν είχε καμία απολύτως επίπτωση στην λειτουργική κατάσταση του StorageSpace, όπως φαίνεται και παρακάτω
    PS C:> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace01 Mirror OK Healthy False 30 GB
    Στην περίπτωση που θέλουμε να χρησιμοποιήσουμε αυτούς τους δίσκους θα πρέπει να κάνουμε επαναφορά (reset) της κατάστασης τους, ως εξής
    Get-PhysicalDisk | where OperationalStatus -like Unrecognized* | Reset-PhysicalDisk 2.5 Βλάβη τριών δίσκων (3) δίσκων
    Όπως αναφέραμε στην αρχή, το Three-Way Mirror επιτρέπει την απρόσκοπτη λειτουργία σε περίπτωση βλάβης μέχρι και δύο δίσκων. Εάν υποστούν βλάβη περισσότεροι από δύο (2) δίσκους τότε αναμένεται η συστοιχία να μην λειτουργεί και τα δεδομένα που είναι αποθηκευμένα επάνω της να μην είναι διαθέσιμα.
    Αφαιρώντας λοιπόν τρεις δίσκους, μέσω των παρακάτω εντολών στον Hyper-Vhost
    # Remove two disks2..4 | %{Remove-VMHardDiskDrive -VMName W2012R2 -ControllerNumber 0 -ControllerLocation $_ -ControllerType SCSI}
    Παρατηρούμε ότι το Storage Pool είναι σε κατάσταση εκτεταμένης βλάβης
    PS C:> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool01 Read-only Unhealthy False False
    Primordial OK Healthy True False
    Ενώ το Storage Space δεν υπάρχει
    PS C:> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft -AutoSize
    Get-Volume : No MSFT_Volume objects found with property ‘DriveLetter’ equal to ‘S’. Verify the value of the property and r
    At line:1 char:1
    + Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | f …
    + ~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (S:Char) [Get-Volume], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_DriveLetter,Get-Volume
    Εάν επανασυνδέσουμε τους δίσκους στο VM τότε το Storage Pool και το Storage Space θα έρθουν και πάλι σε καλή λειτουργική κατάσταση.
    The post Έλεγχος αντοχής των Storage Spaces με την χρήση του PowerShell (Three-Way Mirror) appeared first on Vaggelis Kappas.
     
    Source
  24. kavag
    Γενικά
    Σε αυτό το άρθρο θα κάνουμε έλεγχο της ανθεκτικότητας των Storage Spaces έναντι βλάβης ενός, δύο ή και περισσοτέρων σκληρών δίσκων πάνω στους οποίους έχουν υλοποιηθεί. Θα εξετάσουμε και τα τρία επίπεδα ασφάλειας που προσφέρονται, δηλαδή τα :
    Two Way Mirroring
    Three Way Mirroring και
    Parity

    Υπάρχει μια αντιστοιχία των παραπάνω επιπέδων ασφαλείας με τα γνωστά μας RAID levels, αλλά όχι απόλυτη μια που, όπως θα δούμε, μπορούμε να δημιουργήσουμε ένα Two-Way Mirror με χρήση τριών (3) δίσκων.
    Ένα πλήθος με τις συνηθέστερες ερωτήσεις και τις απαντήσεις τους σχετικά με τα Storage Spaces θα βρείτε στο παρακάτω σύνδεσμο :
    Storage Spaces Frequently Asked Questions (FAQ)
    Ενώ, πολύ χρήσιμος είναι και ο παρακάτω πίνακας στον οποίο παρουσιάζεται ο συσχετισμός των επιπέδων ασφαλείας των Storage Spaces με τον ελάχιστο απαιτούμενο αριθμό δίσκων.Resiliency typeMinimum number of columnsColumn-to-disk correlationMinimum number of disksTwo-way mirror

    1



    1:2



    2

    Three-way mirror

    1



    1:3



    5

    Parity

    3



    1:1



    3



    Για την δημιουργία των Storage Spaces και τους ελέγχους της αντοχής τους, την προσομοίωση δηλαδή της βλάβης, θα χρησιμοποιήσουμε το αγαπημένο μας εργαλείο, το PowerShell, ενώ όλες οι δοκιμές θα διεξαχθούν σε εργαστηριακό περιβάλλον που περιλαμβάνει έναν Windows Server 2012R2 Hyper-V host και ένα Guest VM με Windows Server 2012R21. Έλεγχος αντοχής Two Way Mirroring1.1 Δημιουργία δίσκων
    Για να δημιουργήσουμε τους σκληρούς δίσκους και τους συνδέουμε στο Guest VM, εκτελώντας τις παρακάτω εντολές στον Hyper-V host
    <span style="font-family: verdana,geneva;"># Create three VHDX1..3|%{New-VHD -Path "C:Virtual MachinesW2012R2Virtual Hard DisksDisk-$_.vhdx" -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4KB -SizeBytes 20GB -Dynamic}# Attach VHDX disks to a VM1..3|%{Add-VMHardDiskDrive -VMName W2012R2 -Path "C:Virtual MachinesW2012R2Virtual Hard DisksDisk-$_.vhdx" -ControllerType SCSI}</span> 1.2 Δημιουργία Storage Pool
    Το Storage Space υλοποιείται επάνω σε ένα Storage Pool, που το δημιουργούμε με τις παρακάτω εντολές
    <span style="font-family: verdana,geneva;"># Create Storage Pool$disks = Get-PhysicalDisk -CanPool $true$StorSubSys =Get-StorageSubSystem -FriendlyName *Spaces*New-StoragePool -FriendlyName StorPool-01 -PhysicalDisks $disks -StorageSubSystemFriendlyName $StorSubSys.FriendlyName</span>
    1.3 Υλοποίηση Storage Space
    Έχοντας λοιπόν δημιουργήσει το απαιτούμενο Storage Pool, υλοποιούμε το Two-Way Μirror Storage Space, με το απαιτούμενο partition και το drive letter της επιλογής μας, με τις παρακάτω εντολές
    <span style="font-family: verdana,geneva;"># Create Storage SpaceNew-VirtualDisk-FriendlyNameStorSpace-01-ResiliencySettingNameMirror-StoragePoolFriendlyNameStorPool-01-UseMaximumSize$DiskNo= (Get-VirtualDisk-FriendlyNameStorSpace-01|Get-Disk).NumberSet-Disk-Number$DiskNo-IsReadOnly0Set-Disk-Number$DiskNo-IsOffline0Initialize-Disk-Number$DiskNo-PartitionStyleMBRNew-Partition-DiskNumber$DiskNo-DriveLetterS-UseMaximumSizeInitialize-Volume-DriveLetterS-FileSystemNTFS-Confirm:$false</span>
    Εάν θέλουμε να δούμε την κατάσταση του Storage Space, του partition και των φυσικών δίσκων πάνω στους οποίους έχουν δημιουργηθεί, τότε χρησιμοποιούμε την παρακάτω εντολή
    <span style="font-family: verdana,geneva;"># Display Physical Disks that construct a volumeGet-VolumeS|Get-Partition|Get-Disk|Get-VirtualDisk|Get-PhysicalDisk</span>
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    1.4 Βλάβη ενός δίσκου
    Θα προσομοιώσουμε τις εξής βλάβες ενός από τους δίσκους που απαρτίζουν την συστοιχία και θα παρατηρήσουμε τα αποτελέσματα στο Storage Pool και στο Storage Space.
    Αφαίρεση
    Επαναφορά
    Αφαίρεση και αντικατάσταση με νέο
    Προσθήκη του χαλασμένου δίσκου μετά την αντικατάσταση του
    1.4.1 Αφαίρεση
    Η αφαίρεση του δίσκου και συγκεκριμένα του τρίτου, γίνεται με την παρακάτω εντολή στον Hyper-V Host
    <span style="font-family: verdana,geneva;"># Remove DiskRemove-VMHardDiskDrive-VMNameW2012R2-ControllerNumber0-ControllerLocation3-ControllerTypeSCSI</span>

    Στο guest VM, διαπιστώνουμε την βλάβη του δίσκου, ως εξής
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    Ενώ έχουμε και εγγραφές στο System Event Log
    PS C:Windowssystem32> Get-EventLog -LogName System -Source Disk | fl
    Index : 456
    EntryType : Warning
    InstanceId : 2147745949
    Message : Disk 3 has been surprise removed.
    Category : (0)
    CategoryNumber : 0
    ReplacementStrings : {DR3, 3}
    Source : disk
    TimeGenerated : 12/4/2014 9:22:20 πμ
    TimeWritten : 12/4/2014 9:22:20 πμ

    Η κατάσταση του Storage Pool είναι η εξής
    PS C:Windowssystem32> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    Primordial OK Healthy True False
    StorPool-01 Degraded Warning False False

    Η κατάσταση του Storage Space είναι η εξής
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace-01 Mirror Incomplete Warning False 27 GB

    Μετά την αφαίρεση του δίσκου λοιπόν, το Storage Pool είναι Degraded (υποβαθμισμένο) και το Storage Space είναι σε κατάσταση προειδοποίησης (Warning).
    Η λειτουργική κατάσταση όμως του Storage Space είναι καλή και τα δεδομένα μας διαθέσιμα και ασφαλή.1.4.2 Επαναφορά
    Επαναφέρουμε τον δίσκο που αφαιρέσαμε, με την παρακάτω εντολή στον Hyper-V host
    <span style="font-family: verdana,geneva;">Add-VMHardDiskDrive-VMNameW2012R2-Path'C:Virtual MachinesW2012R2Virtual Hard DisksDisk-3.vhdx'-ControllerTypeSCSI-ControllerLocation3</span>

    Στο Guest VM παρατηρούμε ότι ο δίσκος έχει επανέλθει
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 50 GB

    Η κατάσταση του Storage Pool είναι
    PS C:Windowssystem32> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    Primordial OK Healthy True False
    StorPool-01 OK Healthy False False

    Και του Storage Space
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace-01 Mirror OK Healthy False 27 GB

    Επομένως το Storage Subsystem και συγκεκριμένα τα Storage Spaces, κατάλαβαν την επαναφορά του δίσκου, έκαναν όλες τις απαραίτητες ενέργειες αποκατάστασης και η κατάσταση της συστοιχίας είναι και πάλι Healthy.
    Όλες αυτές οι ενέργειες έγιναν στο παρασκήνιο και τα δεδομένα μας ήταν συνεχώς διαθέσιμα.
    1.4.3 Αφαίρεση και αντικατάσταση με νέο
    Στην περίπτωση αυτήν θα αντικαταστήσουμε τον δίσκο που θα αφαιρέσουμε με καινούριο. Όπως προηγουμένως, αφαιρούμε τον δεύτερο δίσκο με την παρακάτω εντολή στο Hyper-V Host
    <span style="font-family: verdana,geneva;">Remove-VMHardDiskDrive-VMNameW2012R2-ControllerNumber0-ControllerLocation2-ControllerTypeSCSI</span>

    Στο Guest VM διαπιστώνουμε την βλάβη με τους τρόπους που παρουσιάστηκαν στην παράγραφο 1.5.1 Αφαίρεση.
    Η κατάσταση λοιπόν της συστοιχίας είναι η εξής
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace-01 Mirror Incomplete Warning False 27 GB

    Προσθέτουμε τον νέο δίσκο στην ίδια θέση που είχε και ο χαλασμένος που αφαιρέθηκε, με τις εξής εντολές στον Hyper-V Host
    <span style="font-family: verdana,geneva;">New-vhd-Path'C:Virtual MachinesW2012R2Virtual Hard DisksDisk-2-Repair.vhdx'-LogicalSectorSizeBytes4096-PhysicalSectorSizeBytes4KB-SizeBytes20GB-DynamicAdd-VMHardDiskDrive-VMNameW2012R2-Path'C:Virtual MachinesW2012R2Virtual Hard DisksDisk-2-Repair.vhdx'-ControllerTypeSCSI-ControllerLocation2</span>

    Βλέπουμε τον νέο δίσκο στο guest VM
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Auto-Select 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 50 GB
    PhysicalDisk2 True OK Healthy Auto-Select 20 GB

    Για να ξεκινήσει η επιδιόρθωση της συστοιχίας θα πρέπει να αφαιρεθεί ο χαλασμένος δίσκος από το Storage Pool και να προστεθεί ο καινούριος. Αυτό γίνεται με τι εξής εντολές στο Guest VM
    <span style="font-family: verdana,geneva;">Get-PhysicalDisk|whereOperationalStatus-likeLost*|Set-PhysicalDisk-UsageRetired</span>
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Retired 19.25 GB
    PhysicalDisk0 False OK Healthy Auto-Select 50 GB
    PhysicalDisk2 True OK Healthy Auto-Select 20 GB

    Προσθέτουμε τον νέο δίσκο στο Storage Pool με την εντολή
    <span style="font-family: verdana,geneva;">Add-PhysicalDisk-StoragePoolFriendlyNameStorPool-01-PhysicalDisks (Get-PhysicalDisk-CanPool$true)</span>

    Για να ξεκινήσει η διαδικασία της αποκατάστασης εκτελούμε την εντολή
    <span style="font-family: verdana,geneva;">Repair-VirtualDisk-FriendlyNameStorSpace-01</span>

    Μετά την ολοκλήρωση της αποκατάστασης ελέγχουμε την λειτουργική κατάσταση του Storage Space (συστοιχία) ως εξής
    PS C:Windowssystem32>
    Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace-01 Mirror OK Healthy False 27 GB

    Και του Storage Pool
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool-01 Degraded Warning False False

    To storage Pool είναι σε κατάσταση Degraded γιατί περιλαμβάνει τον δίσκο που έχει χαλάσει
    PS C:Windowssystem32> Get-StoragePool -FriendlyName StorPool-01 | Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk-1 False Lost Communication Warning Retired 19.25 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB

    Αφαιρώντας λοιπόν αυτόν τον δίσκο
    <span style="font-family: verdana,geneva;">Repair-VirtualDisk-FriendlyNameStorSpace-01</span>

    Η κατάσταση της συστοιχίας γίνεται Healthy
    PS C:Windowssystem32> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    Primordial OK Healthy True False
    StorPool-01 OK Healthy False False

    Όλες αυτές οι ενέργειες έγιναν στο παρασκήνιο ενώ τα δεδομένα μας ήταν διαρκώς διαθέσιμα.1.4.4 Προσθήκη του χαλασμένου δίσκου μετά την αντικατάσταση του
    Στην παράγραφο αυτή θα εξετάσουμε την συμπεριφορά των Storage Spaces, εάν προστεθεί ο δίσκος που είχε πριν αφαιρεθεί και αντικατασταθεί με νέο.
    Προσθέτουμε λοιπόν πάλι τον δίσκο, εκτελώντας στον Hyper-V host
    <span style="font-family: verdana,geneva;">Add-VMHardDiskDrive-VMNameW2012R2-Path'C:Virtual MachinesW2012R2Virtual Hard DisksDisk-2.vhdx'-ControllerTypeSCSI</span>

    Με την προσθήκη του δίσκου στο VM έχουμε την εξής εικόνα
    PS C:Windowssystem32> Get-PhysicalDisk | ft -AutoSize
    FriendlyName CanPool OperationalStatus HealthStatus Usage Size
    ———— ——- —————– ———— —– —-
    PhysicalDisk3 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk1 False OK Healthy Auto-Select 19.25 GB
    PhysicalDisk5 False Unrecognized Metadata Unhealthy Unknown 20 GB
    PhysicalDisk0 False OK Healthy Auto-Select 50 GB
    PhysicalDisk2 False OK Healthy Auto-Select 19.25 GB

    Ο δίσκος αναγνωρίζεται ως Unhealthy και φαίνεται να περιλαμβάνει Unrecognized Metadata, δεδομένα δηλαδή των οποίων την περιγραφή δεν φαίνεται να την γνωρίζει το VM.
    Για το storage Pool και την συστοιχία δεν έχει αλλάξει τίποτα και είναι σε κατάσταση Healthy
    Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    StorPool-01 OK Healthy False False
    Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    FriendlyName ResiliencySettingName OperationalStatus HealthStatus IsManualAttach Size
    ———— ——————— —————– ———— ————– —-
    StorSpace-01 Mirror OK Healthy False 27 GB

    Εάν θέλουμε να χρησιμοποιήσουμε αυτόν τον δίσκο, θα πρέπει να γίνει επαναφορά (reset) της κατάστασης του.
    Get-PhysicalDisk|whereOperationalStatus-likeUnrecognized*|Reset-PhysicalDisk

    Παρατηρούμε λοιπόν ότι η προσθήκη του παλιού δίσκου που ενώ υπήρχε στο Storage Pool και στο Storage Space αφαιρέθηκε και αντικαταστάθηκε με νέο δεν έχει κάποια επίπτωση στην λειτουργία του Storage Space (συστοιχία).1.5 Αφαίρεση δύο (2) δίσκων
    To Storage Space που εξετάζουμε είναι τύπου Two-Way Mirror. Αυτός ο τύπος συστοιχίας επιτρέπει την ομαλή λειτουργία σε περίπτωση βλάβης ενός (1) από τους δίσκους που την απαρτίζουν. Εάν υποστούν βλάβη δύο από τους δίσκους της τότε αναμένεται η συστοιχία να μην λειτουργεί και τα δεδομένα που είναι αποθηκευμένα επάνω της να μην είναι διαθέσιμα.
    Ετσι εάν αφαιρέσουμε δύο δίσκους, μέσω των παρακάτω εντολών στον Hyper-V host
    <span style="font-family: verdana,geneva;">Remove-VMHardDiskDrive-VMNameW2012R2-ControllerNumber0-ControllerLocation1-ControllerTypeSCSIRemove-VMHardDiskDrive-VMNameW2012R2-ControllerNumber0-ControllerLocation2-ControllerTypeSCSI</span>

    Παρατηρούμε ότι το Storage Pool είναι σε κατάσταση εκτεταμένης βλάβης
    PS C:Windowssystem32> Get-StoragePool | ft -AutoSize
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly
    ———— —————– ———— ———— ———-
    Primordial OK Healthy True False
    StorPool-01 Read-only Unhealthy False False

    Ενώ το Storage Space δεν υπάρχει
    PS C:Windowssystem32> Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    Get-Volume : No MSFT_Volume objects found with property ‘DriveLetter’ equal to ‘S’. Verify the
    value of the property and retry.
    At line:1 char:1
    + Get-Volume S | Get-Partition | Get-Disk | Get-VirtualDisk | ft -AutoSize
    + ~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (S:Char) [Get-Volume], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_DriveLetter,Get-Volume

    Εάν επανασυνδέσουμε τους δίσκους στο VM τότε το Storage Pool και το Storage Space θα έρθουν και πάλι σε καλή λειτουργική κατάσταση.
    The post Έλεγχος αντοχής των Storage Spaces με την χρήση του PowerShell (Two-Way Mirror) appeared first on Vaggelis Kappas.
     
    Source
×
×
  • Create New...