mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +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,
|
||||
));
|
||||
}
|
||||
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")
|
||||
.arg(guid)
|
||||
.invoke(crate::ErrorKind::DiskManagement)
|
||||
|
||||
Reference in New Issue
Block a user