0.1 > NFS (Client side)
Install nfs-common portmap
# apt-get install nfs-common portmap
Restart portmap
# service portmap restart
Create a new mount point in server
# mkdir /storage/mogdata/dev12
Mount new device to that mount point
# mount -t nfs (serverIP):/tmp /storage/mogdata/dev12
Check the result
# showmount -e (serverIP)
Change the owner of /storage/mogdata/dev12
# chown www-data:mogstored /storage/mogdata/dev12
Change the file mode of /storage/mogdata/dev12, giving group authority of writing.
# chmod g+w /storage/mogdata/dev12
To get correct information of usage/free space
# vim /usr/local/share/perl/5.10.1/Mogstored/ChildProcess/DiskUsage.pm
(line 58: my $rval = `df $gnu_df -l -k $path/$devnum`;
(change to: my $rval = `df $gnu_df -k $path/$devnum`;
(remove the param -l)
# /etc/init.d/mogstored restart
# mogadm --trackers=tracker1:6001 device add osdp-store1 12 --status=alive
Check the result
# mogadm check
Checking trackers...
tracker1:6001 ... OK
Checking hosts...
[ 1] osdp-store1 ... OK
Checking devices...
host device size(G) used(G) free(G) use% ob state I/O%
---- ------------ ---------- ---------- ---------- ------ ---------- -----
[ 1] dev11 7.027 5.590 1.437 79.55% writeable 0.0
[ 1] dev12 7.472 0.018 7.454 0.24% writeable 0.0
[ 1] dev13 7.027 5.510 1.517 78.41% writeable 0.0
total: 21.526 11.118 10.408 52.73%
Add NFS mount command on /etc/rc.local (auto mount nfs when reboot)
mount -t nfs (server IP):/tmp /storage/mogdata/dev13