AKAI TSUKI

System development or Technical something

Create Physical volume in Linux CentOS

Check disk mount and type with df

# df -khT
Filesystem          Type      Size  Used Avail Use% Mounted on
/dev/mapper/cl-root xfs        35G  1.2G   34G   4% /
devtmpfs            devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs               tmpfs     1.9G     0  1.9G   0% /dev/shm
tmpfs               tmpfs     1.9G  8.3M  1.9G   1% /run
tmpfs               tmpfs     1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1           xfs      1014M  182M  833M  18% /boot
tmpfs               tmpfs     380M     0  380M   0% /run/user/0
#

I created LVM partiation. Create LVM type partition in Linux CentOS 7 by fdisk - AKAI TSUKI

before

# fdisk -l

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b4090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    79691775    38796288   8e  Linux LVM
#

after

# fdisk -l /dev/sda

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b4090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    79691775    38796288   8e  Linux LVM
/dev/sda3        79691776   111149055    15728640   8e  Linux LVM
/dev/sda4       111149056   167772159    28311552   8e  Linux LVM
#

create PV

After create these partiation, I reboot server and create PV as follows:

# pvcreate /dev/sda3
  Physical volume "/dev/sda3" successfully created.
# pvcreate /dev/sda4
  Physical volume "/dev/sda4" successfully created.
# pvs
  PV         VG Fmt  Attr PSize  PFree
  /dev/sda2  cl lvm2 a--  37.00g  4.00m
  /dev/sda3     lvm2 ---  15.00g 15.00g
  /dev/sda4     lvm2 ---  27.00g 27.00g
#

Create LVM type partition in Linux CentOS 7 by fdisk

create /dev/sda3

# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b4090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    79691775    38796288   8e  Linux LVM

Command (m for help): n
Partition type:
   p   primary (2 primary, 0 extended, 2 free)
   e   extended
Select (default p): p
Partition number (3,4, default 3): 3
First sector (79691776-167772159, default 79691776): 
Using default value 79691776
Last sector, +sectors or +size{K,M,G} (79691776-167772159, default 167772159): +15G
Partition 3 of type Linux and of size 15 GiB is set

Command (m for help): p

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b4090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    79691775    38796288   8e  Linux LVM
/dev/sda3        79691776   111149055    15728640   83  Linux

Command (m for help): t
Partition number (1-3, default 3): 3
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'

Command (m for help): p

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b4090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    79691775    38796288   8e  Linux LVM
/dev/sda3        79691776   111149055    15728640   8e  Linux LVM

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
#

create /dev/sda4

# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition type:
   p   primary (3 primary, 0 extended, 1 free)
   e   extended
Select (default e): p
Selected partition 4
First sector (111149056-167772159, default 111149056): 
Using default value 111149056
Last sector, +sectors or +size{K,M,G} (111149056-167772159, default 167772159): 
Using default value 167772159
Partition 4 of type Linux and of size 27 GiB is set

Command (m for help): p

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b4090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    79691775    38796288   8e  Linux LVM
/dev/sda3        79691776   111149055    15728640   8e  Linux LVM
/dev/sda4       111149056   167772159    28311552   83  Linux

Command (m for help): t
Partition number (1-4, default 4): 
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'

Command (m for help): p

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b4090

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    79691775    38796288   8e  Linux LVM
/dev/sda3        79691776   111149055    15728640   8e  Linux LVM
/dev/sda4       111149056   167772159    28311552   8e  Linux LVM

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
#

Use docker container for ssh test.

https://hub.docker.com/r/jdeathe/centos-ssh/

[root@localhost ~]# docker run -d \
>   --name ssh.pool-1.1.1 \
>   -p 2020:22 \
>   jdeathe/centos-ssh:centos-7
Unable to find image 'jdeathe/centos-ssh:centos-7' locally
centos-7: Pulling from jdeathe/centos-ssh
45a2e645736c: Already exists
c0584d31d0c7: Pull complete
312baf228c08: Pull complete
1a49aeb1a2d6: Pull complete
c94e1784cd5f: Pull complete
8f0d8715c20d: Pull complete
3ad9eac7cf9a: Pull complete
f0808ae00a9e: Pull complete
d2342971ceac: Pull complete
8b1c26542222: Pull complete
441ff7da597d: Pull complete
a6b9b592ad30: Pull complete
f1e027d49efe: Pull complete
Digest: sha256:f78be125637532943583ed4d28a1a1646db882a0f33bfa9c116de1ab1e6ee211
Status: Downloaded newer image for jdeathe/centos-ssh:centos-7
1a0afe299c430404697d6b7c4030b221083089dd77e2325e1f0f5c59031b5537
[root@localhost ~]#
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                  NAMES
1a0afe299c43        jdeathe/centos-ssh:centos-7   "/usr/bin/supervisord"   24 seconds ago      Up 22 seconds       0.0.0.0:2020->22/tcp   ssh.pool-1.1.1
febbb71e5f22        centos:7                      "tail -f /dev/null"      2 weeks ago         Up About an hour                           demo
[root@localhost ~]#

To check infomation(password)

[root@localhost ~]# docker logs ssh.pool-1.1.1

and I get the insecure private key.

[root@localhost ~]# curl -LSs \
>   https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant \
>   > id_rsa_insecure
[root@localhost ~]# chmod 600 id_rsa_insecure
[root@localhost ~]#

then, I can connect to container by ssh.

[root@localhost ~]# ssh -p 2020 -i id_rsa_insecure \
>   app-admin@localhost
The authenticity of host '[localhost]:2020 ([::1]:2020)' can't be established.
ECDSA key fingerprint is a2:9e:09:54:56:d2:6c:37:69:40:6d:fa:8c:d8:64:e3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:2020' (ECDSA) to the list of known hosts.
[app-admin@1a0afe299c43 ~]$ ls -l
total 0
[app-admin@1a0afe299c43 ~]$

and directly,

[root@localhost ~]# docker inspect 1a0afe299c43 |grep IPAddress
            "SecondaryIPAddresses": null,
            "IPAddress": "172.17.0.3",
                    "IPAddress": "172.17.0.3",
[root@localhost ~]# ssh -i id_rsa_insecure app-admin@172.17.0.3
The authenticity of host '172.17.0.3 (172.17.0.3)' can't be established.
ECDSA key fingerprint is a2:9e:09:54:56:d2:6c:37:69:40:6d:fa:8c:d8:64:e3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.17.0.3' (ECDSA) to the list of known hosts.
Last login: Sun Jan 15 17:24:23 2017 from 172.17.0.1
[app-admin@1a0afe299c43 ~]$

confirm package(apt) version in Ubuntu

I confirmed version of zfs(zfsutils-linux) and lxd.

ubu@ubuntu16:~$ apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.6.5.6-0ubuntu15
  Candidate: 0.6.5.6-0ubuntu15
  Version table:
 *** 0.6.5.6-0ubuntu15 500
        500 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.5.6-0ubuntu8 500
        500 http://jp.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
ubu@ubuntu16:~$
ubu@ubuntu16:~$ apt-cache policy lxd
lxd:
  Installed: 2.0.8-0ubuntu1~ubuntu16.04.2
  Candidate: 2.0.8-0ubuntu1~ubuntu16.04.2
  Version table:
     2.7-0ubuntu2~ubuntu16.04.1 100
        100 http://jp.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages
 *** 2.0.8-0ubuntu1~ubuntu16.04.2 500
        500 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.2-0ubuntu1~16.04.1 500
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     2.0.0-0ubuntu4 500
        500 http://jp.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
ubu@ubuntu16:~$

Install lxd in Ubuntu

I executed the command "sudo apt install zfs lxd" in Ubuntu 16.04. But...

lxd is already the newest version (2.0.8-0ubuntu1~ubuntu16.04.2).

ubu@ubuntu16:~$ sudo apt install zfs lxd
[sudo] password for ubu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'zfsutils-linux' instead of 'zfs'
lxd is already the newest version (2.0.8-0ubuntu1~ubuntu16.04.2).
The following additional packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-doc zfs-zed
Suggested packages:
  default-mta | mail-transport-agent samba-common-bin nfs-kernel-server zfs-initramfs
The following NEW packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-doc zfs-zed zfsutils-linux
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 896 kB of archives.
After this operation, 2,902 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 zfs-doc all 0.6.5.6-0ubuntu15 [49.9 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libuutil1linux amd64 0.6.5.6-0ubuntu15 [27.4 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libnvpair1linux amd64 0.6.5.6-0ubuntu15 [23.4 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libzpool2linux amd64 0.6.5.6-0ubuntu15 [384 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libzfs2linux amd64 0.6.5.6-0ubuntu15 [106 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 zfsutils-linux amd64 0.6.5.6-0ubuntu15 [276 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 zfs-zed amd64 0.6.5.6-0ubuntu15 [29.6 kB]
Fetched 896 kB in 0s (1,683 kB/s)
Selecting previously unselected package zfs-doc.
(Reading database ... 91850 files and directories currently installed.)
Preparing to unpack .../zfs-doc_0.6.5.6-0ubuntu15_all.deb ...
Unpacking zfs-doc (0.6.5.6-0ubuntu15) ...
Selecting previously unselected package libuutil1linux.
Preparing to unpack .../libuutil1linux_0.6.5.6-0ubuntu15_amd64.deb ...
Unpacking libuutil1linux (0.6.5.6-0ubuntu15) ...
Selecting previously unselected package libnvpair1linux.
Preparing to unpack .../libnvpair1linux_0.6.5.6-0ubuntu15_amd64.deb ...
Unpacking libnvpair1linux (0.6.5.6-0ubuntu15) ...
Selecting previously unselected package libzpool2linux.
Preparing to unpack .../libzpool2linux_0.6.5.6-0ubuntu15_amd64.deb ...
Unpacking libzpool2linux (0.6.5.6-0ubuntu15) ...
Selecting previously unselected package libzfs2linux.
Preparing to unpack .../libzfs2linux_0.6.5.6-0ubuntu15_amd64.deb ...
Unpacking libzfs2linux (0.6.5.6-0ubuntu15) ...
Selecting previously unselected package zfsutils-linux.
Preparing to unpack .../zfsutils-linux_0.6.5.6-0ubuntu15_amd64.deb ...
Unpacking zfsutils-linux (0.6.5.6-0ubuntu15) ...
Selecting previously unselected package zfs-zed.
Preparing to unpack .../zfs-zed_0.6.5.6-0ubuntu15_amd64.deb ...
Unpacking zfs-zed (0.6.5.6-0ubuntu15) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Processing triggers for initramfs-tools (0.122ubuntu8.7) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu13) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up zfs-doc (0.6.5.6-0ubuntu15) ...
Setting up libuutil1linux (0.6.5.6-0ubuntu15) ...
Setting up libnvpair1linux (0.6.5.6-0ubuntu15) ...
Setting up libzpool2linux (0.6.5.6-0ubuntu15) ...
Setting up libzfs2linux (0.6.5.6-0ubuntu15) ...
Setting up zfsutils-linux (0.6.5.6-0ubuntu15) ...
zfs-import-cache.service is a disabled or a static unit, not starting it.
zfs-import-scan.service is a disabled or a static unit, not starting it.
zfs-mount.service is a disabled or a static unit, not starting it.
Processing triggers for initramfs-tools (0.122ubuntu8.7) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Setting up zfs-zed (0.6.5.6-0ubuntu15) ...
zed.service is a disabled or a static unit, not starting it.
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Processing triggers for systemd (229-4ubuntu13) ...
Processing triggers for ureadahead (0.100.0-19) ...
ubu@ubuntu16:~$

ubu@ubuntu16:~$ id
uid=1000(ubu) gid=1000(ubu) groups=1000(ubu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),110(lxd),115(lpadmin),116(sambashare)
ubu@ubuntu16:~$ newgrp lxd
ubu@ubuntu16:~$ id
uid=1000(ubu) gid=110(lxd) groups=110(lxd),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),115(lpadmin),116(sambashare),1000(ubu)
ubu@ubuntu16:~$

ubu@ubuntu16:~$ lxd --version
2.0.8
ubu@ubuntu16:~$ lxc --version
2.0.8
ubu@ubuntu16:~$

apt update in ubuntu

I executed the command "sudo apt update".

ubu@ubuntu16:~$ sudo apt update
[sudo] password for ubu:
Hit:1 http://jp.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://jp.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [445 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [438 kB]
Fetched 1,190 kB in 1s (897 kB/s)
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
ubu@ubuntu16:~$

and then I executed the command "sudo dpkg --configure -a".

ubu@ubuntu16:~$ sudo dpkg --configure -a
Setting up libapt-inst2.0:amd64 (1.2.15ubuntu0.2) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Setting up libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.5) ...
Setting up libisc-export160 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up apt-utils (1.2.15ubuntu0.2) ...
Setting up tzdata (2016j-0ubuntu0.16.04) ...

Current default time zone: 'Asia/Tokyo'
Local time is now:      Mon Jan  9 17:01:47 JST 2017.
Universal Time is now:  Mon Jan  9 08:01:47 UTC 2017.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up libdns-export162 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up python3-problem-report (2.20.1-0ubuntu2.4) ...
Setting up linux-image-4.4.0-57-generic (4.4.0-57.78) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found initrd image: /boot/initrd.img-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
done
Setting up libisccc140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Setting up udev (229-4ubuntu10) ...
addgroup: The group `input' already exists as a system group. Exiting.
update-initramfs: deferring update (trigger activated)
Processing triggers for systemd (229-4ubuntu10) ...
Setting up liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up openssl (1.0.2g-1ubuntu4.5) ...
Setting up vim-common (2:7.4.1689-3ubuntu1.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Setting up vim-runtime (2:7.4.1689-3ubuntu1.2) ...
Setting up openssh-client (1:7.2p2-4ubuntu2.1) ...
Setting up linux-firmware (1.157.4) ...
Setting up libidn11:amd64 (1.32-3ubuntu1.1) ...
Setting up libdbus-1-3:amd64 (1.10.6-1ubuntu3.1) ...
Setting up libpython3.5-minimal:amd64 (3.5.2-2ubuntu0~16.04.1) ...
Setting up vim-tiny (2:7.4.1689-3ubuntu1.2) ...
Setting up libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.2) ...
Setting up libpython3.5-stdlib:amd64 (3.5.2-2ubuntu0~16.04.1) ...
Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up python3-apport (2.20.1-0ubuntu2.4) ...
Setting up python3.5-minimal (3.5.2-2ubuntu0~16.04.1) ...
Setting up openssh-sftp-server (1:7.2p2-4ubuntu2.1) ...
Setting up apport (2.20.1-0ubuntu2.4) ...
Setting up libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up dbus (1.10.6-1ubuntu3.1) ...
A reboot is required to replace the running dbus-daemon.
Please reboot the system when convenient.
Setting up bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up python3.5 (3.5.2-2ubuntu0~16.04.1) ...
Setting up apt-transport-https (1.2.15ubuntu0.2) ...
Setting up libpam-systemd:amd64 (229-4ubuntu10) ...
Setting up curl (7.47.0-1ubuntu2.2) ...
Setting up libpython3.5:amd64 (3.5.2-2ubuntu0~16.04.1) ...
Setting up dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.2) ...
Setting up openssh-server (1:7.2p2-4ubuntu2.1) ...
Installing new version of config file /etc/network/if-up.d/openssh-server ...
Setting up vim (2:7.4.1689-3ubuntu1.2) ...
Setting up liblxc1 (2.0.5-0ubuntu1~ubuntu16.04.3) ...
Setting up lxc-common (2.0.5-0ubuntu1~ubuntu16.04.3) ...
Processing triggers for initramfs-tools (0.122ubuntu8.1) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Processing triggers for libc-bin (2.23-0ubuntu3) ...
ubu@ubuntu16:~$

and I executed again.

ubu@ubuntu16:~$ sudo apt update
Hit:1 http://jp.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://jp.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://jp.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 102 kB in 1s (71.2 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
73 packages can be upgraded. Run 'apt list --upgradable' to see them.
ubu@ubuntu16:~$