+++ b/doc/job/os_mount.md @@ -0,0 +1,62 @@ +# Summary +=========
+`os_mount` defines the mount method of tbox's root partition.
tbox => testbox keep the same with the real field.
ok.
-------- Thanks Yu Chuan
Thanks, Xueliang
+It has the following optional values:
- nfs
- cifs
- initramfs
- container
- local
+Usage example:
- submit iperf.yaml testbox=vm-2p8g os_mount=nfs
- submit iperf.yaml testbox=vm-2p8g os_mount=cifs
- submit iperf.yaml testbox=vm-2p8g os_mount=initramfs
- submit iperf.yaml testbox=dc-8g os_mount=container
- submit iperf.yaml testbox=vm-2p8g os_mount=local
+# Optional Values +=================
+## Work flow when os_mount=local
+1. user submit job with os_mount: local
- optional kernel cmdline params: # can be added in kernel_append_root field of job.yaml
- keep_last_root: keep the original data of disk what last job generated, don't wipe it
+2. scheduler return the ipxe_str to tbox
- dhcp
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- imgargs vmlinux root=/dev/mapper/os-openeuler_aarch64_20.03 rootfs_src={nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} initrd=initrd.lkp {kernel_append_root}
- boot
+3. boot
- check if `/dev/mapper/os-openeuler_aarch64_20.03_{timestamp}` exist # according the kernel cmdline
- if exist:
- if `keep_last_root` not in kernel cmdline params:
- re-create(lvremove and lvcreate) rw logical volume /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if `keep_last_root` in kernel cmdline params:
- if /dev/mapper/os-openeuler_aarch64_20.03 exists:
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if /dev/mapper/os-openeuler_aarch64_20.03 not exists:
- generate /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03-{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if not exist:
- mount -t nfs {nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} /mnt
- create /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} according rootfs_disk. # logical volume size: 10G
- mkdir /mnt1, mount /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} /mnt1
- rsync -az /mnt/. /mnt1/
- umount /mnt /mnt1
- lvchange -p r /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- creat rw logical volume /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
+4. execute the job
2.23.0