chore(xo-server): move LVM start hook to file restore NG
Otherwise, I have a feeling that we may forget to migrate this code when legacy backup code will be retired.
This commit is contained in:
parent
b3681e7c39
commit
0cd84ee250
@ -300,14 +300,6 @@ const mountLvmPv = (device, partition) => {
|
||||
export default class {
|
||||
constructor (xo) {
|
||||
this._xo = xo
|
||||
|
||||
// clean any LVM volumes that might have not been properly
|
||||
// unmounted
|
||||
xo.on('start', () =>
|
||||
Promise.all([execa('losetup', ['-D']), execa('vgchange', ['-an'])]).then(
|
||||
() => execa('pvscan', ['--cache'])
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
async listRemoteBackups (remoteId) {
|
||||
|
@ -163,6 +163,13 @@ export default class BackupNgFileRestore {
|
||||
constructor (app) {
|
||||
this._app = app
|
||||
this._mounts = { __proto__: null }
|
||||
|
||||
// clean any LVM volumes that might have not been properly
|
||||
// unmounted
|
||||
app.on('start', async () => {
|
||||
await Promise.all([execa('losetup', ['-D']), execa('vgchange', ['-an'])])
|
||||
await execa('pvscan', ['--cache'])
|
||||
})
|
||||
}
|
||||
|
||||
@defer
|
||||
|
Loading…
Reference in New Issue
Block a user