背景:
两台服务器同时连接一台存储,并且存储使用主机组的方式给两台服务器提供数据存储,也就是说:两台服务器能看到同一个存储空间,并且能往同一个存储分区上写数据。但是,现在只有一个服务器使用这个分区,然后把这个分区通过NFS形式共享数据,现在要在B上共享数据了,也就是把A迁移到B上。
登陆所有NFS客户机
umount /stage
卸载所有客户机的NFS分区
登陆A
umount /stage1
/etc/init.d/nfs stop
chkconfig --level 345 nfs off
vim /etc/fstab
delete stage1 information
save and quite
scp -rap /etc/exports B /exports
登陆B
fdisk -l
能看到主机A能发布出来的分区,那么主机B也能发布这个分区了,只要是能看到即可。
yum install nfs* -y
Mount -t ext3 /dev/mapper/corfftlstg01_vol-etlstg1_lv /stage1
vim /etc/fstab
vim /etc/fstab
/dev/corshfffg01_vol/etlstg1_lv stage1 ext3 defaults 1 1
chkconfig --level 345 nfs on
vim /etc/exports
参考B上的信息,修改IP地址或者主机名即可。
最后在所有客户端上操作:
Cat /etc/fstab
Auto mount nfs file when booting:
vim /etc/fstab
7.272.170.4:/nfsfile/ethhpro/storage/etlpronfs defaults 0 0
mount -t nfs7.272.170.4:/nfsfile/etlpro /storage/etlpro
mount to local.