Did you know  45Drives offers free  public and private  webinars ? Click here to learn more  & register! Build & Price

KB450471 – Setting up Shadow Copy for SMB with CephFS Snapshots in Houston UI

You are here:
  • KB Home
  • Samba
  • KB450471 – Setting up Shadow Copy for SMB with CephFS Snapshots in Houston UI

Scope/Description

  • This article will show how to setup Shadow Copy for SMB shares using CephFS snapshots in Houston UI.

Prerequisites

  • Houston UI
  • cockpit-file-sharing module installed
  • CephFS snapshots configured
  • SMB share configured

Steps

  • Go to the File Sharing tab and click on the share you wish to add shadow copy to.

  • Once editing, you can go to the “Advanced Setting” section to configure Shadow Copy for Windows. When a Ceph snapshot is created with our Cephfs-snap tool it is of the format interval_date(H:M:S), any underlying directory will now have a _interval_date(H:M:S). As a snapshot format will need to be selected we have a few options. Take the snapshots 1 level above the share, this will ensure the snapshots on the share have the “_” in the name to adhere to the format selected. Or the format can exclude the “_” at the beginning of the name, this will only allow shadow copy to work on the actual share directory. Lower directories in the tree will not have previous versions.

Shadow Copy for Share Level (Snapshots configured on Share Directory)

  • The following settings can be put in the advanced section of a share.

Advanced Settings
vfs objects = shadow_copy2
shadow:format = _daily_%Y-%m-%d_%H%M%S
shadow:snapdirseverywhere = yes
shadow:snapdir = .snap
  • The {daily} section would change depending on if the snapshots are daily, hourly, monthly, etc.

Shadow Copy for Share and Underlying Directories (Snapshots configured 1 level above the share)

  • The following parameters can be set to configured shadow copy to work on directories below where the snapshot is configured.

Advanced Settings
vfs objects = shadow_copy2
shadow:format = _daily_%Y-%m-%d_%H%M%S_1099511631483
shadow:snapdirseverywhere = yes
shadow:snapdir = .snap
  • Again, the daily setting will change depending on the cephfs-snap tool setup. For lower directory snapshots, they are appended with _{corresponding_inode}. All snapshots taken at the same level will have the same number appended. To find this list the snapshots on a directory then, add the number to the configuration.

  • In this example 1099511631483, is the inode number corresponding that is appended to snapshots.

Now the required parameters should be added to the Advanced Settings box. Then click Apply.

 

 

  • After applying the changes you should see them successfully added to the share.

Verification

  • Connect to your share and try to view the snapshots under Previous Versions under the properties.
  • Here we can see the previous version from our CephFS snapshot appears, and we can restore any files contained in the snapshot from here.

Troubleshooting

  • Verify there are snapshots being made on the server.
  • Restart the samba service.
  • Remap the Network Share on the Windows Client.
  • If snapshots are not being displayed in the correct time add the below line to the share’s parameters
    shadow:localtime = yes 

Further Reading

Was this article helpful?
Dislike 0
Views: 1085
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access