|
|
|
@ -27,7 +27,8 @@ from cl_utils import isMount,typeFile,getTupleVersion,pathJoin,isFstabMount,\
|
|
|
|
|
getUdevDeviceInfo, getPartitionDevice, getPartitionSize, \
|
|
|
|
|
isPkgInstalled, process, checkUtils, readLinesFile, \
|
|
|
|
|
FStab, lspci, getInstalledVideo,getDeviceType, \
|
|
|
|
|
getPartitionType, getOsProberHash, getProgPath
|
|
|
|
|
getPartitionType, getOsProberHash, getProgPath, \
|
|
|
|
|
getRaidPartitions, getLvmPartitions
|
|
|
|
|
from cl_distr import DistributiveRepository,PartitionDistributive
|
|
|
|
|
from cl_fill import clLocale
|
|
|
|
|
from operator import itemgetter
|
|
|
|
@ -299,6 +300,8 @@ class fillVars(object, glob_attr):
|
|
|
|
|
fstab = FStab('/etc/fstab')
|
|
|
|
|
distrRep = DistributiveRepository()
|
|
|
|
|
osProberHash = getOsProberHash(getContentFunc=distrRep._getfromcontent)
|
|
|
|
|
raidUsedDisks = []
|
|
|
|
|
lvmUsedDisks = []
|
|
|
|
|
for disk in new_disks:
|
|
|
|
|
props = getUdevDeviceInfo(disk)
|
|
|
|
|
if not "DEVNAME" in props:
|
|
|
|
@ -337,6 +340,18 @@ class fillVars(object, glob_attr):
|
|
|
|
|
else:
|
|
|
|
|
dev_hash['grub'] = ""
|
|
|
|
|
disk_hash[devName] = dev_hash
|
|
|
|
|
if "raid" in dev_hash['type']:
|
|
|
|
|
raidUsedDisks.extend(getRaidPartitions(disk))
|
|
|
|
|
if dev_hash['type'].endswith("lvm"):
|
|
|
|
|
prop = getUdevDeviceInfo(path=disk)
|
|
|
|
|
lvmUsedDisks.extend(getLvmPartitions(prop.get('DM_VG_NAME',''),
|
|
|
|
|
prop.get('DM_LV_NAME','')))
|
|
|
|
|
for part in raidUsedDisks:
|
|
|
|
|
if part in disk_hash:
|
|
|
|
|
disk_hash[part]['type'] = "%s-raidmember"%disk_hash[part]['type']
|
|
|
|
|
for part in lvmUsedDisks:
|
|
|
|
|
if part in disk_hash:
|
|
|
|
|
disk_hash[part]['type'] = "%s-lvmmember"%disk_hash[part]['type']
|
|
|
|
|
return disk_hash
|
|
|
|
|
|
|
|
|
|
def separateDevice(self,device):
|
|
|
|
|