diff options
| author | guol-fnst <goul-fnst@fujitsu.com> | 2022-05-17 10:19:35 +0800 |
|---|---|---|
| committer | guol-fnst <guol-fnst@fujitsu.com> | 2022-05-17 15:41:47 +0800 |
| commit | 8fab39e775bd6d3d4eedad5972cf8cb63c2d2019 (patch) | |
| tree | 975fa316bed21c0de1cc7642f0b2495c15b37172 /weed/storage/disk_location.go | |
| parent | de6aa9cce81cb2214e7b7f3dd1a3c9383d054779 (diff) | |
| download | seaweedfs-8fab39e775bd6d3d4eedad5972cf8cb63c2d2019.tar.xz seaweedfs-8fab39e775bd6d3d4eedad5972cf8cb63c2d2019.zip | |
rename UUID file
fix typo
move locationUUID into DiskLocation
Diffstat (limited to 'weed/storage/disk_location.go')
| -rw-r--r-- | weed/storage/disk_location.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index ae2a36296..e6d61c6bb 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -19,6 +19,7 @@ import ( type DiskLocation struct { Directory string + DirectoryUUID string IdxDirectory string DiskType types.DiskType MaxVolumeCount int @@ -37,7 +38,7 @@ type DiskLocation struct { func GenerateDirUUID(dir string) (dirUUIDString string, err error) { glog.V(1).Infof("Getting UUID of volume directory:%s", dir) dirUUIDString = "" - fileName := dir + "/volume.uuid" + fileName := dir + "/vol_dir.uuid" if !util.FileExists(fileName) { dirUUID, _ := uuid.NewRandom() dirUUIDString = dirUUID.String() @@ -64,8 +65,10 @@ func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpace util.MinFreeSp } else { idxDir = util.ResolvePath(idxDir) } + dirUUID, _ := GenerateDirUUID(dir) location := &DiskLocation{ Directory: dir, + DirectoryUUID: dirUUID, IdxDirectory: idxDir, DiskType: diskType, MaxVolumeCount: maxVolumeCount, |
