How to mount disks in linux VM
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal
To mount a disk in Ubuntu Linux, follow these steps:
-
Use the
lsblk
command to list the available block devices and identify the disk that you want to mount. For example, if your disk is /dev/sdb, you can use the following command to see details about it:
lsblk /dev/sdb
-
Create a mount point for the disk. This is a directory where the disk will be accessible once it is mounted. You can create a mount point in the
/mnt
directory, or you can create a new directory in your home directory. For example, to create a new directory calledmydisk
in your home directory, use the following command:mkdir ~/mydisk
-
Use the
mount
command to mount the disk on the mount point that you created. For example, if your disk is /dev/sdb and your mount point is /mnt/mydisk, you can use the following command to mount the disk:sudo mount /dev/sdb /mnt/mydisk
-
Use the
ls
command to verify that the disk has been mounted. For example, to see the contents of the/mnt/mydisk
directory, you can use the following command:ls /mnt/mydisk
-
If you want the disk to be automatically mounted every time the system starts up, you can add an entry for it to the
/etc/fstab
file. For example, if your disk is /dev/sdb and your mount point is /mnt/mydisk, you can use the following command to add an entry to the/etc/fstab
file:Copy codesudo echo "/dev/sdb /mnt/mydisk auto defaults 0 0" >> /etc/fstab
Keep in mind that these are just general instructions for mounting a disk in Ubuntu Linux. The exact steps may vary depending on your specific setup. Consult the Ubuntu Linux documentation for more detailed information.
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd" sudo parted /dev/sda --script mklabel gpt mkpart xfspart xfs 0% 100% sudo mkfs.xfs /dev/sda sudo partprobe /dev/sda sudo mkdir /sqlserver sudo mount /dev/sda /sqlserver sudo blkid root@H1BWebServer:/var/opt/mssql/log# sudo blkid /dev/sdb1: LABEL="cloudimg-rootfs" UUID="898098a3-2c50-49fd-ac32-98a16d91c16b" TYPE="ext4" PARTUUID="a4f8fa13-8274-4301-80ef-b3b7edab2b58" /dev/sdb15: LABEL="UEFI" UUID="60D0-2ED1" TYPE="vfat" PARTUUID="1af08ef8-7060-49ba-a251-b084c061ab41" /dev/sdc1: UUID="9f61dc1b-c907-41d6-be4b-2ab7d43b01a5" TYPE="ext4" PARTUUID="2a253061-01" /dev/sda: UUID="32c55465-1165-472f-bb4e-4e1db58d70f6" TYPE="xfs" /dev/sdb14: PARTUUID="f566f5af-e0b0-483d-97c8-cb22fabbb904" UUID=32c55465-1165-472f-bb4e-4e1db58d70f6 /sqlserver xfs defaults,nofail 1 2