A In the Control node installation service:
Yum Install Samba samba-client Samba-swat
Start Samba services:
[[Email protected] System (keystone_admin)]# service SMB restart
Redirecting To/bin/systemctl restart Smb.service
Configure Samba to be remotely accessible:
#mkdir/VAR/SMB
#cd/etc/samba/
#cp smb.conf Smb.conf.bak
last added in smb.conf:
[Share] PATH=/VAR/SMB available = yes browseable = yes public = yes writable = yes
To create an account:
To set the root password :
[[Email protected] Samba (keystone_admin)]# smbpasswd-a root
New SMB Password:
Retype new SMB Password:
Added user root.
[Email protected] Samba (keystone_admin)]#
Root 's password is lxp
Try it:
In Windows input:
\\192.168.15. 180\
will appear directly:
Magically logged in instead of the/VAR/SMB directory
Create a Helloin the /share/ folder here, then the same file appears on the server side
Description The smbfs Service is successfully installed and can be logged in.
Mount on COMPUTE nodes:
#mount-T Cifs-o username=root,password=lxp//192.168.15.180/SHARE/VAR/SMB
[email protected] smb]# Mount |grep CIFS
192.168.15.180/share on/var/smb Type CIFS (Rw,relatime,vers=1.0,cache=strict,username=root,domain=controller-rdo , uid=0,noforceuid,gid=0,noforcegid,addr=192.168.15.180,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536 , actimeo=1)
OK, Mount succeeded
Two In compute node- - configures the cinder-volume backend as Smbfs
cinder.conf:
[Default]enabled_backends=smbfs[smbfs]volume_driver=cinder.volume.drivers.smbfs.smbfsdriversmbfs_mount_options = Username=root,password=lxpsmbfs_mount_point_base =/var/smbsmbfs_shares_config =/etc/cinder/smbfs_shares
/etc/cinder/smbfs_shares:
192.168.15.180/share
Note: The share here will be the same as the field names added in/etc/samba/smb.conf!
Restart cinder-volume service
To create a SMBFS Cloud drive:
Here is one more file:
[Email protected] 25696c3e9a8dc1b584b6768a72d7ffb8]# pwd
/var/smb/25696c3e9a8dc1b584b6768a72d7ffb8
[[email protected] 25696c3e9a8dc1b584b6768a72d7ffb8]# ls
Hello.txt volume-b978989d-dd51-432f-8b67-04b549a76557
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
OpenStack: Configure the Cinder-volume backend as SMBFS storage