维护手册-常见错误锦集
4.ceph-deploy install node02错误... 4
5. healthHEALTH_WARN too few PGs per OSD (16 < min 30) 10
7.上锁问题could not get lock /var/lib/dpkg/lock. is another process using it? 12
8. SSH 登录失败:Host key verification failed 的解决方法 13
9. 添加monitor失败 GenericError: Failed to add monitor to host 16
10. ImportError: No module named rados locale.Error: unsupported locale setting 18
1.对硬盘分区(如新分区为/dev/sdb)
1. 查看硬盘
2. 分区sudo fdisk/dev/sdb
二、格式化新分区
1.格式化为ext4文件格式: sudomkfs.ext4 /dev/sdb1
三、挂载,挂载到/home2文件夹下
1. 手动挂载
sudomount -t ext4 /dev/sdb1 /home2
2. 自动挂载
sudo vi/etc/fstab
增加下面一行
/dev/sdb1 /home2 ext4 defaults 0 0
2.重启服务器(一般方法重启重启失败后使用)
watchdog 通过监控数据输入是否正常可以实现在系统出现异常时自动重启系统,这里我们刚好可以借用的。
首先需要加载 watchdog 支持,这个和主板硬件设备有关,如果只需要软件模拟的,可以运行:
1.[root@localhost ~]#modprobe softdog
命令加载软件 watchdog 支持,接着再运行:
2. [root@localhost ~]# cat/dev/watchdog
命令,该命令会马上退出并报错,同时系统日志中就会提示(不提示也没问题):
softdog:Unexpected close, not stopping watchdog!
这就表示 watchdog 设备是被意外关闭的而不是正常停止的,大约等待 60 秒之后你就会发现 Linux 系统自动重启了。Linux watchdog 的异常等待时间是通过 /proc/sys/kernel/watchdog_thresh 设置的,一般默认为 60 秒。
3. Ignoring file '50unattended-upgrades.ucf-dist'in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
cephCluster@node02:~$sudo apt-get update
Hit:1http://mirrors.aliyun.com/ubuntu xenialInRelease
Get:2http://mirrors.aliyun.com/ubuntu xenial-backportsInRelease [102 kB]
Get:3http://mirrors.aliyun.com/ubuntu xenial-proposed InRelease [253 kB]
Get:4http://mirrors.aliyun.com/ubuntu xenial-security InRelease [102 kB]
Get:5http://mirrors.aliyun.com/ubuntu xenial-updates InRelease [102 kB]
Get:6http://mirrors.aliyun.com/ubuntu xenial-backports/main Sources [3,312 B]
Get:7http://mirrors.aliyun.com/ubuntu xenial-backports/main amd64 Packages [4,680 B]
Get:8http://mirrors.aliyun.com/ubuntu xenial-backports/main i386 Packages [4,688 B]
Get:9http://mirrors.aliyun.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata[3,328 B]
Get:10http://mirrors.aliyun.com/ubuntu xenial-backports/universe amd64 DEP-11Metadata [4,672 B]
Get:11http://mirrors.aliyun.com/ubuntu xenial-proposed/main Sources [91.7 kB]
Get:12http://mirrors.aliyun.com/ubuntu xenial-proposed/main amd64 Packages [113kB]
Get:13http://mirrors.aliyun.com/ubuntu xenial-proposed/main i386 Packages [107 kB]
Get:14http://mirrors.aliyun.com/ubuntu xenial-proposed/main Translation-en [43.7 kB]
Get:15http://mirrors.aliyun.com/ubuntu xenial-proposed/main amd64 DEP-11 Metadata[76.3 kB]
Get:16http://mirrors.aliyun.com/ubuntu xenial-proposed/multiverse amd64 DEP-11Metadata [3,932 B]
Get:17http://mirrors.aliyun.com/ubuntu xenial-proposed/multiverse DEP-11 64x64 Icons[6,734 B]
Get:18http://mirrors.aliyun.com/ubuntu xenial-proposed/universe amd64 Packages [55.6kB]
Get:19http://mirrors.aliyun.com/ubuntu xenial-proposed/universe i386 Packages [52.4kB]
Get:20http://mirrors.aliyun.com/ubuntu xenial-proposed/universe Translation-en [20.7kB]
Get:21http://mirrors.aliyun.com/ubuntu xenial-proposed/universe amd64 DEP-11 Metadata[12.9 kB]
Get:22http://mirrors.aliyun.com/ubuntu xenial-proposed/universe DEP-11 64x64 Icons[19.8 kB]
Get:23http://mirrors.aliyun.com/ubuntu xenial-security/main amd64 DEP-11 Metadata[54.6 kB]
Get:24http://mirrors.aliyun.com/ubuntu xenial-security/main DEP-11 64x64 Icons [45.7kB]
Get:25http://mirrors.aliyun.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata[35.7 kB]
Get:26http://mirrors.aliyun.com/ubuntu xenial-security/universe DEP-11 64x64 Icons[52.2 kB]
Get:27http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 Packages [572 kB]
Get:28http://mirrors.aliyun.com/ubuntu xenial-updates/main i386 Packages [553kB]
Get:29http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [298kB]
Get:30http://mirrors.aliyun.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [201kB]
Get:31http://mirrors.aliyun.com/ubuntu xenial-updates/multiverse amd64 DEP-11Metadata [2,516 B]
Get:32http://mirrors.aliyun.com/ubuntu xenial-updates/universe amd64 Packages [493kB]
Get:33http://mirrors.aliyun.com/ubuntu xenial-updates/universe i386 Packages [474kB]
Get:34http://mirrors.aliyun.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata[163 kB]
Get:35http://mirrors.aliyun.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons[208 kB]
Fetched4,337 kB in 16s (266 kB/s)
Readingpackage lists... Done
N:Ignoring file '50unattended-upgrades.ucf-dist' in directory'/etc/apt/apt.conf.d/' as it has an invalid filename extension
解决方法:
sudorm/etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist
4.ceph-deploy install node02错误
cephCluster@admin-node:~/my-cluster$ceph-deploy install node02
[ceph_deploy.conf][DEBUG] found configuration file at: /home/cephCluster/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.37): /usr/bin/ceph-deployinstall node02
[ceph_deploy.cli][INFO ]ceph-deploy options:
[ceph_deploy.cli][INFO ] verbose :False
[ceph_deploy.cli][INFO ] testing :None
[ceph_deploy.cli][INFO ]cd_conf :<ceph_deploy.conf.cephdeploy.Conf instance at 0x7f36cf0d6d88>
[ceph_deploy.cli][INFO ] cluster :ceph
[ceph_deploy.cli][INFO ]dev_commit : None
[ceph_deploy.cli][INFO ]install_mds : False
[ceph_deploy.cli][INFO ] stable : None
[ceph_deploy.cli][INFO ]default_release : False
[ceph_deploy.cli][INFO ] username :None
[ceph_deploy.cli][INFO ]adjust_repos : True
[ceph_deploy.cli][INFO ]func :<function install at 0x7f36cf52c398>
[ceph_deploy.cli][INFO ]install_all : False
[ceph_deploy.cli][INFO ] repo :False
[ceph_deploy.cli][INFO ] host :['node02']
[ceph_deploy.cli][INFO ]install_rgw : False
[ceph_deploy.cli][INFO ]install_tests : False
[ceph_deploy.cli][INFO ]repo_url : None
[ceph_deploy.cli][INFO ]ceph_conf : None
[ceph_deploy.cli][INFO ]install_osd : False
[ceph_deploy.cli][INFO ]version_kind : stable
[ceph_deploy.cli][INFO ]install_common : False
[ceph_deploy.cli][INFO ]overwrite_conf : False
[ceph_deploy.cli][INFO ] quiet :False
[ceph_deploy.cli][INFO ]dev : master
[ceph_deploy.cli][INFO ]nogpgcheck : False
[ceph_deploy.cli][INFO ]local_mirror : None
[ceph_deploy.cli][INFO ] release :None
[ceph_deploy.cli][INFO ]install_mon : False
[ceph_deploy.cli][INFO ]gpg_url : None
[ceph_deploy.install][DEBUG] Installing stable version jewel on cluster ceph hosts node02
[ceph_deploy.install][DEBUG] Detecting platform for host node02 ...
[node02][DEBUG] connection detected need for sudo
[node02][DEBUG] connected to host: node02
[node02][DEBUG] detect platform information from remote host
[node02][DEBUG] detect machine type
[ceph_deploy.install][INFO ]Distro info: Ubuntu 16.04 xenial
[node02][INFO ] installing Ceph on node02
[node02][INFO ] Running command: sudoenvDEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get --assume-yes -q--no-install-recommends install ca-certificates apt-transport-https
[node02][DEBUG] Reading package lists...
[node02][DEBUG] Building dependency tree...
[node02][DEBUG] Reading state information...
[node02][DEBUG] ca-certificates is already the newest version (20160104ubuntu1).
[node02][DEBUG] apt-transport-https is already