国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
分布式存儲(chǔ)Ceph的幾種安裝方法,源碼,apt
最近搞了下分布式PB級(jí)別的存儲(chǔ)CEPH 
嘗試了幾種不同的安裝,使用
期間遇到很多問(wèn)題,和大家一起分享。
一、源碼安裝
說(shuō)明:源碼安裝可以了解到系統(tǒng)各個(gè)組件, 但是安裝過(guò)程也是很費(fèi)勁的,主要是依賴(lài)包太多。 當(dāng)時(shí)嘗試了centos 和 ubuntu 上安裝,都是可以安裝好的。


2 安裝編譯工具apt-get install automake autoconf automake libtool make

3 解壓
#tar zxvf  ceph-0.72.tar.gz 
#cd  ceph-0.72.tar.gz 
#./autogen.sh
4、

先安裝依賴(lài)包

#apt-get install autotools-dev autoconf automake cdbs g++ gcc git libatomic-ops-dev libboost-dev \
libcrypto++-dev libcrypto++ libedit-dev libexpat1-dev libfcgi-dev libfuse-dev \
libgoogle-perftools-dev libgtkmm-2.4-dev libtool pkg-config uuid-dev libkeyutils-dev \
uuid-dev libkeyutils-dev  btrfs-tools

4 可能遇到錯(cuò)誤

4.1 fuse:
apt-get install fuse-devel

4.2 tcmalloc:
wget https://gperftools.googlecode.com/files/gperftools-2.1.zip
安裝google-perftools
4.3 libedit:
 apt-get install libedit-devel

4.4 no libatomic-ops found
apt-get install
libatomic_ops-devel

4.5 snappy:

4.6 libleveldb not found:
make
 cp libleveldb.* /usr/lib
cp -r include/leveldb   /usr/local/include

4.7 libaio
apt-get install libaio-dev

4.8 boost
apt-get install libboost-dev
apt-get install libboost-thread-dev
apt-get install libboost-program-options-dev

4.9 g++
apt-get install g++

5 編譯安裝

#./configure –prefix=/opt/ceph/
#make
#make install



二、使用ubuntn 12.04自帶的ceph 版本可能是ceph version 0.41

資源:

兩臺(tái)機(jī)器:一臺(tái)server,一臺(tái)client,安裝ubuntu12.04

其中,server安裝時(shí),另外分出兩個(gè)區(qū),作為osd0、osd1的存儲(chǔ),沒(méi)有的話,系統(tǒng)安裝好后,使用loop設(shè)備虛擬出兩個(gè)也可以。

1、服務(wù)端安裝CEPH  (MON、MDSOSD)
apt-cache search ceph
apt-get install ceph
apt-get install ceph-common

2、添加keyAPT中,更新sources.list,安裝ceph

wget -q -O- 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc'
| sudo apt-key add -

echo deb http://ceph.com/debian/
$(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list

apt-get update &&
sudo apt-get install ceph

3、查看版本

# ceph-v  //將顯示ceph的版本和key信息

如果沒(méi)有顯示,請(qǐng)執(zhí)行如下命令

# sudo apt-get update
&& apt-get upgrade

4、配置文件
# vim /etc/ceph/ceph.conf

[global] 
    # For version 0.55 and beyond, you must explicitly enable  
    # or disable authentication with "auth" entries in [global]. 
    auth cluster required = none 
    auth service required = none 
    auth client required = none 
[osd] 
    osd journal size = 1000 
    #The following assumes ext4 filesystem. 
    filestore xattr use omap = true 
    # For Bobtail (v 0.56) and subsequent versions, you may  
    # add settings for mkcephfs so that it will create and mount 
    # the file system on a particular OSD for you. Remove the comment `#`  
    # character for the following settings and replace the values  
    # in braces with appropriate values, or leave the following settings  
    # commented out to accept the default values. You must specify the  
    # --mkfs option with mkcephfs in order for the deployment script to  
    # utilize the following settings, and you must define the 'devs' 
    # option for each osd instance; see below. 
    osd mkfs type = xfs 
    osd mkfs options xfs = -f   # default for xfs is "-f"    
    osd mount options xfs = rw,noatime # default mount option is "rw,noatime" 
    # For example, for ext4, the mount option might look like this: 
    #osd mkfs options ext4 = user_xattr,rw,noatime 
    # Execute $ hostname to retrieve the name of your host, 
    # and replace {hostname} with the name of your host. 
    # For the monitor, replace {ip-address} with the IP 
    # address of your host. 
[mon.a] 
    host = ceph1 
    mon addr = 192.168.1.1:6789 
[osd.0] 
    host = ceph1 
    # For Bobtail (v 0.56) and subsequent versions, you may  
    # add settings for mkcephfs so that it will create and mount 
    # the file system on a particular OSD for you. Remove the comment `#`  
    # character for the following setting for each OSD and specify  
    # a path to the device if you use mkcephfs with the --mkfs option. 
    devs = /dev/sdb1 
[mds.a] 
    host = ceph1 

5、執(zhí)行初始化

sudo
mkcephfs -a -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.keyring

注意每次初始化 需要 刪除原有 數(shù)據(jù) 目錄 

rm
–rf /var/lib/ceph/osd/ceph-0/*

rm
–rf /var/lib/ceph/osd/ceph-1/*

rm
–rf /var/lib/ceph/mon/ceph-a/*

rm –rf /var/lib/ceph/mds/ceph-a/*


mkdir
-p /var/lib/ceph/osd/ceph-0

mkdir
-p /var/lib/ceph/osd/ceph-1

mkdir
-p /var/lib/ceph/mon/ceph-a

mkdir
-p /var/lib/ceph/mds/ceph-a

6、啟動(dòng) 

service ceph -a start

7、執(zhí)行健康檢查

 ceph
health

8、磁盤(pán)用
ext4 出現(xiàn) mount 5 錯(cuò)誤

后來(lái)用

mkfs.xfs  -f
/dev/sda7

就 好了。 


9、在客戶端上操作:

sudo
mkdir /mnt/mycephfs

sudo
mount -t ceph {ip-address-of-monitor}:6789:/ /mnt/mycephfs


三、ceph-deploy安裝

1、下載


https://github.com/ceph/ceph-deploy/archive/master.zip


2、

apt-get install python-virtualenv

 ./bootstrap 

3、

ceph-deploy install ubuntu1

4、

ceph-deploy new ubuntu1

5、

ceph-deploy mon
create
ubuntu1

6、

ceph-deploy gatherkeys

遇錯(cuò)提示沒(méi)有keyring則執(zhí)行:

ceph-deploy forgetkeys

會(huì)生成

{cluster-name}.client.admin.keyring

{cluster-name}.bootstrap-osd.keyring

{cluster-name}.bootstrap-mds.keyring

7、

ceph-deploy osd create ubuntu1:/dev/sdb1 (磁盤(pán)路徑)

可能遇到錯(cuò):

1、磁盤(pán)已經(jīng)掛載,用umount

2、磁盤(pán)格式化問(wèn)題,用fdisk分區(qū),
mkfs.xfs -f /dev/sdb1 格式化

8、

ceph -s

可能遇到錯(cuò)誤:

提示沒(méi)有osd

 health HEALTH_ERR 192 pgs stuck inactive; 192 pgs stuck unclean; no osds

則執(zhí)行ceph osd create


9、

    cluster faf5e4ae-65ff-4c95-ad86-f1b7cbff8c9a

     health HEALTH_WARN 192 pgs degraded; 192 pgs stuck unclean

     monmap e1: 1 mons at {ubuntu1=12.0.0.115:6789/0}, election epoch 1, quorum 0 ubuntu1

     osdmap e10: 3 osds: 1 up, 1 in

      pgmap v17: 192 pgs, 3 pools, 0 bytes data, 0 objects

            1058 MB used, 7122 MB / 8181 MB avail

                 192 active+degraded


10、客戶端掛摘

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
ubuntu中U盤(pán)硬盤(pán)格式化(NTFS,F(xiàn)AT12,F(xiàn)AT16,F(xiàn)AT32,EXT4,EXT3,EXT2)
【Python】Ubuntu 18.04 安裝 python3.7
Ubuntu18.04 安裝qt 5.12
ubuntu16.04安裝python3.8
Ubuntu下格式化U盤(pán)的方法(基于格式化命令)
Linux Namespace系列(04):mount namespaces (CLONE
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服