code: func NewStore(rootPath string, drivers *drivers.Store) (*VolumeStore, error) {
  	vs := &VolumeStore{
  		locks:   &locker.Locker{},
  		names:   make(map[string]volume.Volume),
  		refs:    make(map[string]map[string]struct{}),
  		labels:  make(map[string]map[string]string),
  		options: make(map[string]map[string]string),
  		drivers: drivers,
  	}
  
  	if rootPath != "" {
  		// initialize metadata store
  		volPath := filepath.Join(rootPath, volumeDataDir)
  		if err := os.MkdirAll(volPath, 0750); err != nil {
  			return nil, err
  		}
  
  		var err error
  		vs.db, err = bolt.Open(filepath.Join(volPath, "metadata.db"), 0600, &bolt.Options{Timeout: 1 * time.Second})
  		if err != nil {
  			return nil, errors.Wrap(err, "error while opening volume store metadata database")
  		}
  
  		// initialize volumes bucket
  		if err := vs.db.Update(func(tx *bolt.Tx) error {
  			if _, err := tx.CreateBucketIfNotExists(volumeBucketName); err != nil {
  				return errors.Wrap(err, "error while setting up volume store metadata database")
  			}
  			return nil
  		}); err != nil {
  			return nil, err
  		}
  	}
  
  	vs.restore()
  
  	return vs, nil
  }
docs: // NewStore creates a new volume store at the given path