设为首页 收藏本站
查看: 1244|回复: 0

[Cloudstack] cloudstack delete zone

[复制链接]

尚未签到

发表于 2015-10-13 13:01:12 | 显示全部楼层 |阅读模式
第一步:CloudStack数据库的重新初始化
  1)、停止CloudStack服务。service cloud-management stop.
  2)、到mysql里查询select uuid from storage_pool; 删除存储的SR。
  [iyunv@aa ~]# mysql -u root -ptcloud
  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;
  [iyunv@aa ~]# mysql -u root -ptcloud
  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数据库 cloudstack-setup-databases cloud:password@localhost –deploy-as=root:password
  [iyunv@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
  [iyunv@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。
  =====================================================================================================
  在进行环境清理,然后重建环境需要注意的步骤

1. 管理节点

(1) 通过mysql客户端登陆mysql服务器,删除cloud,cloud_usage,cloudbridge库

(2) 重新通过命令初始化如上库

必要的时候(希望完全清理的时候),挂载二级存储,一级存储,删除所有文件,然后重新挂载二级存储,导入系统VM模板

2. 代理节点

(1) 针对KVM主机, virsh pool-destroy 原有的存储池 (一级存储以及二级存储)

(2) 针对VCenter,卸载原有挂载的存储(一级存储以及二级存储),需事先删除所有的主机跟模板文件。



然后再重新通过按照上面的安装步骤进行环境的重新搭建,基本不会出现由于旧环境的残留数据引起的奇怪问题。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-126305-1-1.html 上篇帖子: CloudStack 学习资料 下篇帖子: CentOS6.3安装CloudStack4.0
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表