1 2 3 4 5 6 7 8 9 10 11 12 |
root@controller:~# ll /opt/stack/cinder/cinder/backup/drivers/
total 140
drwxr-xr-x 2 stack stack 4096 Jun 14 14:47 ./
drwxr-xr-x 3 stack stack 4096 Jun 14 16:41 ../
-rw-r--r-- 1 stack stack 54276 Jun 14 14:47 ceph.py
-rw-r--r-- 1 stack stack 3528 Jun 14 14:47 glusterfs.py
-rw-r--r-- 1 stack stack 14245 Jun 14 14:47 google.py
-rw-r--r-- 1 stack stack 0 Jun 14 14:47 __init__.py
-rw-r--r-- 1 stack stack 3868 Jun 14 14:47 nfs.py
-rw-r--r-- 1 stack stack 5864 Jun 14 14:47 posix.py
-rw-r--r-- 1 stack stack 18587 Jun 14 14:47 swift.py
-rw-r--r-- 1 stack stack 21172 Jun 14 14:47 tsm.py
|
1 2 3 4 5 |
root@controller:~# vim /etc/cinder/cinder.conf
[DEFAULT]
backup_driver = cinder.backup.drivers.nfs
backup_mount_point_base = $state_path/backup_mount
backup_share = 172.16.1.55:/backup
|
1 2 |
root@compute:/# vim /etc/exports
/backup *(rw,sync,no_subtree_check,no_root_squash)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
root@compute:/# systemctl restart nfs-kernel-server.service
root@compute:/# systemctl status nfs-kernel-server.service
* nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2019-06-21 17:26:12 CST; 13s ago
Process: 4152 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
Process: 4146 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
Process: 4142 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
Process: 4172 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
Process: 4168 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Main PID: 4172 (code=exited, status=0/SUCCESS)
Jun 21 17:26:12 compute systemd[1]: Starting NFS server and services...
Jun 21 17:26:12 compute systemd[1]: Started NFS server and services.
|
1 2 3 |
root@controller:/# showmount -e 172.16.1.55
Export list for 172.16.1.55:
/backup *
|
1 2 3 4 5 6 7 8 |
root@controller:~# cinder service-list
+------------------+------------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-backup | controller | nova | enabled | up | 2019-06-21T10:10:17.000000 | - |
| cinder-scheduler | controller | nova | enabled | up | 2019-06-21T10:10:17.000000 | - |
| cinder-volume | controller@lvmdriver-1 | nova | enabled | up | 2019-06-21T10:10:14.000000 | - |
+------------------+------------------------+------+---------+-------+----------------------------+-----------------+
|
1 2 3 4 5 6 7 8 |
#配置dashboard文件
root@controller:~# vim /opt/stack/horizon/openstack_dashboard/local/local_settings.py
#更改成True(默認爲False)
OPENSTACK_CINDER_FEATURES = {
'enable_backup': True,
}
#重啓web服務和會話存儲
root@controller:~# systemctl reload apache2.service
|