summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-12-05 00:19:27 +0000
committerJeremy Katz <katzj@redhat.com>2003-12-05 00:19:27 +0000
commit31c5a74e6bb7486960a525f4ccc58bfbce24d18d (patch)
tree4797b1964073d44c29cf16cdf97009479cacc0f7 /fsset.py
parent889b1bb4b17dae930346b05ac2106bd4b103b0e6 (diff)
downloadanaconda-31c5a74e6bb7486960a525f4ccc58bfbce24d18d.tar.gz
anaconda-31c5a74e6bb7486960a525f4ccc58bfbce24d18d.tar.xz
anaconda-31c5a74e6bb7486960a525f4ccc58bfbce24d18d.zip
more path fixes, copy dev nodes correctly for dm/lvm2
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/fsset.py b/fsset.py
index b676f1537..05267fef1 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1448,8 +1448,8 @@ class FileSystemSet:
root = self.getEntryByMountPoint("/")
if isinstance(root.device, LogicalVolumeDevice):
# now make sure all of the device nodes exist. *sigh*
- rc = iutil.execWithRedirect("/usr/sbin/vgmknodes",
- ["vgmknodes", "-v"],
+ rc = iutil.execWithRedirect("/usr/sbin/lvm",
+ ["lvm", "vgmknodes", "-v"],
stdout = "/tmp/lvmout",
stderr = "/tmp/lvmout",
searchPath = 1)
@@ -1458,8 +1458,11 @@ class FileSystemSet:
rootdir = instPath + rootDev[:string.rfind(rootDev, "/")]
if not os.path.isdir(rootdir):
os.makedirs(rootdir)
- iutil.copyDeviceNode(rootDev, instPath + rootDev)
-
+ if not os.path.isdir(instPath + "/dev/mapper"):
+ os.makedirs(instPath + "/dev/mapper")
+ dmdev = "/dev/mapper/" + root.device.getDevice().replace("/", "-")
+ iutil.copyDeviceNode(dmdev, instPath + dmdev)
+ os.symlink(dmdev, instPath + rootDev)
# raise RuntimeError
def filesystemSpace(self, chroot='/'):
@@ -1837,8 +1840,8 @@ class VolumeGroupDevice(Device):
# now make the device into a real physical volume
# XXX I don't really belong here. should
# there be a PhysicalVolumeDevice(PartitionDevice) ?
- rc = iutil.execWithRedirect("/usr/sbin/pvcreate",
- ["pvcreate", "-ff", "-y",
+ rc = iutil.execWithRedirect("/usr/sbin/lvm",
+ ["lvm", "pvcreate", "-ff", "-y",
"-v", node],
stdout = "/tmp/lvmout",
stderr = "/tmp/lvmout",
@@ -1852,7 +1855,7 @@ class VolumeGroupDevice(Device):
# rescan now that we've recreated pvs. ugh.
lvm.vgscan()
- args = [ "/usr/sbin/vgcreate", "-v", "-An",
+ args = [ "/usr/sbin/lvm", "vgcreate", "-v", "-An",
"-s", "%sk" %(self.physicalextentsize,),
self.name ]
args.extend(nodes)
@@ -1894,8 +1897,8 @@ class LogicalVolumeDevice(Device):
def setupDevice(self, chroot="/", devPrefix='/tmp'):
if not self.isSetup:
- rc = iutil.execWithRedirect("/usr/sbin/lvcreate",
- ["lvcreate", "-L",
+ rc = iutil.execWithRedirect("/usr/sbin/lvm",
+ ["lvm", "lvcreate", "-L",
"%dM" % (self.size,),
"-n", self.name, "-An",
self.volumeGroup],