I launched a Linux VM in Azure, but I can't find the attached disk. You're in trouble at that time, right?
Even if you google lightly, "just set from the portal" or " dmesg | grep SCSI
white ([official document](https://docs.microsoft.com/ja-jp/azure/virtual-machines/linux/attach -disk-portal)) ”, but I can't find what I can't find.
** It should be connected, so hit some command and it should come out! As a result of googled for an hour with words such as ** and "Azure VM data disk connection Linux", the solution seems to have been unexpectedly close, so I would like to write down the details.
The first thing that comes to mind when it comes to checking discs is the royal road df command, but it doesn't seem to work for unmounted discs. This article I see something from df -h
and run parted
, but I have no idea what the decision was based on. ..
Storage is treated as a SCSI device, so you can find it by grep SCSI, right? The idea is extremely simple and logical, but I didn't have enough knowledge to narrow down which one is the data disk.
** Yes, this is the correct answer. ** To be precise, I ran sudo fdisk -l
on the console and it was easy to find the attached datadisk.
If you just try to access the storage path, you will get angry like not founded, so create a partition and mount it in a specific directory.
Regarding the detailed method
Mount Managed Disk on Linux VM in Azure
Memorable when cutting the disk with the parted command
Is written in detail.
The rest of the story goes awry, but I feel that it is a merit and demerit that the command comes out as it is if I google today. I don't think I would step on a major nuclear mine like sudo rm -rf /
, but this time I almost halved the size of the storage.
"The Internet can only be used by people who can see a lie as a lie." This is the late Hiroyuki's words, but the literacy of ** I don't take it for granted that I haven't verified it myself ** will become even more important in the future. I feel like coming.
See you again
Recommended Posts