code: func (s *VolumeStore) Remove(ctx context.Context, v volume.Volume, rmOpts ...opts.RemoveOption) error {
  	var cfg opts.RemoveConfig
  	for _, o := range rmOpts {
  		o(&cfg)
  	}
  
  	name := v.Name()
  	s.locks.Lock(name)
  	defer s.locks.Unlock(name)
  
  	select {
  	case <-ctx.Done():
  		return ctx.Err()
  	default:
  	}
  
  	if s.hasRef(name) {
  		return &OpErr{Err: errVolumeInUse, Name: name, Op: "remove", Refs: s.getRefs(name)}
  	}
  
  	v, err := s.getVolume(ctx, name, v.DriverName())
  	if err != nil {
  		return err
  	}
  
  	vd, err := s.drivers.GetDriver(v.DriverName())
  	if err != nil {
  		return &OpErr{Err: err, Name: v.DriverName(), Op: "remove"}
  	}
  
  	logrus.Debugf("Removing volume reference: driver %s, name %s", v.DriverName(), name)
  	vol := unwrapVolume(v)
  
  	err = vd.Remove(vol)
  	if err != nil {
  		err = &OpErr{Err: err, Name: name, Op: "remove"}
  	}
  
  	if err == nil || cfg.PurgeOnError {
  		if e := s.purge(ctx, name); e != nil && err == nil {
  			err = e
  		}
  	}
  	return err
  }
docs: // Remove removes the requested volume. A volume is not removed if it has any refs