Bläddra i källkod

Removed procedure for remove subpartitions

Toby Chui 1 år sedan
förälder
incheckning
ed3cea277a
1 ändrade filer med 2 tillägg och 8 borttagningar
  1. 2 8
      mod/disk/raid/mdadm.go

+ 2 - 8
mod/disk/raid/mdadm.go

@@ -139,15 +139,9 @@ func (m *Manager) WipeDisk(diskPath string) error {
 		}
 	}
 
-	// Wipe all filesystem signatures on each of the partitions
-	wipeCmd1 := exec.Command("sudo", "wipefs", "--all", "--force", diskPath+"?")
-	if err := wipeCmd1.Run(); err != nil {
-		return fmt.Errorf("error wiping filesystem signatures on %s?: %v", diskPath, err)
-	}
-
 	// Wipe all filesystem signatures on the entire disk
-	wipeCmd2 := exec.Command("sudo", "wipefs", "--all", "--force", diskPath)
-	if err := wipeCmd2.Run(); err != nil {
+	wipeCmd := exec.Command("sudo", "wipefs", "--all", "--force", diskPath)
+	if err := wipeCmd.Run(); err != nil {
 		return fmt.Errorf("error wiping filesystem signatures on %s: %v", diskPath, err)
 	}