Summary
This article outlines the procedure to mount CIFS storage in SSFE and adding this to MogileFS.
Details
To mount the CIFS storage and add it to MogileFS:
- Change the df no limit list to local file systems.
- Log in to the SSFE server shell.
- Edit the /usr/local/share/perl/5.10.1/Mogstored/ChildProcess/DiskUsage.pm file.
Look for the line "my $rval = `df $gnu_df -l -k $path/$devnum`;" and remove the parameter "-l". The resulting line should be "my $rval = `df $gnu_df -k $path/$devnum`;".
- Restart mogstored using the command ":/etc/init.d/mogstored restart".
- Create a new mount point in the SSFFE server using the command:
# mkdir /storage/mogdata/devXYWhere: X is 1 for appliance1 and 2 for appliance2
Y is any number based on the number of disks already attached to the server.For more details, you can refer to the Knowledgebase article: Adding extra disk space in SafeSync for Enterprise (SSFE). - Change the permissions on the mogstored service.
- Edit the /etc/init.d/mogstored using the command:
# vim /etc/init.d/mogstored
- Replace "--chuid mogstored" with "--chuid www-data".
There are two lines that must be modified, line 41 and 61.
- Restart the mogstored service using the command;
#/etc/init.d/mogstored restart
- Edit the /etc/init.d/mogstored using the command:
- Change the owner of /storage/mogdata/devXY via the command:
# chown www-data:mogstored /storage/mogdata/devXY
- Change the file mode of /storage/mogdata/dev15 to give the group write permission. Use the command:
# chmod g+w /storage/mogdata/dev15
- Mount the new CIFS device to the new mount point using the commands:
# mount -t cifs //<CIFS_Server_address>/<disk_name> /storage/mogdata/devXY -o
username=xxxxxxx,password=xxxxxxxx,uid=33,gid=903,dir_mode=0775 - Add the new mount point to the MogileFS system via the command:
# mogadm --trackers=tracker1:6001 device add osdp-store1 XY --status=alive
- Check the result using the command "# mogadm check". Make sure the new device is listed properly with the correct disk size.
- Add the mount point information in /etc/fstab to auto mount the device after a reboot.
Edit /etc/fstab by adding the line:///<disk_name> /storage/mogdata/devXY cifs
username=safesync,password=password,uid=33,gid=903,dir_mode=0775 0 0 - Reboot the server and verify if the device is still properly mounted.