CloudStack清空配置方法

來源:互聯網
上載者:User
第一步:CloudStack資料庫的重新初始化
  1)、停止CloudStack服務。service cloudstack-management stop
  2)、到mysql裡查詢select uuid from storage_pool; 刪除儲存的SR。

  [root@aa ~]# mysql -u root -p

       password:   mysql> use cloud;
  Database changed
  mysql> select uuid from storage_pool;
  +————————————–+
  | uuid |
  +————————————–+
  | 6550eb15-daed-363e-be38-7e76bcd973ec |
  | 7abfabe4-7081-3b1e-8ab3-4dcbc9633636 |
  | db8002d3-1c41-383c-bab3-a561b9583547 |
  +————————————–+
  3 rows in set (0.00 sec)
  3)、刪除CloudStack資料庫,drop database cloud; drop database cloud_usage;

  [root@aa ~]# mysql -u root -p

       password:   Welcome to the MySQL monitor. Commands end with ; or \g.
  Your MySQL connection id is 11958
  Server version: 5.0.77 Source distribution
  Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
  mysql> drop database cloud; drop database cloud_usage;
  4)、重新部署CloudStack資料庫 cloud-setup-databases cloud:password@localhost –deploy-as=root:password
  [root@aa ~]# cloud-setup-databases cloud:password@localhost –deploy-as=root:password
  Testing specified deployment credentials on server localhost:3306
  Setting up user credentials in:
  -> /etc/cloud/management/db.properties … done.
  Applying file /usr/share/cloud/setup/create-database.sql to the database on server localhost:3306
  Applying file /usr/share/cloud/setup/create-schema.sql to the database on server localhost:3306
  Applying file /usr/share/cloud/setup/create-database-premium.sql to the database on server localhost:3306
  Applying file /usr/share/cloud/setup/create-schema-premium.sql to the database on server localhost:3306
  Applying file /usr/share/cloud/setup/server-setup.sql to the database on server localhost:3306
  Applying file /usr/share/cloud/setup/templates.sql to the database on server localhost:3306
  Applying file /usr/share/cloud/setup/create-index-fk.sql to the database on server localhost:3306
  
  5)、cloud-setup-management
  [root@aa ~]# cloud-setup-management
  Starting to configure ElasterStack Management Server:
  Configure sudoers … [OK]
  Configure Firewall … [OK]
  Configure CloudStack Management Server …[OK]
  ElasterStack Management Server setup is Done!
  第二步:初始化主儲存和二級儲存
  1)、刪除主儲存和二級儲存中的所有檔案
  第三步:準備二級儲存
  1)、在管理節點上掛載二級儲存NFS目錄:/export/secondary。
  # mkdir -p /mnt/secondary
  # mount -t nfs 172.16.204.111:/export/secondary /mnt/secondary/
  2)、下載SystemVm檔案
  3)、解壓SystemVm檔案
  #/usr/lib64/cloud/agent/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -f systemvm.vhd.bz2 -h xenserver -F
  4)、完成以後,卸載二級儲存
  #umount /mnt/secondary/
  第四步:重新安裝主機上的Hypervistor。
  如果要是不想重新安裝主機上的Hypervistor,參考第一步的第2項,刪除儲存的Sr。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.