mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
clear dmsetup before import
This commit is contained in:
committed by
Aiden McClelland
parent
8e5a7ea9a7
commit
a16eacd3f8
@@ -218,6 +218,10 @@ pub async fn import<P: AsRef<Path>>(guid: &str, datadir: P, password: &str) -> R
|
|||||||
crate::ErrorKind::IncorrectDisk,
|
crate::ErrorKind::IncorrectDisk,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Command::new("dmsetup")
|
||||||
|
.arg("remove_all") // TODO: find a higher finesse way to do this for portability reasons
|
||||||
|
.invoke(crate::ErrorKind::DiskManagement)
|
||||||
|
.await?;
|
||||||
match Command::new("vgimport")
|
match Command::new("vgimport")
|
||||||
.arg(guid)
|
.arg(guid)
|
||||||
.invoke(crate::ErrorKind::DiskManagement)
|
.invoke(crate::ErrorKind::DiskManagement)
|
||||||
|
|||||||
Reference in New Issue
Block a user