{"id":2536,"date":"2022-12-09T22:56:24","date_gmt":"2022-12-09T22:56:24","guid":{"rendered":"https:\/\/sunucucozumleri.com\/?p=2536"},"modified":"2023-02-16T21:43:37","modified_gmt":"2023-02-16T21:43:37","slug":"powercli-ile-esxide-nvme-drives-tbw-nasil-kontrol-edilir","status":"publish","type":"post","link":"https:\/\/sunucucozumleri.com\/blog\/powercli-ile-esxide-nvme-drives-tbw-nasil-kontrol-edilir\/","title":{"rendered":"PowerCLI ile ESXi&#8217;de NVMe Drives TBW nas\u0131l kontrol edilir?"},"content":{"rendered":"<p><strong><span class=\"\">SSD&#8217;lerle \u00e7al\u0131\u015f\u0131rken, TBW&#8217;sine<\/span><\/strong><span class=\"\"> (&#8220;Yaz\u0131lan Toplam Bayt&#8221; veya &#8220;Yaz\u0131lan Terabayt&#8221;) dikkat etmeniz gerekir.<\/span><span class=\"\">\u00a0<\/span>Maksimum TBW garantisi genellikle sat\u0131c\u0131 taraf\u0131ndan spesifikasyonlar\u0131nda sa\u011flan\u0131r.\u00a0Bu de\u011fer, garanti sona erene kadar verilerin t\u00fcm cihaza nas\u0131l yaz\u0131laca\u011f\u0131n\u0131 a\u00e7\u0131klar.\u00a0<span class=\"\">Ge\u00e7erli de\u011fer SMART ile kontrol edilebilir. <strong>Bu makalede, PowerShell ile veya komut sat\u0131r\u0131ndan bir ESXi ana bilgisayar\u0131nda \u00e7al\u0131\u015fan NVMe<\/strong>\u00a0tabanl\u0131 s\u00fcr\u00fcc\u00fclerde TBW de\u011ferinin nas\u0131l kontrol edilece\u011fi a\u00e7\u0131klanmaktad\u0131r\u00a0.\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>Bu \u00f6rnekte, biz Samsung 950 PRO NVMe tabanl\u0131 flash s\u00fcr\u00fcc\u00fc kulland\u0131\u011f\u0131m\u0131z\u0131 belirtmek isteriz. Bu cihaz\u0131n dayan\u0131kl\u0131l\u0131\u011f\u0131 400 TBW olarak derecelendirilmi\u015ftir. \u015eunu bilmelisiniz ki bu disk son kullan\u0131c\u0131 s\u0131n\u0131f\u0131 bir SSD. \u00d6rne\u011fin, Virtual SAN i\u00e7in en d\u00fc\u015f\u00fck dayan\u0131kl\u0131l\u0131k S\u0131n\u0131f\u0131 365TBW&#8217;den ba\u015flar.<\/p>\n<p>Ad\u0131m ad\u0131m ilerleyelim;<\/p>\n<ol>\n<li><span class=\"\">ESXi Ana Bilgisayar\u0131na SSH ile ba\u011flan\u0131n<\/span><\/li>\n<li><span class=\"goog-text-highlight\">NVMe s\u00fcr\u00fcc\u00fclerini tan\u0131mlay\u0131n<\/span><\/li>\n<\/ol>\n<p><code># esxcli nvme device list<\/code><br \/>\n<code>HBA Name Status  Signature<br \/>\n-------- ------  ---------------------<br \/>\nvmhba0  \u00c7evrimi\u00e7i nvmeMgmt-nvme00610000<\/code><code><\/code><\/p>\n<p>&nbsp;<\/p>\n<p>3. &#8220;Data Unit Written&#8221; sayac\u0131n\u0131 al\u0131n. vmhbaX kimli\u011fini 2. ad\u0131mda tan\u0131mlanan ba\u011fda\u015ft\u0131r\u0131c\u0131yla de\u011fi\u015ftirin.<\/p>\n<p>&nbsp;<\/p>\n<p><code># esxcli nvme device log smart get -A vmhba0 |grep Written<\/code><\/p>\n<p>Data Units Written: 0xe1c78d<\/p>\n<p>4. Saya\u00e7 onalt\u0131l\u0131kt\u0131r. Ondal\u0131k say\u0131ya d\u00f6n\u00fc\u015ft\u00fcr\u00fcn. Bu, komut sat\u0131r\u0131ndan veya Programc\u0131 modundaki Windows Hesap Makinesi&#8217;nden de yap\u0131labilir.<\/p>\n<p><code># printf \"%d\\n\" 0xe1c78d<\/code><\/p>\n<p>Saya\u00e7, 512 baytl\u0131k birimlerin 1000&#8217;ini ifade etti\u011finden biraz s\u0131ra d\u0131\u015f\u0131d\u0131r. Sonucu 512000 ile \u00e7arp\u0131n ve TBW i\u00e7in 1TB&#8217;ye (1.099.511.627.776) veya GBW i\u00e7in 1GB&#8217;a (1.073.741.824) b\u00f6l\u00fcn. 14796685 * 512000 \/ 1099511627776 = 6,9 TBW<br \/>\n14796685 * 512000 \/ 1073741824 = 7055 GBW<br \/>\nGBW hesaplamas\u0131n\u0131 yapmak i\u00e7in bu tek sat\u0131r\u0131 da kullanabilirsiniz:<\/p>\n<p><code><br \/>\n# i=$(esxcli nvme device log smart get -A vmhba0 |grep Written | cut -d \":\" -f 2);<br \/>\necho $(($(printf \"%d\\n\"<br \/>\n$i)*512000\/1073741824)) GBW<br \/>\n7055 GBW<\/code><\/p>\n<p>veya TBW:<br \/>\n<code><br \/>\n# i=$(esxcli nvme device log smart get -A vmhba0 |grep Written | cut -d \":\" -f 2);<br \/>\necho $(($(printf \"%d\\n\"<br \/>\n$i)*512000\/1099511627776)) TBW<br \/>\n6 TBW<\/code><\/p>\n<p><strong>PowerShell \/ PowerCLI Komut Dosyas\u0131<\/strong><\/p>\n<p>A\u015fa\u011f\u0131daki PowerShell beti\u011fi, bir vCenter Server \u00f6rne\u011findeki t\u00fcm NVMe cihazlar\u0131 hakk\u0131nda bir rapor g\u00f6r\u00fcnt\u00fcler.<strong><br \/>\n<\/strong><br \/>\n<code><br \/>\n$AllInfo = @()<br \/>\nForeach ($vmhost in Get-VMHost |Where-object {$_.powerstate -eq \"PoweredOn\"}) {<br \/>\n$esxcli = get-esxcli -V2 -vmhost $vmhost<br \/>\n$devices = $esxcli.nvme.device.list.Invoke()<br \/>\nForeach ($device in $devices) {<br \/>\n$nvme = $esxcli.nvme.device.get.CreateArgs()<br \/>\n$nvme.adapter = $device.HBAName<br \/>\n$Info = \"\" | Select VMHost, HBA, Model, DataUnitsWritten, GBW, TBW<br \/>\n$Info.VMHost = $vmhost.Name<br \/>\n$Info.HBA = $device.HBAName<br \/>\n$Info.Model = ($esxcli.nvme.device.get.invoke($nvme) | Select-Object ModelNumber).ModelNumber<br \/>\n$Info.DataUnitsWritten = [int]($esxcli.nvme.device.log.smart.get.Invoke($nvme) |Select-Object DataUnitsWritten).DataUnitsWritten<br \/>\n$Info.GBW = [math]::round($Info.DataUnitsWritten*512000\/1Gb)<br \/>\n$Info.TBW = [math]::round($Info.DataUnitsWritten*512000\/1Tb, 1)<br \/>\n$AllInfo += $Info<br \/>\n}<br \/>\n}<\/code><\/p>\n<p>$AllInfo<\/p>\n<p>&nbsp;<\/p>\n<p>Ekran \u00e7\u0131kt\u0131s\u0131 \u015fu \u015fekilde olacakt\u0131r:<\/p>\n<p><code><br \/>\nVMHost           : esx4.virten.lab<br \/>\nHBA              : vmhba0<br \/>\nModel            : Samsung SSD 950 PRO 256GB<br \/>\nDataUnitsWritten : 14797188<br \/>\nGBW              : 7056<br \/>\nTBW              : 6,9<br \/>\n<\/code><br \/>\n<strong>512 Bayt ve 4k Blok Boyutu<\/strong><\/p>\n<p><span class=\"\">Saya\u00e7 a\u00e7\u0131klamas\u0131na g\u00f6re, fiziksel blok boyutunun 512 bayt veya daha b\u00fcy\u00fck olmas\u0131 fark etmez.\u00a0<\/span>De\u011fer her zaman 512 Bayt olarak hesaplan\u0131r:<\/p>\n<p>Data units written: <span class=\"\">Ana bilgisayar\u0131n denetleyiciye yazd\u0131\u011f\u0131 512 bayt veri birimi say\u0131s\u0131n\u0131 i\u00e7erir;<\/span><br \/>\nbu de\u011fer meta verileri i\u00e7ermez.\u00a0Bu de\u011fer binler olarak bildirilir (yani, 1 de\u011feri yaz\u0131lan 512 baytl\u0131k 1000 birime kar\u015f\u0131l\u0131k gelir) ve yukar\u0131 yuvarlan\u0131r.\u00a0LBA boyutu 512 bayttan farkl\u0131 bir de\u011fer oldu\u011funda, kontrol\u00f6r yaz\u0131lan veri miktar\u0131n\u0131 512 bayt birime \u00e7evirecektir.<br \/>\nNVM komut seti i\u00e7in, Yazma i\u015flemlerinin bir par\u00e7as\u0131 olarak yaz\u0131lan mant\u0131ksal bloklar bu de\u011fere dahil edilecektir.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSD&#8217;lerle \u00e7al\u0131\u015f\u0131rken, TBW&#8217;sine (&#8220;Yaz\u0131lan Toplam Bayt&#8221; veya &#8220;Yaz\u0131lan Terabayt&#8221;) dikkat etmeniz gerekir.\u00a0Maksimum TBW garantisi genellikle sat\u0131c\u0131 taraf\u0131ndan spesifikasyonlar\u0131nda sa\u011flan\u0131r.\u00a0Bu de\u011fer, garanti sona erene kadar verilerin t\u00fcm cihaza nas\u0131l yaz\u0131laca\u011f\u0131n\u0131 a\u00e7\u0131klar.\u00a0Ge\u00e7erli de\u011fer SMART ile kontrol edilebilir. Bu makalede, PowerShell ile veya komut sat\u0131r\u0131ndan bir ESXi ana bilgisayar\u0131nda \u00e7al\u0131\u015fan NVMe\u00a0tabanl\u0131 s\u00fcr\u00fcc\u00fclerde TBW de\u011ferinin nas\u0131l kontrol edilece\u011fi a\u00e7\u0131klanmaktad\u0131r\u00a0.\u00a0 &hellip;<\/p>\n","protected":false},"author":2,"featured_media":2701,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15,5,6],"tags":[],"class_list":["post-2536","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esxi","category-linux","category-windows"],"acf":[],"_links":{"self":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts\/2536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/comments?post=2536"}],"version-history":[{"count":0,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts\/2536\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/media\/2701"}],"wp:attachment":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/media?parent=2536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/categories?post=2536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/tags?post=2536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}