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

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

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

開(kāi)通VIP
如何在 BladeCenter JS20 上安裝 PVFS2 文件系統(tǒng)

如何在 BladeCenter JS20 上安裝 PVFS2 文件系統(tǒng)

適用機(jī)型:
所有BladeCenter JS20

文檔內(nèi)容:
    近些年來(lái),越來(lái)越多的應(yīng)用程序?qū)O的性能提出了更高的要求,特別是針對(duì)一些大數(shù)據(jù)集的應(yīng)用程序,針對(duì)這種情況,常見(jiàn)的一種方法就是通過(guò)并行的方式來(lái)提高IO的性能。
    PVFS 是并行虛擬文件系統(tǒng) Parallel Virtual File System 的縮寫(xiě)。這是一種開(kāi)放的文件系統(tǒng),這種文件系統(tǒng)就好象陣列的條帶化一樣,使用高速連接的多臺(tái)機(jī)器上的硬盤(pán)空間,組成一個(gè)虛擬的文件系統(tǒng)。如果通訊網(wǎng)絡(luò)足夠快的話,它的性能會(huì)大大高于本地的存儲(chǔ)。而 PVFS2 是基于 PVFS 開(kāi)發(fā)的,支持Linux 2.6 的內(nèi)核,并做了其它的一些改進(jìn)。
    目前在國(guó)內(nèi),我們經(jīng)常會(huì)聽(tīng)到很多客戶用多臺(tái)服務(wù)器組建出一個(gè)高性能計(jì)算的集群,其中有很多應(yīng)用程序都是IO密集型的應(yīng)用,在這種情況下,就需要采用PVFS2或者GPFS這樣的并行文件系統(tǒng)。
    通常,PVFS2可以運(yùn)行在基于Intel的Linux 操作系統(tǒng)下,但是,得益于開(kāi)放源碼的特點(diǎn),我們可以很容易的把PVFS2移植到Power架構(gòu)下。下面我們就用幾個(gè)IBM BladeCenter JS20的刀片服務(wù)器來(lái)實(shí)驗(yàn)一下PVFS2文件系統(tǒng)的安裝及設(shè)置。

    PVFS2 對(duì)軟件包的要求:

    db-devel
    kernel-source
    db-64bit (生成64位的PVFS2 Client 時(shí)需要)

    測(cè)試環(huán)境:


    在這里,我們使用的是PVFS2 1.3.0 的版本,可以從下面網(wǎng)址去下載
    http://www.pvfs.org/pvfs2/index.html

    BladeCenter JS20 三臺(tái),在本次實(shí)驗(yàn)中,我們用兩臺(tái) BladeCenter JS20 來(lái)做為 PVFS2 Data I/O Server (node17, node18),而 node17 同時(shí)也是 PVFS2 MetaData Server. 另外一臺(tái) BladeCenter 我們做為 PVFS2 Client
    node17 (192.168.28.57)
    node18 (192.168.28.58)
    test01 (192.168.28.60)

    操作系統(tǒng)我們使用的是 SuSE Linux Enterprise Server 9

    PVFS2 Server 的安裝:

    (我們把下載的 pvfs2-1.3.0.tar.gz 放在了 /tmp 目錄下)
    首先我們要進(jìn)行解包:
    node17:/tmp # tar xzvf pvfs2-1.3.0.tar.gz
    然后進(jìn)行設(shè)置:
    node17:/tmp # cd pvfs2-1.3.0/
    node17:/tmp/pvfs2-1.3.0 # ./configure
    最后會(huì)出現(xiàn)下面的顯示信息:
    ***** Displaying PVFS2 Configuration Information *****
    ------------------------------------------------------
    PVFS2 configured to build karma gui : no
    PVFS2 configured to use epoll : no
    PVFS2 configured to perform coverage analysis : no
    PVFS2 configured for aio threaded callbacks : yes
    PVFS2 configured for the 2.6.x kernel module : no
    PVFS2 configured for the 2.4.x kernel module : no
    PVFS2 configured for using the mmap-ra-cache : no
    PVFS2 configured for a thread-safe client library : yes
    PVFS2 will use workaround for redhat 2.4 kernels : no
    PVFS2 will use workaround for buggy NPTL : no
    PVFS2 server will be built : yes
    PVFS2 version string: 1.3.0

    生成二進(jìn)制文件:
    node17:/tmp/pvfs2-1.3.0 # make

    安裝生成的二進(jìn)制文件:
    node17:/tmp/pvfs2-1.3.0 # make install

    同樣的操作,我們要在另一個(gè)裝備做為PVFS2 I/O Server 的 node18 上再做一遍。

    PVFS2 Client 的安裝:

    在準(zhǔn)備做為 PVFS2 Client 的 test01 上,我們要生成 64 位的應(yīng)用程序,這是由于我們使用的Linux內(nèi)核是64位的,PVFS2 Client 必須與內(nèi)核匹配。
    (我們把下載的 pvfs2-1.3.0.tar.gz 放在了 /tmp 目錄下)
    解開(kāi)壓縮包:
    test02:/tmp # tar xzvf pvfs2-1.3.0.tar.gz
    test02:/tmp # cd pvfs2-1.3.0/
    編譯前,先定義兩個(gè)環(huán)境變量,這樣,在生成二進(jìn)制文件中,就會(huì)生成64位的程序:
    test02:/tmp/pvfs2-1.3.0 # export CFLAGS=”-m64”
    test02:/tmp/pvfs2-1.3.0 # export LDFLAGS=”-m64”
    生成二進(jìn)制文件(使用 --disable-server 選項(xiàng)會(huì)在編譯時(shí),不成生PVFS2 Server 的相關(guān)程序):
    test02:/tmp/pvfs2-1.3.0 # ./configure --with-kernel=/usr/src/linux –disable-server

    ***** Displaying PVFS2 Configuration Information *****
    ------------------------------------------------------
    PVFS2 configured to build karma gui : no
    PVFS2 configured to use epoll : no
    PVFS2 configured to perform coverage analysis : no
    PVFS2 configured for aio threaded callbacks : yes
    PVFS2 configured for the 2.6.x kernel module : yes
    PVFS2 configured for the 2.4.x kernel module : no
    PVFS2 configured for using the mmap-ra-cache : no
    PVFS2 configured for a thread-safe client library : yes
    PVFS2 will use workaround for redhat 2.4 kernels : no
    PVFS2 will use workaround for buggy NPTL : no
    PVFS2 server will be built : no

    PVFS2 version string: 1.3.0

    生成二進(jìn)制文件:
    node17:/tmp/pvfs2-1.3.0 # make

    安裝生成的二進(jìn)制文件:
    node17:/tmp/pvfs2-1.3.0 # make install

    準(zhǔn)備生成 kernel module:
    test02:/tmp/pvfs2-1.3.0 # make kmod

    安裝生成的 kernel module:
    test02:/tmp/pvfs2-1.3.0 # make kmod_install

    運(yùn)行 PVFS

    設(shè)置 PVFS Server:
    在 node17 上,運(yùn)行下面命令:
    node17:/tmp/pvfs2-1.3.0 # pvfs2-genconfig /etc/pvfs2-fs.conf /etc/pvfs2-server.conf
    · Protocol: tcp
    · Port: 3334
    · I/O Servers: 所有準(zhǔn)備提供存儲(chǔ)空間的服務(wù)器
    · Metadata Server: 做為Metadata 的服務(wù)器
    · Logfile: /var/log/pvfs2.log
    · Data store directory: /pvfs-storage
    初始化做為 pvfs2 的存儲(chǔ)空間:
    在 node17 和 node18 上,都要執(zhí)行,缺省情況下,會(huì)是 /pvfs2-storage-space,可以通過(guò)修改 /etc/pvfs2-server.conf-* 的文件來(lái)更改。
    node17 上
    node17:/tmp/pvfs2-1.3.0 # pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-node17 –f
    node18 上
    node18:/tmp/pvfs2-1.3.0 # pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-node18 -f

    啟動(dòng) pvfs2 server:
    node17 上
    node17:/tmp/pvfs2-1.3.0 # pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-node17
    [22:38:42.560848] PVFS2 Server version 1.3.0 starting.
    node18 上
    node18:/tmp/pvfs2-1.3.0 # pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-node18
    [22:38:42.560848] PVFS2 Server version 1.3.0 starting.

    設(shè)置 PVFS2 Client:
    test02:/tmp/pvfs2-1.3.0 # mkdir /mnt/pvfs2

    test02:/tmp/pvfs2-1.3.0 # vi /etc/pvfs2tab
    加入一行
    tcp://node17:3334/pvfs2-fs /mnt/pvfs2 pvfs2 defaults 0 0

    測(cè)試 pvfs2:
    test02:/tmp/pvfs2-1.3.0 # pvfs2-ping -m /mnt/pvfs2/

    (1) Parsing tab file...

    (2) Initializing system interface...

    (3) Initializing each file system found in tab file: /etc/pvfs2tab...

    /mnt/pvfs2: Ok

    (4) Searching for /mnt/pvfs2/ in pvfstab...

    PVFS2 servers: tcp://node17:3334
    Storage name: pvfs2-fs
    Local mount point: /mnt/pvfs2

    meta servers:
    tcp://node17:3334

    data servers:
    tcp://node17:3334
    tcp://node18:3334

    (5) Verifying that all servers are responding...

    meta servers:
    tcp://node17:3334 Ok

    data servers:
    tcp://node17:3334 Ok
    tcp://node18:3334 Ok

    (6) Verifying that fsid 1106969663 is acceptable to all servers...

    Ok; all servers understand fs_id 1106969663

    (7) Verifying that root handle is owned by one server...

    Root handle: 1048576
    Ok; root handle is owned by exactly one server.

    =============================================================

    The PVFS filesystem at /mnt/pvfs2/ appears to be correctly configured.

    我們可以先嘗試向 pvfs2 文件系統(tǒng)上寫(xiě)一個(gè)文件
    test02:/tmp/pvfs2-1.3.0 # pvfs2-ls /mnt/pvfs2
    lost+found

    我們用dd創(chuàng)建一個(gè)100MB的用來(lái)測(cè)試的文件 testfile
    test02:/tmp/pvfs2-1.3.0 # dd if=/dev/zero of=/tmp/testfile bs=1024 count=102400
    102400+0 records in
    102400+0 records out

    把 testfile 拷貝到PVFS2文件系統(tǒng)上
    test02:/tmp/pvfs2-1.3.0 # pvfs2-cp /tmp/testfile /mnt/pvfs2

    檢查一下剛才拷貝的文件是否存大,文件大小是否一致
    test02:/tmp/pvfs2-1.3.0 # pvfs2-ls -lh /mnt/pvfs2
    drwxrwxrwx 1 root root 4.0K 2005-09-21 22:48 lost+found
    -rw-r--r-- 1 root root 100.0M 2005-09-21 14:44 testfile

    刪除剛才拷貝的文件 testfile
    test02:/tmp/pvfs2-1.3.0 # pvfs2-rm /mnt/pvfs2/testfile
    test02:/tmp/pvfs2-1.3.0 # pvfs2-ls /mnt/pvfs2
    lost+found

    上面,我們是使用PVFS提供的工具來(lái)對(duì)PVFS2文件系統(tǒng)來(lái)訪問(wèn),如果要在操作系統(tǒng)下,象訪問(wèn)本地硬盤(pán)一樣直接訪問(wèn)PVFS2文件系統(tǒng),我們需要先加載 pvfs2 文件系統(tǒng)到 /mnt/pvfs2,這樣我們就可以用正常的方式來(lái)訪問(wèn) pvfs2 文件系統(tǒng)了。

    首先要加載 pvfs2.ko 模塊:
    test02:/tmp/pvfs2-1.3.0 # depmod
    test02:/tmp/pvfs2-1.3.0 # modprobe pvfs2
    (在剛才執(zhí)行了 make kmod_install 以后,pvfs2.ko 會(huì)被安裝到 /lib/modules/2.6.5-7.97-pseries64/kernel/fs/pvfs2 目錄下)

    啟動(dòng) pvfs2 client:
    test02:/tmp/pvfs2-1.3.0 # pvfs2-client –p /usr/local/sbin/pvfs2-client-core
    (一定要先加裁 pvfs2.ko 的模塊,再啟動(dòng) pvfs2 client 程序)

    加載 pvfs2 文件系統(tǒng)
    mount –t pvfs2 tcp://node17:3334/pvfs2-fs /mnt/pvfs2

    現(xiàn)在,我們就可以用系統(tǒng)命令來(lái)訪問(wèn) pvfs2 文件系統(tǒng)了:
    test02:/tmp/pvfs2-1.3.0 # ls /mnt/pvfs2/
    . .. lost+found
    test02:/tmp/pvfs2-1.3.0 # cp /tmp/testfile /mnt/pvfs2/
    test02:/tmp/pvfs2-1.3.0 # ll -h /mnt/pvfs2/
    total 101M
    drwxrwxrwx 2 root root 4.0K Oct 21 14:52 .
    drwxr-xr-x 3 root root 72 Oct 20 17:08 ..
    drwxrwxrwx 1 root root 4.0K Oct 21 2005 lost+found
    -rw-r--r-- 1 root root 100M Oct 21 14:52 testfile
    test02:/tmp/pvfs2-1.3.0 # rm /mnt/pvfs2/testfile
    test02:/tmp/pvfs2-1.3.0 # ls /mnt/pvfs2/
    . .. lost+found

    注:
    下載 PVFS2 的網(wǎng)址
    http://www.pvfs.org/pvfs2/download.html
    PVFS2 的 FAQ 以及 QuickGuide
    http://www.pvfs.org/pvfs2/documentation.html



    讓系統(tǒng)啟動(dòng)時(shí),pvfs2 server 做為一個(gè)服務(wù)自動(dòng)啟動(dòng):
    把下面的文件拷貝到 /etc/init.d 目錄下,并且用 chmod 改為可執(zhí)行

    (此文件是根據(jù) example/pvfs2-server.rc 改的,因?yàn)?pvfs2-server.rc 是針對(duì) Red Hat 的腳本)
    執(zhí)行命令
    test02:/tmp/pvfs2-1.3.0 # chkconfig –a pvfs2-server
    test02:/tmp/pvfs2-1.3.0 # ln –s /etc/init.d/pvfs2-server /usr/sbin/rcpvfs2-server


本站僅提供存儲(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)似文章
skyeye下執(zhí)行為uClinux編寫(xiě)的程序
Linux下cp的命令解釋
《linux調(diào)試工具fuser的深入分析》
配置系統(tǒng)nfs服務(wù)以及nfs共享掛載到目標(biāo)板mini2440上
virsh KVM文件管理_virsh 傳文件_weixin
linux下文件加密方法總結(jié)
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服