Skip to content

Commit 7b302df

Browse files
author
shan.wu
committed
<fix>[sharedblock]: convert memory snapshot install path from absolute path to protocol path
convert memory snapshot install path from absolute path to protocol path Resolves/Related: ZSTAC-79756 Change-Id: I6e626d68626461627a737765786a676e6b617064
1 parent 4d3faa3 commit 7b302df

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

conf/db/upgrade/V5.5.12__schema.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ CREATE TABLE IF NOT EXISTS `zstack`.`ExternalServiceConfigurationVO` (
4444
`createDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
4545
PRIMARY KEY (`uuid`)
4646
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
47+
48+
UPDATE VolumeSnapshotVO AS sp, PrimaryStorageVO AS ps
49+
SET sp.primaryStorageInstallPath = REPLACE(sp.primaryStorageInstallPath, '/dev/', 'sharedblock://')
50+
WHERE sp.primaryStorageUuid = ps.uuid AND ps.type = 'SharedBlock' AND sp.volumeType = 'Memory' AND sp.primaryStorageInstallPath LIKE '/dev/%';

0 commit comments

Comments
 (0)