2014年1月30日木曜日

EXPORTエリアのサイズ変更作業


●EXPORTエリアの容量の再作成 開始時刻:[      ]

【サーバ】
【IPアドレス】
【EXPORTエリアのエリア増減対応の有無】
現在のサイズ xxGB → 変更後のサイズ:xxGB


----------------------------------------------------------------------------------

①/dataにバックアップ用フォルダーを作成して、/exportのデータを退避する


・/data へフォルダ作成

コマンド:mkdir /data/export20140130

・データの退避

コマンド:cp -Rpf /export /data/export20140130



②デイクス3を削除

・データ削除

cd /export
rm -R *


・アンマウント
umount /export

・lvの削除
コマンド:lvremove /vg_export/lv_export

・vgの削除
コマンド:vgremove /vg_export

・削除確認
lvdisplay /export


・確認
コマンド:df -h


・vmwareから、 デイクス3を削除

 削除
 追加(xx GB)


③/exportのVG/LVを再作成

・vgの作成 (デプロイ手順書からコマンドを転帰)

コマンド:

・lvの作成 (デプロイ手順書からコマンドを転帰)
コマンド:


・フォーマット: (デプロイ手順書からコマンドを転帰)
コマンド:


・確認
コマンド:df -h


④ ①のデータを戻す

・データの復帰

コマンド:CP -R /data/export20140130 /export ← 確認!!

・確認

コマンド:ls /export


・/Data に作成した退避フォルダの削除

コマンド:rmdir -R /data/export20140130


----------------------------------------------------------------------------------

●第二大阪分を実施する

http://blog.volv.jp/memo/2009/06/vsphere-esx-40-1-strage-vmotion.html

ストレージVモーションを行い、Level_Aのデータストアから正規のデータへの移行をする

・vm停止

・システム・データ
データストア移行元:
データストア移行先:

・EXPORT
データストア移行元:
データストア移行先:

・移行完了の確認

vmware サマリから確認

2014年1月29日水曜日

[root@sfzfs62 vol2]# vi /etc/exports
[root@sfzfs62 vol2]# exportfs -ra
[root@sfzfs62 vol2]# exportfs -v
/vol/share/ES11
192.168.1.0/24(rw,wdelay,root_squash,all_squash,no_subtree_check)
/vol/share/ES21
192.168.1.0/24(rw,wdelay,root_squash,all_squash,no_subtree_check)
/vol2/share/E11R
192.168.1.0/24(rw,wdelay,root_squash,no_subtree_check)
/vol2/share/E21R
192.168.1.0/24(rw,wdelay,root_squash,no_subtree_check)
[root@sfzfs62 vol2]# mount -t nfs /vol2/E11R /connect/ES11
mount.nfs: remote share not in 'host:dir' format
[root@sfzfs62 vol2]# mount -t nfs 192.168.1.41:/vol2/E11R /connect/ES11
[root@sfzfs62 vol2]# mount -t nfs 192.168.1.41:/vol2/E21R /connect/ES21
[root@sfzfs62 vol2]# mount -t nfs 192.168.1.41:/vol/ES21 /connect/ES21
mount.nfs: /connect/ES21 is busy or already mounted
[root@sfzfs62 vol2]# umount /connect/ES11
[root@sfzfs62 vol2]# umount /connect/ES21
[root@sfzfs62 vol2]# mount -t nfs 192.168.1.41:/vol/ES21 /connect/ES21
[root@sfzfs62 vol2]# mount -t nfs 192.168.1.41:/vol/ES21 /connect/ES21

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

[root@ns1 ~]# mount -t nfs4 sfzfs62:/vol/ES21 /connect/ES21
mount.nfs4: Failed to resolve server sfzfs62: Name or service not known
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES21 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES21 failed, reason given by server: No such file or directory
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/share/ES21 /connect/ES21
[root@ns1 ~]#
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES11 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES11 failed, reason given by server: No such file or directory
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES11 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES11 failed, reason given by server: No such file or directory
[root@ns1 ~]# mount -t nfs 192.168.1.41:/vol/ES11 /connect/ES21
^C
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES11 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES11 failed, reason given by server: No such file or directory
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES21 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES21 failed, reason given by server: No such file or directory
[root@ns1 ~]#
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/share/ES21 /connect/ES21
mount.nfs4: /connect/ES21 is busy or already mounted
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES11 /connect/ES11
mount.nfs4: mounting 192.168.1.41:/vol/ES11 failed, reason given by server: No such file or directory
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/share/ES11 /connect/ES11
[root@ns1 ~]# ls /connect/ES11/
ES11-dara.txt
[root@ns1 ~]# umount /connect/ES11
[root@ns1 ~]# umount /connect/ES21
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/share/ES11 /connect/ES11
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES21 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES21 failed, reason given by server: No such file or directory
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES21 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES21 failed, reason given by server: No such file or directory
[root@ns1 ~]# umount /connect/ES21
umount: /connect/ES21: マウントされていません
[root@ns1 ~]# umount /connect/ES11
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/ES21 /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol/ES21 failed, reason given by server: No such file or directory
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol/share/ES21 /connect/ES21
[root@ns1 ~]# ls /connect/ES
ls: cannot access /connect/ES: そのようなファイルやディレクトリはありません
[root@ns1 ~]# ls /connect/ES21
[root@ns1 ~]# mount -t nfs4 192.168.1.41:/vol2/E21R /connect/ES21
mount.nfs4: mounting 192.168.1.41:/vol2/E21R failed, reason given by server: No such file or directory

2014年1月28日火曜日

NFS


###############################################################################
●NFSサーバ設定
###############################################################################

●NFS起動
[root@sfzfs62 ~]# service nfs start
NFS サービスを起動中: [ OK ]
NFS クォータを起動中: [ OK ]
NFS デーモンを起動中: [ OK ]
NFS mountd を起動中: [ OK ]

[root@sfzfs62 ES21]# ps -ef | grep nfs
root 31411 2 0 12:05 ? 00:00:00 [nfsd4]
root 31412 2 0 12:05 ? 00:00:00 [nfsd4_callbacks]
root 31413 2 0 12:05 ? 00:00:00 [nfsd]
root 31414 2 0 12:05 ? 00:00:00 [nfsd]
root 31415 2 0 12:05 ? 00:00:00 [nfsd]
root 31416 2 0 12:05 ? 00:00:00 [nfsd]
root 31417 2 0 12:05 ? 00:00:00 [nfsd]
root 31418 2 0 12:05 ? 00:00:00 [nfsd]
root 31419 2 0 12:05 ? 00:00:00 [nfsd]
root 31420 2 0 12:05 ? 00:00:00 [nfsd]
root 32147 28602 0 12:32 pts/0 00:00:00 grep nfs
[root@sfzfs62 ES21]#

●portserve起動
[root@sfzfs62 share]# /etc/rc.d/init.d/portserve start



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

●共用フォルダ作成
[root@sfzfs62 share]# ls -la /vol/share/
合計 20
drwxr-xr-x 5 root root 4096 1月 27 12:51 2014 .
drwxr-xr-x 3 root root 4096 1月 27 11:42 2014 ..
drwxrwxrwx 2 root root 4096 1月 27 15:02 2014 ES11
drwxr-xr-x 2 root root 4096 1月 27 15:05 2014 ES21
drwxr-xr-x 2 root root 4096 1月 27 12:51 2014 ES31
[root@sfzfs62 share]#

================================================================================
●NFS定義編集
[root@sfzfs62 ES21]# cat /etc/exports
# for test
/opt/admtools/pub *(rw)
/share/ES11 *(rw)
/share/ES21 *(rw)
[root@sfzfs62 ES21]#

[root@sfzfs62 vol]# exportfs -r

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

●シンボリックリンク作成

[root@sfzfs62 share]# pwd
/share
[root@sfzfs62 share]#

[root@sfzfs62 share]# ln -s /vol/share/ES21 /vol/ES21
[root@sfzfs62 share]# ln -s /vol/share/ES21 /vol/ES21

[root@sfzfs62 vol]# ls -la
合計 16
drwxr-xr-x 4 root root 4096 1月 28 12:46 2014 .
dr-xr-xr-x. 31 root root 4096 1月 28 10:45 2014 ..
lrwxrwxrwx 1 root root 15 1月 28 12:46 2014 ES11 -> /vol/share/ES11
lrwxrwxrwx 1 root root 15 1月 28 12:46 2014 ES21 -> /vol/share/ES21
drwxr-xr-x 4 root root 4096 1月 28 12:18 2014 share
[root@sfzfs62 vol]# pwd
/vol
[root@sfzfs62 vol]#


###############################################################################
●マウント サーバ確認
###############################################################################

[root@sfzfs62 ES21]# showmount -e 172.168.1.41
Export list for 172.168.1.41:
/vol/share/ES11 *
/opt/admtools/pub *
[root@sfzfs62 ES21]#

###############################################################################
●マウント クライアント確認
###############################################################################
----------------------------------------------------------------------------

[root@sfzoa62 /]# mkdir /Connect
[root@sfzoa62 /]# cd Connect
[root@sfzoa62 Connect]# mkdir ES11
[root@sfzoa62 Connect]# mkdir ES21
[root@sfzoa62 Connect]# ls
ES11 ES21
[root@sfzoa62 Connect]# pwd
/Connect


----------------------------------------------------------------------------
[root@sfzoa62 Connect]#
[root@sfzoa62 Connect]# ls -la /Connect
合計 16
drwxr-xr-x. 4 root root 4096 1月 27 15:16 2014 .
dr-xr-xr-x. 32 root root 4096 1月 27 15:16 2014 ..
drwxr-xr-x. 2 root root 4096 1月 27 15:16 2014 ES11
drwxr-xr-x. 2 root root 4096 1月 27 15:16 2014 ES21
[root@sfzoa62 Connect]#
[root@sfzoa62 Connect]# mount -t nfs sfzfs62:/share/ES11 /Connect/ES11
[root@sfzoa62 Connect]# mount -t nfs sfzfs62:/share/ES21 /Connect/ES21
[root@sfzoa62 Connect]#
[root@sfzoa62 Connect]# ls -la /Connect/ES11
合計 12
drwxrwxrwx. 2 root root 4096 1月 27 15:02 2014 .
drwxr-xr-x. 4 root root 4096 1月 27 15:16 2014 ..
-rw-r--r--. 1 root root 40 1月 27 15:02 2014 testfileES11
[root@sfzoa62 Connect]# ls -la /Connect/ES21
合計 12
drwxr-xr-x. 2 root root 4096 1月 27 15:05 2014 .
drwxr-xr-x. 4 root root 4096 1月 27 15:16 2014 ..
-rw-r--r--. 1 root root 32 1月 27 15:05 2014 testfileES21
[root@sfzoa62 Connect]#
----------------------------------------------------------------------------



###############################################################################
●作業用サーバ固有の問題
###############################################################################



/etc/rc.d/init.d/portserv を起動させる。



/etc/idmapd.conf に DomainNameを指定して、デーモン(rpc.imapd)を起動する

----------------------------------------------------------------------------

/etc/rc.d/init.d/portmap