qual é a diferença entre / dev / vda e / dev / sda

13

Estou me preparando para uma certificação e tenho um CentOS7 (VirtualBox) instalado localmente e outra instância em um serviço baseado em nuvem.

No sistema local eu tenho um /dev/sda e no baseado em nuvem eu tenho um /dev/vda .

Agora eu estou querendo saber o que exatamente significa essa diferença? Existe um padrão (documentação?) Para a nomeação destes dispositivos e o que significam os diferentes nomes?

Editar:

Acho que este documento é muito útil para entender a nomenclatura: link

8 block SCSI disk devices (0-15)
      0 = /dev/sda      First SCSI disk whole disk
     16 = /dev/sdb      Second SCSI disk whole disk
     32 = /dev/sdc      Third SCSI disk whole disk
        ...
    240 = /dev/sdp      Sixteenth SCSI disk whole disk

Mas não encontrei informações sobre / dev / vda.

    
por Mathias Begert 16.09.2016 / 00:12

1 resposta

14

Virtualização Total vs. Paravirtualização

/ dev / sda é o primeiro disco detectado do tipo IDE / SATA / SCSI. Neste caso, emulado (completo virtualizado) pelo hipervisor.

/ dev / vda é o primeiro driver de disco paravirtualizado detectado. Ele é mais rápido que os dispositivos sdX emulados se ambos forem referenciados ao mesmo disco, porque há menos sobrecarga em sua operação em comparação com um disco emulado.

Referências:

De link :

Full virtualization vs. paravirtualization

Let's start with a quick discussion of two distinct types of virtualization schemes: full virtualization and paravirtualization. In full virtualization, the guest operating system runs on top of a hypervisor that sits on the bare metal. The guest is unaware that it is being virtualized and requires no changes to work in this configuration. Conversely, in paravirtualization, the guest operating system is not only aware that it is running on a hypervisor but includes code to make guest-to-hypervisor transitions more efficient.

In the full virtualization scheme, the hypervisor must emulate device hardware, which is emulating at the lowest level of the conversation (for example, to a network driver). Although the emulation is clean at this abstraction, it's also the most inefficient and highly complicated. In the paravirtualization scheme, the guest and the hypervisor can work cooperatively to make this emulation efficient. The downside to the paravirtualization approach is that the operating system is aware that it's being virtualized and requires modifications to work.

De link :

What are paravirtual devices?

When running a virtual machine, the virtual environment has to present devices to the guest OS – disks and network being the main two (plus video, USB, timers, and others). Effectively, this is the hardware that the VM guest sees.

Now, if the guest is to be kept entirely ignorant of the fact that it is virtualised, this means that the host must emulate some kind of real hardware. This is quite slow (particularly for network devices), and is the major cause of reduced performance in virtual machines.

However, if you are willing to let the guest OS know that it's in a virtual environment, it is possible to avoid the overheads of emulating much of the real hardware, and use a far more direct path to handle devices inside the VM. This approach is called paravirtualisation. In this case, the guest OS needs a particular driver installed which talks to the paravirtual device. Under Linux, this interface has been standardised, and is referred to as the "virtio" interface.

    
por 16.09.2016 / 00:18