qubes/app: create 'default' storage pool as LVM when present
When system is installed with LVM thin pool, it should be used by default. But lets keep file-based on for /var/lib/qubes for some corner cases, migration etc. QubesOS/qubes-issues#2412
This commit is contained in:
parent
badc58837a
commit
964955758c
11
qubes/app.py
11
qubes/app.py
@ -856,13 +856,16 @@ class Qubes(qubes.PropertyHolder):
|
||||
8: qubes.Label(8, '0x000000', 'black'),
|
||||
}
|
||||
|
||||
for name, config in qubes.config.defaults['pool_configs'].items():
|
||||
self.pools[name] = self._get_pool(**config)
|
||||
|
||||
# check if the default LVM Thin pool qubes_dom0/pool00 exists
|
||||
if os.path.exists('/dev/mapper/qubes_dom0-pool00-tpool'):
|
||||
self.add_pool(volume_group='qubes_dom0', thin_pool='pool00',
|
||||
name='lvm', driver='lvm_thin')
|
||||
name='default', driver='lvm_thin')
|
||||
else:
|
||||
self.pools['default'] = self._get_pool(
|
||||
dir_path=qubes.config.qubes_base_dir,
|
||||
name='default', driver='file')
|
||||
for name, config in qubes.config.defaults['pool_configs'].items():
|
||||
self.pools[name] = self._get_pool(**config)
|
||||
|
||||
self.domains.add(
|
||||
qubes.vm.adminvm.AdminVM(self, None, qid=0, name='dom0'))
|
||||
|
@ -86,9 +86,10 @@ defaults = {
|
||||
'root_img_size': 10*1024*1024*1024,
|
||||
|
||||
'pool_configs': {
|
||||
'default': {'dir_path': qubes_base_dir,
|
||||
# create file pool even when the default one is LVM
|
||||
'varlibqubes': {'dir_path': qubes_base_dir,
|
||||
'driver': 'file',
|
||||
'name': 'default'},
|
||||
'name': 'varlibqubes'},
|
||||
'linux-kernel': {
|
||||
'dir_path': os.path.join(qubes_base_dir,
|
||||
system_path['qubes_kernels_base_dir']),
|
||||
|
Loading…
Reference in New Issue
Block a user