-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not clear how the user can identify the disk they would like to mount #13958
Comments
Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate. |
Hi, Yang. This is pretty much a linux thing. In Azure the OS disk is "sda", while "sdb" is the temporary disk reserved for Azure (like the D:\ drive in windows server). "sdc" is the only available option, because it is the only option left. But explaining you a little bit about the name of this disk:
I know this is not the perfect answer, but I hope it helps you. |
Thanks @marcelo-salvatori, this is helpful but I think it'd be good to accommodate Linux newcomers in the document itself. It's not clear from this document alone that the OS disk and the temp disk are sda and sdb respectively (could add a link to where this is explained). Also, what if there are already data disks attached or if the user attached more than one on the Portal before logging into the VM - how then do you identify one particular one? |
Your concern is a real thing @yangsiyu007. I also got a little confused with this article.
To be honest, in Azure we seem to have a problem, that all disk seems to be indentified by VMs as HDDs. I've seen this behaviour both in Windows and Linux Server. The way to identify it, therefore, would be jurassic. You gotta add one disk at a time and identify it, add another and identify it and so on. It is lame, I know. But it is the only work around I have found. I hope Azure fix this soon enough. References: |
Also Testing on Ubuntu. |
It is not always assured that sda and sdb will be the OS and ephemeral disk respectively. The best way to identify a particular data disk is via LUN. You can actually specify the LUN when you attach a disk via CLI/Powershell, or by default the numbering will start at 0 and increment by 1 for each newly attached disk. On a lot of standard Linux images on Azure there is a udev rule that creates friendly/persistent symlinks for each disk, so you don't need to worry about the sda/sdb/etc. naming. After you attach a data disk you should see a new symlink created in /dev/disk/azure/scsi1/* that identifies each disk (and its partitions) by LUN. |
Thank you all for the discussion on this. We have continued to discuss this internally and at this time do not plan on updating the doc with any additional steps. @szarkos last response is precise and a good comment to close on. This issue will remain on the doc and if other users continue to comment on this we can always reopen the discussion. |
It is frustrating that one needs to read though all of the closed feedback to get this info. If the last post is indeed helpful, it should be included in the above doc. |
I've to agree with @pflickin. There should be an easier way to get to this information. It would be very helpful if you want to automate this. |
WTF? Its still impossible to figure out the right drive names following the current docs. I recently had selected an additional drive because the ones that came with the VMs normally are not large enough and it took me several hours to figure out how to mount it. (It did not come across this thread while searching for it, so having a solution here is not discoverable.) Thats not acceptable for something people are paying for.For what its worth, you can use Its not really user friendly though and having to search several hours for those commands is not acceptable either, and even then, given that you can add multiple drives of the same size at VM creation time without being given any warning or guidance is awful user experience. |
Yes, this doc needs an update. I'm also going to drop these links in here in the meantime, in case they are helpful: https://github.com/canonical/cloud-init/blob/master/udev/66-azure-ephemeral.rules |
For anyone else interested in how to determine which disk is the correct one, I've updated the doc to use |
@cynthn
However as a linux newcomer I do not know which of these numbers indicate that |
It'd be helpful to explain how the user can identify which disk displayed in the result of the command
dmesg | grep SCSI
is the one of interest."Here, sdc is the disk that we want" is not helpful.
I found out by reading https://chrismckee.co.uk/creating-mounting-new-drives-in-ubuntu-azure/ where it showed the command
sudo lshw -C disk
, from where I identified the disk by looking at its size and noting down its bus info, from which I can correlate it back to the results ofdmesg | grep SCSI
. I'm sure you have a better way to do this.It would also be good to explain why we are grepping SCSI in the command - to note that it is always the case if they just attached a data disk to the VM on Azure Portal.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: