Interface google block storage persistent disks

268 Views Asked by At

I went through the google document to find the interface for persistent disks but could not find it. For local disks it is SCSI/NVME.

What is the interface for persistent disks? FC, iSCSI, NVMe

2

There are 2 best solutions below

0
On

In case of the persistent disks (that are used by default by VM instances) it's a SCSI interface.

For confirmation I ran hwinfo command:

wb@instance-1:~$ sudo hwinfo --disk

13: SCSI 01.0: 10600 Disk                                       
  ...
  Driver: "virtio_scsi", "sd"
  Driver Modules: "virtio_scsi", "sd_mod"
  Device File: /dev/sda (/dev/sg0)
  Device Files: /dev/sda, /dev/disk/by-id/google-instance-1, /dev/disk/by-path/pci-0000:00:03.0-scsi-0:0:1:0, /dev/disk/by-id/scsi-0Google_PersistentDisk_instance-1
  ...

You can see a virtual SCSI interface Driver Modules: "virtio_scsi", "sd_mod" which clearly indicete it's a SCSI interface.

Another hint:

wb@instance-1:~$ sudo lshw | grep scsi
            logical name: scsi0
            configuration: driver=virtio_scsi
               bus info: scsi@0:0.1.0
                  bus info: scsi@0:0.1.0,1
                  bus info: scsi@0:0.1.0,14
                  bus info: scsi@0:0.1.0,15

More configrmation you can find the documentation regarding requirements for building your own images.

However, when you create an instance with Local SSD drive you have an option to select interface type - SCSI or NVM.

enter image description here

Or when using gcloud:

gcloud compute instances create example-instance \
    --machine-type n2-standard-8 \
    --local-ssd interface=[INTERFACE_TYPE] \
    --local-ssd interface=[INTERFACE_TYPE] \
    --image-project [IMAGE_PROJECT] \
    --image-family [IMAGE_FAMILY]

More documentation on selecting the local SSD's interface here.

When you create a VM with local SSD and run lsblk you get:

wb@instance-3:~$ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda       8:0    0   10G  0 disk 
├─sda1    8:1    0  9.9G  0 part /
├─sda14   8:14   0    3M  0 part 
└─sda15   8:15   0  124M  0 part /boot/efi
nvme0n1 259:0    0  375G  0 disk 

It's the clear indication what kind if interface is used.

0
On

Historically persistent disks were emulated as a SCSI device to the VM, but as newer features and machine series are introduced it's changing to NVMe. It is not configurable and set automatically set for you.

References to learn more: