Chandrakant Agarkar
Chandrakant Agarkar

Reputation: 21

Detect temporary disk in Azure Linux VM

I am using RHEL on Azure. I have found that, with any new Azure VM launched, I see two disks attached. One is root disk on which, RHEL OS is installed. And other is local SSD attached, but its a temporary disks. Some part of this temporary disk is utilized for swap area.

If I am using LVM type volume manager, how can I detect the second disk is the temporary disk? If I want to implement disk management utility in C programming language, how can I detect this temporary disk? Is there any disk property which we can use to detect the locally attached disk?

Upvotes: 1

Views: 4629

Answers (2)

Yogi
Yogi

Reputation: 9749

On Linux virtual machines, the temporary disk is typically /dev/sdb and is formatted and mounted to /mnt by the Azure Linux Agent.

Ref - https://learn.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds

Upvotes: 1

Jason Ye
Jason Ye

Reputation: 13954

If I am using LVM type volume manager, how can I detect the second disk is the temporary disk?

When you create a VM in Azure you are provided with a temporary storage automatically. The temporary disk is "/dev/sdb1" on a Linux VM.

If you want to configure LVM for this VM, "/dev/sdb" is the temporary disk, the first disk should be /dev/sdc.
More information about configure LVM for Azure Linux VM, please refer to this link.

Upvotes: 0

Related Questions