Merge pull request #1966 from dbungert/lp-2057837-home-dataset
filesystem: datasets for /root and /home
This commit is contained in:
commit
2821206661
|
@ -616,6 +616,11 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
||||||
rpool.create_zfs(f"ROOT/ubuntu_{uuid}/var/spool")
|
rpool.create_zfs(f"ROOT/ubuntu_{uuid}/var/spool")
|
||||||
rpool.create_zfs(f"ROOT/ubuntu_{uuid}/var/www")
|
rpool.create_zfs(f"ROOT/ubuntu_{uuid}/var/www")
|
||||||
|
|
||||||
|
userdata_uuid = gen_zsys_uuid()
|
||||||
|
rpool.create_zfs("USERDATA", canmount="off", mountpoint="none")
|
||||||
|
rpool.create_zfs(f"USERDATA/root_{userdata_uuid}", mountpoint="/root")
|
||||||
|
rpool.create_zfs(f"USERDATA/home_{userdata_uuid}", mountpoint="/home")
|
||||||
|
|
||||||
@functools.singledispatchmethod
|
@functools.singledispatchmethod
|
||||||
def start_guided(self, target: GuidedStorageTarget, disk: ModelDisk) -> gaps.Gap:
|
def start_guided(self, target: GuidedStorageTarget, disk: ModelDisk) -> gaps.Gap:
|
||||||
"""Setup changes to the disk to prepare the gap that we will be
|
"""Setup changes to the disk to prepare the gap that we will be
|
||||||
|
|
|
@ -593,6 +593,11 @@ class TestGuided(IsolatedAsyncioTestCase):
|
||||||
zfs_boot = self.model._mount_for_path("/boot")
|
zfs_boot = self.model._mount_for_path("/boot")
|
||||||
self.assertEqual("zfs", zfs_boot.type)
|
self.assertEqual("zfs", zfs_boot.type)
|
||||||
|
|
||||||
|
# checking that these were created
|
||||||
|
[userdata] = self.model._all(type="zfs", volume="USERDATA")
|
||||||
|
[userdata_home] = self.model._all(type="zfs", path="/home")
|
||||||
|
[userdata_root] = self.model._all(type="zfs", path="/root")
|
||||||
|
|
||||||
@parameterized.expand(boot_expectations)
|
@parameterized.expand(boot_expectations)
|
||||||
async def test_guided_zfs_luks_keystore(self, bootloader, ptable, p1mnt):
|
async def test_guided_zfs_luks_keystore(self, bootloader, ptable, p1mnt):
|
||||||
await self._guided_setup(bootloader, ptable)
|
await self._guided_setup(bootloader, ptable)
|
||||||
|
|
Loading…
Reference in New Issue