O que acontecerá se um PC inicializar com vários discos tendo partições inicializáveis?

1

Notei que, se a instância no AWS EC2 tiver vários discos, todos com partição inicializável, a instância será inicializada aleatoriamente a partir do disco sem fazer isso na ordem do ID do volume do EBS ou do nome do dispositivo do disco. Eu queria saber se há alguma regularidade nessa situação, o que acontecerá se um PC inicializar com vários discos tendo partições inicializáveis? O PC escolheria os discos para inicializar seguindo qualquer tipo de regra?

    
por Jepsenwan 09.06.2017 / 12:07

1 resposta

3

Acho que o artigo do My Instance is Booting do AWS EC2 User Guide do volume errado é uma resposta detalhada à sua pergunta. A ênfase é minha.

In some situations, you may find that a volume other than the volume attached to /dev/xvda or /dev/sda has become the root volume of your instance. This can happen when you have attached the root volume of another instance, or a volume created from the snapshot of a root volume, to an instance with an existing root volume.

This is due to how the initial ramdisk in Linux works. It will choose the volume defined as / in the /etc/fstab, and in some distributions, including Amazon Linux, this is determined by the label attached to the volume partition.

E a correção em resumo:

Use the e2label command to change the label of the volume to something other than /.

[ec2-user ~]$ sudo e2label /dev/xvdf1 old/
    
por 09.06.2017 / 12:27