lxd/storage_ceph_utils.go
func (s *storageCeph) cephRBDGenerateUUID(volumeName string, volumeType string) error {
	// Map the RBD volume
	RBDDevPath, err := cephRBDVolumeMap(s.ClusterName, s.OSDPoolName, volumeName, volumeType, s.UserName)
	if err != nil {
		return err
	}
	defer cephRBDVolumeUnmap(s.ClusterName, s.OSDPoolName, volumeName, volumeType, s.UserName, true)

	// Update the UUID
	msg, err := fsGenerateNewUUID(s.getRBDFilesystem(), RBDDevPath)
	if err != nil {
		return fmt.Errorf("Failed to regenerate UUID for '%v': %v: %v", volumeName, err, msg)
	}

	return nil
}
func (s *storageCeph) cephRBDGenerateUUID(volumeName string, volumeType string) error {
	// Map the RBD volume
	RBDDevPath, err := cephRBDVolumeMap(s.ClusterName, s.OSDPoolName, volumeName, volumeType, s.UserName)
	if err != nil {
		return err
	}
	defer cephRBDVolumeUnmap(s.ClusterName, s.OSDPoolName, volumeName, volumeType, s.UserName, true)

	// Update the UUID
	msg, err := fsGenerateNewUUID(s.getRBDFilesystem(), RBDDevPath)
	if err != nil {
		return fmt.Errorf("Failed to regenerate UUID for '%v': %v: %v", volumeName, err, msg)
	}

	return nil
}
// cephRBDGenerateUUID regenerates the XFS/btrfs UUID as needed