Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of disk size failure #226

Open
rmustacc opened this issue Jun 8, 2013 · 5 comments
Open

Update of disk size failure #226

rmustacc opened this issue Jun 8, 2013 · 5 comments
Assignees

Comments

@rmustacc
Copy link
Contributor

rmustacc commented Jun 8, 2013

From TritonDataCenter/illumos-kvm#14.

I was trying to change the size of a VM's disk with the following JSON:

{
"update_disks": [
{
"path": "/dev/zvol/rdsk/zones/bc1ff79e-2501-4ab1-916f-f8ab8597fb54-disk0",
"size": 102400
}
]
}

and the update failed with:

Successfully updated VM bc1ff79e-2501-4ab1-916f-f8ab8597fb54
UNCAUGHT EXCEPTION: 8bf6ea15
EXCEPTION MESSAGE: Cannot read property value of undefined
FROM:
_asyncMap (/usr/node/0.8/node_modules/async.js:225:23)
async.eachSeries.iterate (/usr/node/0.8/node_modules/async.js:126:13)
process.startup.processNextTick.process._tickCallback (node.js:244:9)
Abort (core dumped)

uname -a
SunOS master-720 5.11 joyent_20130419T073558Z i86pc i386 i86pc

The callstack was as follows:

::jsstack
80475d8 libc.so.1_lwp_kill+0x15
80475f8 libc.so.1raise+0x2b
8047648 libc.so.1`abort+0x10e
8047658 0x843a2cb
8047708 v8::internal::Isolate::DoThrow+0x35f
8047728 v8::internal::Isolate::Throw+0x14
8047788 v8::internal::IC::TypeError+0x5a
8047808 v8::internal::LoadIC::Load+0x190
8047878 v8::internal::LoadIC_Miss+0xb3
804789c 0xb710a336 internal (Code: b710a2c1)
80478bc 0x9e523fec (as asyncMap) (8bf684b1)
80478dc 0x9e5229a7 (as async.eachSeries.iterate) (8bf68525)
8047900 0xb71294fc (as
startup.processNextTick.process._tickCallback) (853439dd)
804791c 0xb7121bb9
8047958 0xb7112b4a
80479d8
_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0xe3
8047a38 v8::internal::Execution::Call+0x5c
8047aa8 v8::Function::Call+0xd5
8047b28 _ZN4nodeL4TickEv+0x8e
8047b58 uv_run_idle+0x42
8047b98 uv__run+0x22
8047bb8 uv_run+0x15
8047c18 node::Start+0x174
8047c38 main+0x1b
8047c60 _start+0x83

This appears to happen when I try to re-size any KVM disks.

@Licenser
Copy link

Licenser commented Jan 2, 2015

This issue has change how it manifests. This still holds true:

http://www.listbox.com/member/archive/184463/2014/06/search/dXBkYXRlX2Rpc2tz/sort/time_rev/page/1/entry/0:2/20140610082552:5A4AD1A0-F09A-11E3-A553-A68788328651/

it seems that vmadm refuses to update size despite it being documented as updatable. Is this a documentation or a implementation bug?

@xakrume
Copy link

xakrume commented Jan 2, 2015

testing problem solved.
fifo does not resize zvol when we update vm via vmadm, and it not failed.
before update disks for kvm - need to resize zfs volsize
at first i did without zfs volsize, only by vmadm, and disk stay with old size.

iMac-XakRu:~ xakru$ ssh fifo-GZ
Last login: Fri Jan  2 11:41:59 2015 from 10.0.0.6
- SmartOS Live Image v0.147+ build: 20141113T164921Z

[root@68-05-ca-2c-5a-3d ~]# vmadm list
UUID                                  TYPE  RAM      STATE             ALIAS
5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a  OS    2048     running           fifo
d276be2a-8b4d-487f-85c0-084e7f03733e  KVM   2048     running           test

[root@68-05-ca-2c-5a-3d ~]# zfs list
NAME                                               USED  AVAIL  REFER  MOUNTPOINT
zones                                             28,3G  3,48T   944K  /zones
zones/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a        4,83G  35,2G  5,70G  /zones/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a
zones/84f59f98-6a5c-11e4-99d5-63e875faffb4         912M  3,48T   910M  /zones/84f59f98-6a5c-11e4-99d5-63e875faffb4
zones/archive                                       96K  3,48T    96K  /zones/archive
zones/b94d11d6-7a65-11e4-add0-93f38d3f5c5c        1,20G  3,48T  1,20G  -
zones/config                                       164K  3,48T   164K  legacy
zones/cores                                        522M  9,49G    96K  /zones/global/cores
zones/cores/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a   522M  9,49G   522M  /zones/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a/cores
zones/dump                                        4,00G  3,48T  4,00G  -
zones/opt                                          347M  3,48T   347M  legacy
zones/swap                                        16,4G  3,50T   464M  -
zones/usbkey                                       204K  3,48T   204K  legacy
zones/var                                         97,1M  3,48T  97,1M  legacy

[root@68-05-ca-2c-5a-3d ~]# vmadm list
UUID                                  TYPE  RAM      STATE             ALIAS
f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b  KVM   512      running           test
5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a  OS    2048     running           fifo

[root@68-05-ca-2c-5a-3d ~]# vmadm get f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b
{
  "zonename": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "autoboot": true,
  "brand": "kvm",
  "limit_priv": "default,-file_link_any,-net_access,-proc_fork,-proc_info,-proc_session",
  "v": 1,
  "create_timestamp": "2015-01-02T11:44:04.672Z",
  "cpu_shares": 32,
  "zfs_io_priority": 32,
  "max_lwps": 2000,
  "max_physical_memory": 1536,
  "max_locked_memory": 1536,
  "max_swap": 1536,
  "cpu_cap": 100,
  "billing_id": "00000000-0000-0000-0000-000000000000",
  "hostname": "test",
  "disk_driver": "virtio",
  "nic_driver": "virtio",
  "resolvers": [
    "8.8.8.8"
  ],
  "alias": "test",
  "ram": 512,
  "vcpus": 1,
  "disks": [
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "boot": true,
      "model": "virtio",
      "media": "disk",
      "image_size": 10240,
      "image_uuid": "b94d11d6-7a65-11e4-add0-93f38d3f5c5c",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    },
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "boot": false,
      "model": "virtio",
      "media": "disk",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    }
  ],
  "nics": [
    {
      "interface": "net0",
      "mac": "12:50:b2:b7:8e:61",
      "nic_tag": "admin",
      "gateway": "10.0.0.1",
      "ip": "10.0.0.102",
      "netmask": "255.255.0.0",
      "model": "virtio",
      "primary": true
    }
  ],
  "uuid": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zone_state": "running",
  "zonepath": "/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zoneid": 69,
  "last_modified": "2015-01-02T11:44:08.000Z",
  "firewall_enabled": false,
  "server_uuid": "00000000-0000-0000-0000-448a5b9ca101",
  "platform_buildstamp": "20141113T164921Z",
  "state": "running",
  "boot_timestamp": "2015-01-02T11:44:05.000Z",
  "pid": 92838,
  "customer_metadata": {
    "root_authorized_keys": "ssh-rsa ...skipped..."
  },
  "internal_metadata": {
    "package": "c5cea0f9-488a-4df9-b1b2-60007c867db4",
    "root_pw": "reevo6Jae5"
  },
  "routes": {},
  "tags": {},
  "quota": 10,
  "zfs_root_recsize": 131072,
  "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zpool": "zones",
  "snapshots": []
}

[root@68-05-ca-2c-5a-3d ~]# mkdir /opt/test
[root@68-05-ca-2c-5a-3d ~]# cd /opt/test/
[root@68-05-ca-2c-5a-3d /opt/test]# cat upd.json
{
"update_disks": [
        {
                "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
                "size": 20480
        }
                ]
}

[root@68-05-ca-2c-5a-3d ~]# vmadm list
UUID                                  TYPE  RAM      STATE             ALIAS
f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b  KVM   512      running           test
5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a  OS    2048     running           fifo

[root@68-05-ca-2c-5a-3d ~]# vmadm update  f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b -f /opt/test/upd.json
Successfully updated VM f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b

[root@68-05-ca-2c-5a-3d ~]# vmadm get f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b
{
  "zonename": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "autoboot": true,
  "brand": "kvm",
  "limit_priv": "default,-file_link_any,-net_access,-proc_fork,-proc_info,-proc_session",
  "v": 1,
  "create_timestamp": "2015-01-02T11:44:04.672Z",
  "cpu_shares": 32,
  "zfs_io_priority": 32,
  "max_lwps": 2000,
  "max_physical_memory": 1536,
  "max_locked_memory": 1536,
  "max_swap": 1536,
  "cpu_cap": 100,
  "billing_id": "00000000-0000-0000-0000-000000000000",
  "hostname": "test",
  "disk_driver": "virtio",
  "nic_driver": "virtio",
  "resolvers": [
    "8.8.8.8"
  ],
  "alias": "test",
  "ram": 512,
  "vcpus": 1,
  "disks": [
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "boot": true,
      "model": "virtio",
      "media": "disk",
      "image_size": 10240,
      "image_uuid": "b94d11d6-7a65-11e4-add0-93f38d3f5c5c",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    },
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "boot": false,
      "model": "virtio",
      "media": "disk",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    }
  ],
  "nics": [
    {
      "interface": "net0",
      "mac": "12:50:b2:b7:8e:61",
      "nic_tag": "admin",
      "gateway": "10.0.0.1",
      "ip": "10.0.0.102",
      "netmask": "255.255.0.0",
      "model": "virtio",
      "primary": true
    }
  ],
  "uuid": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zone_state": "running",
  "zonepath": "/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zoneid": 69,
  "last_modified": "2015-01-02T11:58:16.000Z",
  "firewall_enabled": false,
  "server_uuid": "00000000-0000-0000-0000-448a5b9ca101",
  "platform_buildstamp": "20141113T164921Z",
  "state": "running",
  "boot_timestamp": "2015-01-02T11:44:05.000Z",
  "pid": 92838,
  "customer_metadata": {
    "root_authorized_keys": "ssh-rsa ..skipped..."
  },
  "internal_metadata": {
    "package": "c5cea0f9-488a-4df9-b1b2-60007c867db4",
    "root_pw": "reevo6Jae5"
  },
  "routes": {},
  "tags": {},
  "quota": 10,
  "zfs_root_recsize": 131072,
  "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zpool": "zones",
  "snapshots": []
}

[root@68-05-ca-2c-5a-3d ~]# vmadm reboot f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b
Successfully completed reboot for VM f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b

[root@68-05-ca-2c-5a-3d ~]# vmadm get f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b
{
  "zonename": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "autoboot": true,
  "brand": "kvm",
  "limit_priv": "default,-file_link_any,-net_access,-proc_fork,-proc_info,-proc_session",
  "v": 1,
  "create_timestamp": "2015-01-02T11:44:04.672Z",
  "cpu_shares": 32,
  "zfs_io_priority": 32,
  "max_lwps": 2000,
  "max_physical_memory": 1536,
  "max_locked_memory": 1536,
  "max_swap": 1536,
  "cpu_cap": 100,
  "billing_id": "00000000-0000-0000-0000-000000000000",
  "hostname": "test",
  "disk_driver": "virtio",
  "nic_driver": "virtio",
  "resolvers": [
    "8.8.8.8"
  ],
  "alias": "test",
  "ram": 512,
  "vcpus": 1,
  "disks": [
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "boot": true,
      "model": "virtio",
      "media": "disk",
      "image_size": 10240,
      "image_uuid": "b94d11d6-7a65-11e4-add0-93f38d3f5c5c",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    },
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "boot": false,
      "model": "virtio",
      "media": "disk",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    }
  ],
  "nics": [
    {
      "interface": "net0",
      "mac": "12:50:b2:b7:8e:61",
      "nic_tag": "admin",
      "gateway": "10.0.0.1",
      "ip": "10.0.0.102",
      "netmask": "255.255.0.0",
      "model": "virtio",
      "primary": true
    }
  ],
  "uuid": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zone_state": "running",
  "zonepath": "/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zoneid": 70,
  "last_modified": "2015-01-02T11:58:51.000Z",
  "firewall_enabled": false,
  "server_uuid": "00000000-0000-0000-0000-448a5b9ca101",
  "platform_buildstamp": "20141113T164921Z",
  "state": "running",
  "boot_timestamp": "2015-01-02T11:58:51.000Z",
  "pid": 99848,
  "customer_metadata": {
    "root_authorized_keys": "..skipped..."
  },
  "internal_metadata": {
    "package": "c5cea0f9-488a-4df9-b1b2-60007c867db4",
    "root_pw": "reevo6Jae5"
  },
  "routes": {},
  "tags": {},
  "quota": 10,
  "zfs_root_recsize": 131072,
  "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zpool": "zones",
  "snapshots": []
}

[root@68-05-ca-2c-5a-3d ~]# zfs list
NAME                                               USED  AVAIL  REFER  MOUNTPOINT
geekpool                                           948G   850G   948G  /geekpool
zones                                             48,3G  3,46T   952K  /zones
zones/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a        4,83G  35,2G  5,70G  /zones/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a
zones/84f59f98-6a5c-11e4-99d5-63e875faffb4         912M  3,46T   910M  /zones/84f59f98-6a5c-11e4-99d5-63e875faffb4
zones/archive                                       96K  3,46T    96K  /zones/archive
zones/b94d11d6-7a65-11e4-add0-93f38d3f5c5c        1,20G  3,46T  1,20G  -
zones/config                                       164K  3,46T   164K  legacy
zones/cores                                        522M  9,49G    96K  /zones/global/cores
zones/cores/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a   522M  9,49G   522M  /zones/5a81ac9e-b1cb-4fb1-b530-1f0de56c6b2a/cores
zones/cores/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b    96K  9,49G    96K  /zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b/cores
zones/dump                                        4,00G  3,46T  4,00G  -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b         184K  10,0G   184K  /zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0    10G  3,47T  1,20G  -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1    10G  3,47T   294M  -
zones/opt                                          347M  3,46T   347M  legacy
zones/swap                                        16,4G  3,48T   464M  -
zones/usbkey                                       204K  3,46T   204K  legacy
zones/var                                         97,4M  3,46T  97,4M  legacy

[root@68-05-ca-2c-5a-3d ~]# zfs get all zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1
NAME                                              PROPERTY              VALUE                      SOURCE
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  type                  volume                     -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  creation              пт янв  2 11:44 2015       -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  used                  10G                        -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  available             3,47T                      -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  referenced            294M                       -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  compressratio         1.00x                      -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  reservation           none                       default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  volsize               10G                        local
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  volblocksize          8K                         -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  checksum              on                         default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  compression           off                        local
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  readonly              off                        default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  copies                1                          default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  refreservation        10G                        local
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  primarycache          all                        default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  secondarycache        all                        default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  usedbysnapshots       0                          -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  usedbydataset         294M                       -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  usedbychildren        0                          -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  usedbyrefreservation  9,71G                      -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  logbias               latency                    default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  dedup                 off                        default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  mlslabel              none                       default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  sync                  standard                   default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  refcompressratio      1.00x                      -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  written               294M                       -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  logicalused           291M                       -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  logicalreferenced     291M                       -
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  snapshot_limit        none                       default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  snapshot_count        none                       default
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  redundant_metadata    all                        default

And with resized zvol:


[root@68-05-ca-2c-5a-3d /var/log]# zfs set volsize=20g zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1

[root@68-05-ca-2c-5a-3d /var/log]# zfs get volsize zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1
NAME                                              PROPERTY  VALUE    SOURCE
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  volsize   20G      local

[root@68-05-ca-2c-5a-3d /var/log]# vmadm update  f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b -f /opt/test/upd.json
Successfully updated VM f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b

[root@68-05-ca-2c-5a-3d /var/log]# vmadm get f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b
{
  "zonename": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "autoboot": true,
  "brand": "kvm",
  "limit_priv": "default,-file_link_any,-net_access,-proc_fork,-proc_info,-proc_session",
  "v": 1,
  "create_timestamp": "2015-01-02T11:44:04.672Z",
  "cpu_shares": 32,
  "zfs_io_priority": 32,
  "max_lwps": 2000,
  "max_physical_memory": 1536,
  "max_locked_memory": 1536,
  "max_swap": 1536,
  "cpu_cap": 100,
  "billing_id": "00000000-0000-0000-0000-000000000000",
  "hostname": "test",
  "disk_driver": "virtio",
  "nic_driver": "virtio",
  "resolvers": [
    "8.8.8.8"
  ],
  "alias": "test",
  "ram": 512,
  "vcpus": 1,
  "disks": [
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "boot": true,
      "model": "virtio",
      "media": "disk",
      "image_size": 10240,
      "image_uuid": "b94d11d6-7a65-11e4-add0-93f38d3f5c5c",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    },
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "boot": false,
      "model": "virtio",
      "media": "disk",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "zpool": "zones",
      "size": 20480,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    }
  ],
  "nics": [
    {
      "interface": "net0",
      "mac": "12:50:b2:b7:8e:61",
      "nic_tag": "admin",
      "gateway": "10.0.0.1",
      "ip": "10.0.0.102",
      "netmask": "255.255.0.0",
      "model": "virtio",
      "primary": true
    }
  ],
  "uuid": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zone_state": "running",
  "zonepath": "/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zoneid": 71,
  "last_modified": "2015-01-02T14:40:52.000Z",
  "firewall_enabled": false,
  "server_uuid": "00000000-0000-0000-0000-448a5b9ca101",
  "platform_buildstamp": "20141113T164921Z",
  "state": "running",
  "boot_timestamp": "2015-01-02T12:19:38.000Z",
  "pid": 9561,
  "customer_metadata": {
    "root_authorized_keys": "...skiped...."
  },
  "internal_metadata": {
    "package": "c5cea0f9-488a-4df9-b1b2-60007c867db4",
    "root_pw": "reevo6Jae5"
  },
  "routes": {},
  "tags": {},
  "quota": 10,
  "zfs_root_recsize": 131072,
  "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zpool": "zones",
  "snapshots": []
}

May be we need to resize not with vmadm?
If at first i have resized zfs volsize, we need only reboot vm (kvm) to get effect for disks.
Vmadm updates disk without vmadm update -f

[root@68-05-ca-2c-5a-3d /var/log]# zfs set volsize=30g zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1
[root@68-05-ca-2c-5a-3d /var/log]# zfs get volsize zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1
NAME                                              PROPERTY  VALUE    SOURCE
zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1  volsize   30G      local
[root@68-05-ca-2c-5a-3d /var/log]# vmadm get f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b
{
  "zonename": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "autoboot": true,
  "brand": "kvm",
  "limit_priv": "default,-file_link_any,-net_access,-proc_fork,-proc_info,-proc_session",
  "v": 1,
  "create_timestamp": "2015-01-02T11:44:04.672Z",
  "cpu_shares": 32,
  "zfs_io_priority": 32,
  "max_lwps": 2000,
  "max_physical_memory": 1536,
  "max_locked_memory": 1536,
  "max_swap": 1536,
  "cpu_cap": 100,
  "billing_id": "00000000-0000-0000-0000-000000000000",
  "hostname": "test",
  "disk_driver": "virtio",
  "nic_driver": "virtio",
  "resolvers": [
    "8.8.8.8"
  ],
  "alias": "test",
  "ram": 512,
  "vcpus": 1,
  "disks": [
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "boot": true,
      "model": "virtio",
      "media": "disk",
      "image_size": 10240,
      "image_uuid": "b94d11d6-7a65-11e4-add0-93f38d3f5c5c",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk0",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    },
    {
      "path": "/dev/zvol/rdsk/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "boot": false,
      "model": "virtio",
      "media": "disk",
      "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b-disk1",
      "zpool": "zones",
      "size": 30720,
      "compression": "off",
      "refreservation": 10240,
      "block_size": 8192
    }
  ],
  "nics": [
    {
      "interface": "net0",
      "mac": "12:50:b2:b7:8e:61",
      "nic_tag": "admin",
      "gateway": "10.0.0.1",
      "ip": "10.0.0.102",
      "netmask": "255.255.0.0",
      "model": "virtio",
      "primary": true
    }
  ],
  "uuid": "f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zone_state": "running",
  "zonepath": "/zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zoneid": 71,
  "last_modified": "2015-01-02T14:40:52.000Z",
  "firewall_enabled": false,
  "server_uuid": "00000000-0000-0000-0000-448a5b9ca101",
  "platform_buildstamp": "20141113T164921Z",
  "state": "running",
  "boot_timestamp": "2015-01-02T12:19:38.000Z",
  "pid": 9561,
  "customer_metadata": {
    "root_authorized_keys": "...skiped...."
  },
  "internal_metadata": {
    "package": "c5cea0f9-488a-4df9-b1b2-60007c867db4",
    "root_pw": "reevo6Jae5"
  },
  "routes": {},
  "tags": {},
  "quota": 10,
  "zfs_root_recsize": 131072,
  "zfs_filesystem": "zones/f1a9fbca-8ad1-41eb-bf55-6e8aa3e01c0b",
  "zpool": "zones",
  "snapshots": []
}

no need vmadm update to update disks
to take effect we need to reboot (for RHEL kernels), Gentoo doesn't need reboot to take effect.

@RSully
Copy link
Contributor

RSully commented Feb 3, 2018

Running into this problem. updating size of kvm disk still does not work with vmadm.

@xakrume
Copy link

xakrume commented Feb 5, 2018

that's right. at the beginning you need to update zvol size zfs set volsize, or vmadm maintainers need to updated vmadm to work with zvol and resize disks. In RHEL6 partprobe was broken and you can't resize root partition without reboot.

@RSully
Copy link
Contributor

RSully commented Feb 5, 2018

Updating volsize works, but I also had to manually update refreservation as it was not automatically updated as the zfs manpage would suggest. I would imagine any fix to vmadm should update both properties to remain consistent with creating a new zone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants