("lvremove", (RErr, [String "device"]), 77, [],
[InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["lvremove"; "/dev/VG/LV1"];
["lvs"]], ["/dev/VG/LV2"]);
InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["lvremove"; "/dev/VG"];
["lvs"]], []);
InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["lvremove"; "/dev/VG"];
("vgremove", (RErr, [String "vgname"]), 78, [],
[InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["vgremove"; "VG"];
["lvs"]], []);
InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["vgremove"; "VG"];
("pvremove", (RErr, [String "device"]), 79, [],
[InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["vgremove"; "VG"];
- ["pvremove"; "/dev/sda"];
+ ["pvremove"; "/dev/sda1"];
["lvs"]], []);
InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["vgremove"; "VG"];
- ["pvremove"; "/dev/sda"];
+ ["pvremove"; "/dev/sda1"];
["vgs"]], []);
InitEmpty, Always, TestOutputList (
- [["pvcreate"; "/dev/sda"];
- ["vgcreate"; "VG"; "/dev/sda"];
+ [["sfdisk"; "/dev/sda"; "0"; "0"; "0"; ","];
+ ["pvcreate"; "/dev/sda1"];
+ ["vgcreate"; "VG"; "/dev/sda1"];
["lvcreate"; "LV1"; "VG"; "50"];
["lvcreate"; "LV2"; "VG"; "50"];
["vgremove"; "VG"];
- ["pvremove"; "/dev/sda"];
+ ["pvremove"; "/dev/sda1"];
["pvs"]], [])],
"remove an LVM physical volume",
"\
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
return -1;
}
{
- char device[] = "/dev/sda";
+ char device[] = "/dev/sda1";
device[5] = devchar;
int r;
suppress_error = 0;
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
return -1;
}
{
- char device[] = "/dev/sda";
+ char device[] = "/dev/sda1";
device[5] = devchar;
int r;
suppress_error = 0;
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
return -1;
}
{
- char device[] = "/dev/sda";
+ char device[] = "/dev/sda1";
device[5] = devchar;
int r;
suppress_error = 0;
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,
{
char device[] = "/dev/sda";
device[5] = devchar;
+ char lines_0[] = ",";
+ char *lines[] = {
+ lines_0,
+ NULL
+ };
+ int r;
+ suppress_error = 0;
+ r = guestfs_sfdisk (g, device, 0, 0, 0, lines);
+ if (r == -1)
+ return -1;
+ }
+ {
+ char device[] = "/dev/sda1";
+ device[5] = devchar;
int r;
suppress_error = 0;
r = guestfs_pvcreate (g, device);
}
{
char volgroup[] = "VG";
- char physvols_0[] = "/dev/sda";
+ char physvols_0[] = "/dev/sda1";
physvols_0[5] = devchar;
char *physvols[] = {
physvols_0,