Merge pull request #1966 from dbungert/lp-2057837-home-dataset

filesystem: datasets for /root and /home
This commit is contained in:
Dan Bungert 2024-04-11 08:09:13 -06:00 committed by GitHub
commit 2821206661
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -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/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
def start_guided(self, target: GuidedStorageTarget, disk: ModelDisk) -> gaps.Gap:
"""Setup changes to the disk to prepare the gap that we will be

View File

@ -593,6 +593,11 @@ class TestGuided(IsolatedAsyncioTestCase):
zfs_boot = self.model._mount_for_path("/boot")
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)
async def test_guided_zfs_luks_keystore(self, bootloader, ptable, p1mnt):
await self._guided_setup(bootloader, ptable)