制作共享磁盘NFS
NFS是network filesystem,通过网络共享一块磁盘。这里有一篇很好的教程,可以follow step by step
实际步骤:实例A,B创建NFS
- 首先在aws添加ebs并附加到A
-
A机
#创建pv apt-get install lvm2 ls /dev/xv* pvcreate /dev/xvdb pvdisplay #创建vg vgcreate photo_vg /dev/xvdb vgdisplay #创建lv lvcreate -L 1000G -n mylv photo_vg mkfs.ext4 /dev/photo_vg/mylv mkdir /lvmdata mount /dev/photo_vg/mylv /lvmdata df -h #编辑/etc/fstab,自动挂载 /dev/photo_vg/mylv /lvmdata ext4 defaults 0 0 #export,编辑/etc/exports /lvmdata 10.30.0.0/25(rw,sync,no_subtree_check,no_root_squash)
-
B机
apt-get install nfs-common showmount -e 10.30.0.20 #A机地址 mkdir /lvmdata mount -t nfs 10.30.0.20:/lvmdata /lvmdata #编辑/etc/fstab,自动挂载 10.30.0.20:/lvmdata /lvmdata nfs defaults 0 0
sort of, I have some experience in the domain of database(MySQL/mongo), java, python, front-end, etc. I'll willing to give and accept bits of help from others.
now base in Singapore.