filesystem: datasets for /root and /home
Partial implementation of LP: #2057837. To create a specific dataset for /home/$user, this requires moving where and when users are created, which is not in plan for 24.04.
This commit is contained in:
parent
979f546f27
commit
19ca4b7901
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue