2010-09-09 49 views
3

有幾個應用程序,其中EC2小型實例太大了。所以微型實例的發佈正是醫生所訂購的。EC2小型到微型實例降級問題

我想採取一個小實例的EBS卷,分離它,並與微型實例配對。在某種程度上,以另一種方式並將微型實例升級爲小型或超越型可能會很好。

對於這個實驗失敗我想:

  1. 創建一個新的小實例與Alestic的Ubuntu 10.04 32位AMI(AMI-1234de7b)。靴子就像一個魅力。
  2. 關閉我新鮮鑄造的微型實例,分離上一步爲我創建的卷。
  3. 將小實例的卷附加到微實例。
  4. 加電。
  5. Nada。

有什麼奇怪的是,沒有控制檯日誌輸出直到我關機。然後我看到了這一切。

[ 0.000000] Reserving virtual address space above 0xf5800000 
[ 0.000000] Initializing cgroup subsys cpuset 
[ 0.000000] Initializing cgroup subsys cpu 
... 
[ 1.221261] VFS: Mounted root (ext3 filesystem) readonly on device 8:1. 
[ 1.221261] VFS: Mounted root (ext3 filesystem) readonly on device 8:1. 
[ 1.222164] devtmpfs: mounted 
[ 1.222202] Freeing unused kernel memory: 216k freed 
[ 1.223409] Write protecting the kernel text: 4328k 
[ 1.223760] Write protecting the kernel read-only data: 1336k 
init: console-setup main process (63) terminated with status 1 
%Ginit: plymouth main process (45) killed by SEGV signal 
init: plymouth-splash main process (196) terminated with status 2 
cloud-init running: Thu, 09 Sep 2010 17:37:54 +0000. up 2.61 seconds 
mountall: Disconnected from Plymouth 
init: hwclock-save main process (291) terminated with status 1 
Checking for running unattended-upgrades: * Asking all remaining processes to terminate...  
[80G 
[74G[ OK ] 
* All processes ended within 1 seconds....  
[80G 
[74G[ OK ] 
* Deconfiguring network interfaces...  
[80G 
[74G[ OK ] 
* Deactivating swap...  
[80G 
[74G[ OK ] 
* Unmounting local filesystems...  
[80G 
[74G[ OK ] 
* Will now halt 
[ 185.599636] System halted. 

交換的這種方法在過去同尺寸的實例化之間運作良好,這是我在不同尺寸之間做這第一次嘗試。這僅僅是不可能的,還是我錯過了我的EC2知識中的一些基礎知識?

回答

-1

我沒有在您身邊看到問題。這可能是亞馬遜基礎架構中的一個問題。

5

即使這可能會遷移到服務器故障,我今天早些時候遇到了與此實例完全相同的問題。

看起來這個圖像assumes that there will be ephemeral storage present,當微實例沒有。要解決這個問題,註釋掉在/ etc/fstab中的以下行:

/dev/sda2 /mnt auto defaults,comment=cloudconfig 0 0 

這可以防止例如,從掛在啓動時,或者至少是與AMI-1234de7b爲我做的。

1

我使用alestic ami(ami-2c354b7e)創建了一個新的微型實例。我能夠第一次正常登錄系統。但一旦我重新啓動系統,我無法再次登錄。

評論上面指出的行爲我工作。 「/ dev/sda2/mnt auto defaults,comment = cloudconfig 0 0」

1

將線條註釋掉並沒有完全解決。如果重新啓動,它會寫在同一行早在您需要:

$ l="deb http://archive.ubuntu.com/ubuntu lucid-proposed main" 
$ echo "$l" | sudo tee -a /etc/apt/sources.list 
$ sudo apt-get update && sudo apt-get install cloud-init 
$ dpkg-query --show cloud-init 

我假定這將很快固定在Ubuntu官方發佈,你會不會有做到這一點,但對於現在...

來源:https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/634102

同時,我們有過基於Ubuntu官方AMI的微的這項工作一對夫婦圖片:http://blog.simpledeployr.com/2010/09/new-ruby-amis-with-latest-ubuntu-lucid.html