Add new disc linux host vmware


Scan all existing hosts with a one-liner:

for host in /sys/class/scsi_host/*; do echo "- - -" | sudo tee $host/scan; ls /dev/sd* ; done


fdisk /dev/sdb
m to menu
n to new partition
w to write

mkfs.ext4 /dev/sdb1 to format

Resize disc: 

To make the kernel aware, one can issue the following command as root:

echo 1 > /sys/class/block/sdb/device/rescan
parted /dev/sdb
print
resizepart 1 
quit parted
sudo partprobe 
 
Resize File system 
umount /dev/block_device
e2fsck -f /dev/block_device
resize2fs /dev/block_device
 
 
 
 

Install dotnet 3.5 Windows 10

Copiar a pasta sxs para C:\
Na janela do prompt de comando, digite o seguinte comando e pressione Enter:
dism /online /enable-feature /featurename:netfx3 /all /source:c:\sxs /limitaccess 

Na janela do prompt de comando, digite o seguinte comando e pressione Enter:
dism /online /Cleanup-Image /RestoreHealth

Bash remote script execution


bash <(curl -s https://github.com/dominicpratt/install-zabbix-agent/blob/master/install-zabbix-agent.sh)

Ubuntu slow USB copy

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes


Then

swapoff -a

Windows DFSR Troubleshooting


A few cmds to help with the DFS troubleshooting aspects, keep in mind all should be run from an elevated PowerShell
Dfsdiag /TestDCs

DFSDiag /TestDFSIntegrity /DFSRoot:\\Contoso.com\MyNamespace /Recurse /Full
Dfsutil /pktinfo
Dfsutil /spcinfo
Dfsr pollad
Klist tgt
Klist tickets
DfsrAdmin Health New /RgName:"Contoso.com\Path1\Folder1" /RefMemName:SERVER /RepName:C:\DFSReports\HealthReport_DATE.html /FsCount:true
dfsrdiag ReplicationState /member:SERVER /all
wmic /namespace:\\root\microsoftdfs path DfsrReplicatedFolderInfo get * /format:textvaluelist
Get-ChildItem C:\Temp -recurse | Out-File E:\DFS-Data\Path1\DfsrPrivate\Staging > C:\Export\allfiles.txt
dfsrdiag backlog /receivingmember:SERVER2 /sendingmember:SERVER1 /rgname:"ReplicationGroup1" /rfname:"Folder Name"

To search for replicated folder name:
1. From Elevated PowerShell: Notepad "C:\Windows\Debug\Dfsr####.log"

2. Find "parent" GUID (will look like {D767AC01-8375-447A-88E4-1CCF6A18DD95}-v167695)
Search for GUID

Run: wbemtest
Namespace: root\microsoftdfs connect

Query: "Select * from dfsreplicatedfolderconfig"


Completely Flush Server
  • dfsutil /pktflush
  • dfsutil /spcflush
  • dfsutil /purgeMupcache
  • klist purge
  • ipconfig /flushdns 

Corrigir erro NATS no Segura

  ### erro Nats orbit nats stop orbit nats setup orbit services reload orbit services restart all ls -lh /var/orbini/system/incdt/ 

Mais vistos