michaelkoetter / ubuntu-zfsroot-bootstrap

Ubuntu 18.04 ZFS Root Bootstrap Ansible Playbook
0 stars 1 forks source link

if only one disk , playbook failed ? #1

Open changchichung opened 6 years ago

changchichung commented 6 years ago

group_vars/all

# !!! WARNING !!! if these are defined, all data on the specified disks will be wiped!

zpool_disks:
   - /dev/vda

# Simple / striped layout
#zpool_layout: "{{ zpool_disks | map('regex_replace', '(.*)', '\\1-part1') | join(' ') }}"

# Mirror layout
# zpool_layout: "mirror {{ zpool_disks | map('regex_replace', '(.*)', '\\1-part1') | join(' ') }}"

# Grub-EFI will be installed to these partitions
# efi_partitions: "{{ zpool_disks | map('regex_replace', '(.*)', '\\1-part3') | list }}"

# !!! CHANGE THIS !!!
root_password: ubuntu

# Optional: authorized key to enable root ssh login
# root_authorized_key: "..."

# Set this to create an 'ansible' user with the specified key
# ansible_authorized_key: "..."

locale: en_US.UTF-8
serial_console: ttyS2

ansible error

TASK [Gathering Facts] *************************************************************************************************************************************
ok: [install-host]

TASK [initialize-installation : update package cache] ******************************************************************************************************
changed: [install-host]

TASK [initialize-installation : install packages] **********************************************************************************************************
ok: [install-host] => (item=debootstrap)
ok: [install-host] => (item=zfsutils-linux)
ok: [install-host] => (item=dosfstools)

TASK [initialize-installation : partition disks] ***********************************************************************************************************
changed: [install-host] => (item=/dev/vda)

TASK [initialize-installation : format EFI partitions] *****************************************************************************************************
skipping: [install-host]

TASK [initialize-installation : create 'rpool' zpool] ******************************************************************************************************
skipping: [install-host]

TASK [initialize-installation : create root zfs filesystems] ***********************************************************************************************
failed: [install-host] (item={'name': 'rpool/ROOT', 'options': {'canmount': False, 'mountpoint': 'none'}}) => {"changed": false, "cmd": "/sbin/zpool get version rpool", "item": {"name": "rpool/ROOT", "options": {"canmount": false, "mountpoint": "none"}}, "msg": "cannot open 'rpool': no such pool", "rc": 1, "stderr": "cannot open 'rpool': no such pool\n", "stderr_lines": ["cannot open 'rpool': no such pool"], "stdout": "", "stdout_lines": []}
failed: [install-host] (item={'name': 'rpool/ROOT/ubuntu', 'options': {'canmount': 'noauto', 'mountpoint': '/'}}) => {"changed": false, "cmd": "/sbin/zpool get version rpool", "item": {"name": "rpool/ROOT/ubuntu", "options": {"canmount": "noauto", "mountpoint": "/"}}, "msg": "cannot open 'rpool': no such pool", "rc": 1, "stderr": "cannot open 'rpool': no such pool\n", "stderr_lines": ["cannot open 'rpool': no such pool"], "stdout": "", "stdout_lines": []}
    to retry, use: --limit @/tmp/ubuntu-zfsroot-bootstrap/bootstrap.retry

PLAY RECAP *************************************************************************************************************************************************
install-host               : ok=4    changed=2    unreachable=0    failed=1   

any suggestions ?

michaelkoetter commented 6 years ago

Uncomment the first variant of zpool_layout, otherwise the pool won't get created. You'll probably need efi_partitions as well, otherwise you'd have to install grub manually.