Tuesday, September 7, 2021

VI Editor Linux

https://www.redhat.com/sysadmin/introduction-vi-editor#:~:text=To%20enter%20Insert%20mode%2C%20press,press%20the%20Esc%20key%20once.

Azure Resource Explorer

resources.azure.com


https://azure.microsoft.com/en-in/blog/azure-resource-explorer-a-new-tool-to-discover-the-azure-api/




Linux, Disk Mount, Detach

https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Examples


https://m.facebook.com/nt/screen/?params=%7B%22note_id%22%3A346120513277920%7D&path=%2Fnotes%2Fnote%2F&refsrc=deprecated&_rdr

https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-recovery-disks-portal-linux

https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-recovery-disks-portal-linux#take-a-snapshot-of-the-os-disk

https://devblogs.microsoft.com/premier-developer/choosing-the-right-tooling-for-azure-and-side-by-side-azure-cli-and-powershell-commands/


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#Provide the name of your resource group
$resourceGroupName ='myResourceGroup'

#Provide the name of the snapshot that will be used to create Managed Disks
$snapshotName = 'mySnapshot' 

#Provide the name of theManaged Disk
$diskName = 'newOSDisk'

#Provide the size of the disks in GB. It should be greater than the VHD file size. In this sample, the size of the snapshot is 127 GB. So we set the disk size to 128 GB.
$diskSize = '128'

#Provide the storage type for Managed Disk. Premium_LRS or Standard_LRS.
$storageType = 'Standard_LRS'

#Provide the Azure region (e.g. westus) where Managed Disks will be located.
#This location should be same as the snapshot location
#Get all the Azure location using command below:
#Get-AzLocation
$location = 'westus'

$snapshot = Get-AzSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName 

$diskConfig = New-AzDiskConfig -AccountType $storageType -Location $location -CreateOption Copy -SourceResourceId $snapshot.Id

New-AzDisk -Disk $diskConfig -ResourceGroupName $resourceGroupName -DiskName $diskName

Linux Mount Disk : blkid -o full and lsblk -f and lsblk and df -h

fda@FDA-VEA-VM:/$ blkid -o full
/dev/sda1: LABEL="cloudimg-rootfs" UUID="f89a10d0-2ae6-4411-9086-8ccd221055fd" TYPE="ext4" PARTUUID="b08788dd-af4a-4015-b7b0-f7b53b252ddd"
/dev/sda15: LABEL="UEFI" UUID="C4E4-E7F8" TYPE="vfat" PARTUUID="12798101-40c7-4dfe-8b16-58d8522bbbc0"
/dev/sdb1: LABEL="Temporary Storage" UUID="02BEE3C1BEE3AB7D" TYPE="ntfs" PARTUUID="29e34589-01"

fda@FDA-VEA-VM:/$ lsblk -f
NAME    FSTYPE LABEL           UUID                                 MOUNTPOINT
sda
├─sda1  ext4   cloudimg-rootfs f89a10d0-2ae6-4411-9086-8ccd221055fd /
├─sda14
└─sda15 vfat   UEFI            C4E4-E7F8                            /boot/efi
sdb
└─sdb1  ext4                   43e815d5-3bed-4f3b-a218-89a068dddc2c /mnt
sdc     ext4                   204db14b-9657-49b9-8daf-35ba202e295c
sr0

fda@FDA-VEA-VM:/$ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda       8:0    0   30G  0 disk
├─sda1    8:1    0 29.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   32G  0 disk
└─sdb1    8:17   0   32G  0 part /mnt
sdc       8:32   0  150G  0 disk
sr0      11:0    1  628K  0 rom

fda@FDA-VEA-VM:/$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.9G     0  7.9G   0% /dev
tmpfs           1.6G  688K  1.6G   1% /run
/dev/sda1        29G  1.4G   28G   5% /
tmpfs           7.9G     0  7.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/sda15      105M  6.6M   98M   7% /boot/efi
/dev/sdb1        32G   49M   30G   1% /mnt
tmpfs           1.6G     0  1.6G   0% /run/user/1000

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass