作者归档:debugger

yum安装gitlab突然有了新版本的奇葩经历

yum install -y gitlab-ce 安装gitlab的时候,2019年07月30日01:33:48当前最新版本是12.1.1的版本。突然下载到百分五十左右的时候。突然下载失败了。然后重新运行命令的时候居然显示安装的版本12.1.2,哈哈,看来直接被切成新版本的下载地址了,下载到半中间的直接被切断。

yum -y update系统升级导致gitlab凉凉

为了安全原因,为了剩下200美金一个月aws四核7.5G的服务器费用,弄到内网服务器吧。内网的一个虚拟机有近两个月装过专门拿来装gitlab的服务器。只是办公司一直断电所以一直就没用内网的gitlab服务器。

有喜欢新版本的习惯,升级了一下,看到提示同时升级了gitlab,但是怎么看到是升级gitlab-ee呢?

搜了一下说是用gitlab-ctl reconfigure解决

Running handlers:
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 53) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
—- Begin output of “bash” “/tmp/chef-script20190728-29603-rqc88z” —-
STDOUT: rake aborted!
Your current database version is too old to be migrated. You should upgrade to GitLab 11.11.0 before moving to this version. Please see https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/migrate/schema_check.rake:13:in block in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:inblock (3 levels) in ‘
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in
Tasks: TOP => db:migrate => schema_version_check
(See full trace by running task with –trace)
STDERR:
—- End output of “bash” “/tmp/chef-script20190728-29603-rqc88z” —-
Ran “bash” “/tmp/chef-script20190728-29603-rqc88z” returned 1

然后干脆再次蛋疼运行升级命令

再次升级看到的是升级gitlab-ce了。

Running handlers:
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 53) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
—- Begin output of “bash” “/tmp/chef-script20190728-2049-19chsyy” —-
STDOUT: rake aborted!
Your current database version is too old to be migrated. You should upgrade to GitLab 11.11.0 before moving to this version. Please see https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/migrate/schema_check.rake:13:in block in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:56:inblock (3 levels) in ‘
/opt/gitlab/embedded/bin/bundle:23:in load' /opt/gitlab/embedded/bin/bundle:23:in
Tasks: TOP => db:migrate => schema_version_check
(See full trace by running task with –trace)
STDERR:
—- End output of “bash” “/tmp/chef-script20190728-2049-19chsyy” —-
Ran “bash” “/tmp/chef-script20190728-2049-19chsyy” returned 1

反正本地那个是空的还是重新安装最新版本吧。

在群晖上搭建NFS给EXSI当外挂存储

esxi虚拟化的正确打开方式是:把esxi系统安装在u盘,tf卡,单块硬盘等上,而虚拟机存储在非易失性存储设备上,如多盘raid,nas等上。这样即使esxi系统挂了,数据也不会丢失。如果你恰好有nas,可以参考一下使用nfs扩展esxi存储空间,本文以esxi6.7和群晖nas为例。
首先打开群晖nas等nfs服务,默认是关闭的。步骤如下
1,dsm的控制面板,文件服务,smb/afp/nfs,勾选启动nfs服务

启动nfs服务

2,控制面板,共享文件夹,选中esxi要使用的文件夹,点击编辑

编辑共享文件夹

3,然后选中nfs权限,新增,记下装载路径

新增nfs客户端

4,填入esxi的ip地址,权限可读写

nfs客户端

然后在esxi上添加nfs存储设备,步骤如下
1,esxi的网络控制台,存储,数据存储,新建数据存储

新建数据存储

2,选择挂载nfs数据存储

选择挂载nfs

挂载成功后数据存储就会出现刚才添加的nas

填写nfs服务器信息

nfs扩展的数据存储和系统盘在创建虚拟机,上传iso文件等没有使用上的区别

简直舒服,美滋滋。以前没有玩过NFS,也不知道群晖的NAS带NFS可以挂载到ESXI

服务器上的那个RAID5一直很不放心,容量又小又让人着急,终于解决了。

14TB的存储可以顶好一阵子了。