root@orangepi2:~# diff -u /etc/dnsmasq.conf.org /etc/dnsmasq.conf
--- /etc/dnsmasq.conf.org 2022-02-28 11:54:50.037516142 +0900
+++ /etc/dnsmasq.conf 2022-02-28 16:05:58.999972348 +0900
@@ -8,6 +8,7 @@
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
#port=5353
+port=53
# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
@@ -16,7 +17,7 @@
# these requests from bringing up the link unnecessarily.
# Never forward plain names (without a dot or domain part)
-#domain-needed
+domain-needed
# Never forward addresses in the non-routed address spaces.
#bogus-priv
@@ -43,7 +44,7 @@
# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
-#resolv-file=
+resolv-file=/etc/resolv-tmp.conf
# By default, dnsmasq will send queries to any of the upstream
# servers it knows about and tries to favour servers to are known
@@ -72,6 +73,7 @@
# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
#local=/localnet/
+local=/osakana.net/
# Add domains which you want to force to an IP address here.
# The example below send any host in double-click.net to a local
@@ -142,6 +144,7 @@
# domain of all systems configured by DHCP
# 3) Provides the domain part for "expand-hosts"
#domain=thekelleys.org.uk
+domain=osakana.net,客先IPアドレス帯/24
# Set a different domain for a particular subnet
#domain=wireless.thekelleys.org.uk,192.168.2.0/24
osmc@osmc:~$ sudo apt-get update
Get:1 http://security.debian.org buster/updates InRelease [65.4 kB]
Get:2 http://ftp.debian.org/debian buster InRelease [122 kB]
Get:4 http://ftp.debian.org/debian buster-updates InRelease [51.9 kB]
Hit:3 http://ftp.fau.de/osmc/osmc/apt buster InRelease
Reading package lists... Done
E: Repository 'http://security.debian.org buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
N: Repository 'http://ftp.debian.org/debian buster InRelease' changed its 'Version' value from '10.10' to '10.11'
E: Repository 'http://ftp.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://ftp.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
osmc@osmc:~$
osmc@osmc:/etc/apt$ sudo apt upgrade
Running apt upgrade on your system can cause adverse effects on your system
Use apt full-upgrade, which is the proper way to administer a Debian / Ubuntu system
For more information about updates, see https://osmc.tv/wiki/general/keeping-your-osmc-system-up-to-date/
osmc@osmc:/etc/apt$
apt full-upgrade を使えと怒られた
osmc@osmc:/etc/apt$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
armv7-libass-osmc armv7-libnfs-osmc dh-python g++-6 gnupg-agent libass5 libavcodec57 libavformat57 libavutil55 libbind9-140
libbluray1 libcdio13 libcryptsetup4 libdevmapper-event1.02.1 libdns162 libegl1-mesa libenca0 libevent-2.0-5 libgdbm3
libgl1-mesa-glx libgles2-mesa libicu57 libisc160 libisccc140 libisccfg140 libiso9660-8 liblivemedia57 liblvm2app2.2 liblwres141
libmicrodns0 libncurses5 libnfs8 libntfs-3g871 libpcre16-3 libperl5.24 libpostproc54 libprocps6 libprotobuf-lite10 libproxy1v5
libpython3.5-minimal libpython3.5-stdlib libsndio6.1 libssl1.0.2 libstdc++-6-dev libswresample2 libswscale4 libunistring0
libupnp6 libva-drm1 libva-wayland1 libva-x11-1 libva1 libvlccore8 libvpx4 libwayland-egl1-mesa libwebpmux2 libx264-148
libx265-95 python-apt python-certifi python-chardet python-dbus python-gi python-gobject python-gobject-2 python-idna
python-imaging python-pexpect python-pil python-ptyprocess python-requests python-six python-unidecode python-urllib3
python3-distutils python3-lib2to3 python3.5 python3.5-minimal wireless-firmware-osmc
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
armv7-bluezalsa-osmc libbluetooth3 libfdk-aac1 libpython3.7 libsbc1 python-crypto python-ldb python-samba python-tdb
python3-dbus python3-gi python3-pil python3-unidecode rbp2-image-5.10.78-2-osmc rbp2-mesa-osmc samba-common-bin
The following packages will be upgraded:
apt apt-utils armv7-bluez-osmc armv7-eventlircd-osmc armv7-network-osmc armv7-remote-osmc avahi-daemon base-files
base-files-osmc bind9-host ca-certificates curl debconf debian-archive-keyring distro-info-data iproute2 libapt-inst2.0
libapt-pkg5.0 libavahi-client3 libavahi-common-data libavahi-common3 libavahi-compat-libdnssd1 libavahi-core7 libavcodec58
libavformat58 libavutil56 libbind9-161 libbsd0 libc-bin libc-dev-bin libc-l10n libc6 libc6-dev libcairo2 libcurl4 libdns1104
libgcrypt20 libglib2.0-0 libgnutls30 libgssapi-krb5-2 libhogweed4 libicu63 libisc1100 libisccc161 libisccfg163 libk5crypto3
libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libldb1 liblirc-client0 liblwres161 liblz4-1 libmariadb3 libnettle6
libnss-myhostname libnss3 libntfs-3g883 libopenjp2-7 libp11-kit0 libpam-systemd libpostproc55 libpython3.7-minimal
libpython3.7-stdlib libsmbclient libsndfile1 libssl-dev libssl1.1 libswresample3 libswscale5 libsystemd0 libtiff5 libudev1
libvlc-bin libvlc5 libvlccore9 libwbclient0 libwebp6 libwebpdemux2 libwebpmux3 libx11-6 libx11-data libx11-xcb1 libxml2
libzstd1 linux-libc-dev locales mariadb-common mediacenter-addon-osmc mediacenter-eventclients-common-osmc
mediacenter-send-osmc mediacenter-skin-osmc multiarch-support ntfs-3g openssl openvpn psmisc python3.7 python3.7-minimal
rbp-bootloader-osmc rbp-userland-osmc rbp2-device-osmc rbp2-ftr-osmc rbp2-kernel-osmc rbp2-libcec-osmc rbp2-mediacenter-osmc
samba-common samba-libs sudo systemd systemd-sysv tzdata udev vlc vlc-bin vlc-data vlc-l10n vlc-plugin-base vlc-plugin-qt
vlc-plugin-video-output wpasupplicant
122 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 223 MB of archives.
After this operation, 76.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org buster/updates/main armhf libsmbclient armhf 2:4.9.5+dfsg-5+deb10u2 [155 kB]
<略>
Get:61 http://ftp.fau.de/osmc/osmc/apt buster/main armhf rbp2-device-osmc armhf 1.5.7 [553 kB]
Get:62 http://ftp.fau.de/osmc/osmc/apt buster/main armhf multiarch-support armhf 2.28-110.1 [215 kB]
Fetched 223 MB in 2min 18s (1619 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 41428 files and directories currently installed.)
Preparing to unpack .../base-files_10.3+deb10u11_armhf.deb ...
Unpacking base-files (10.3+deb10u11) over (10.3+deb10u7) ...
Setting up base-files (10.3+deb10u11) ...
<略>
Preparing to unpack .../56-liblwres161_1%3a9.11.5.P4+dfsg-5.1+deb10u6_armhf.deb ...
Unpacking liblwres161:armhf (1:9.11.5.P4+dfsg-5.1+deb10u6) over (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Preparing to unpack .../57-avahi-daemon_0.7-4+deb10u1_armhf.deb ...
Unpacking avahi-daemon (0.7-4+deb10u1) over (0.7-4+b1) ...
dpkg: warning: unable to delete old directory '/etc/resolvconf/update-libc.d': Directory not empty
dpkg: warning: unable to delete old directory '/etc/resolvconf': Directory not empty
Preparing to unpack .../58-mediacenter-addon-osmc_3.0.737_all.deb ...
Unpacking mediacenter-addon-osmc (3.0.737) over (3.0.699) ...
dpkg: warning: unable to delete old directory '/usr/share/kodi/addons/script.module.osmcsetting.updates/resources/osmc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/kodi/addons/script.module.osmcsetting.services/resources/osmc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/kodi/addons/script.module.osmcsetting.remotes/resources/osmc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/kodi/addons/script.module.osmcsetting.pi/resources/osmc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/kodi/addons/script.module.osmcsetting.networking/resources/osmc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/kodi/addons/script.module.osmcsetting.logging/resources/osmc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/share/kodi/addons/script.module.osmcsetting.apfstore/resources/osmc': Directory not empty
Preparing to unpack .../59-mediacenter-skin-osmc_19.1.0-19_all.deb ...
Unpacking mediacenter-skin-osmc (19.1.0-19) over (18.5.0-4) ...
Preparing to unpack .../60-libnss3_2%3a3.42.1-1+deb10u4_armhf.deb ...
Unpacking libnss3:armhf (2:3.42.1-1+deb10u4) over (2:3.42.1-1+deb10u3) ...
Preparing to unpack .../61-rbp2-libcec-osmc_6.0.2-3_armhf.deb ...
Unpacking rbp2-libcec-osmc (6.0.2-3) over (4.0.4-5) ...
<略>
Setting up libavformat58:armhf (7:4.1.8-0+deb10u1) ...
Setting up libbind9-161:armhf (1:9.11.5.P4+dfsg-5.1+deb10u6) ...
Setting up samba-common-bin (2:4.9.5+dfsg-5+deb10u2) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE
Done
Setting up vlc-plugin-base:armhf (3.0.12-0+deb10u1) ...
Setting up vlc (3.0.12-0+deb10u1) ...
Setting up bind9-host (1:9.11.5.P4+dfsg-5.1+deb10u6) ...
Setting up avahi-daemon (0.7-4+deb10u1) ...
Removing obsolete conffile /etc/network/if-up.d/avahi-daemon ...
Removing obsolete conffile /etc/resolvconf/update-libc.d/avahi-daemon ...
Setting up rbp2-mediacenter-osmc (19.3.0-7) ...
Setting up rbp2-device-osmc (1.5.7) ...
Processing triggers for dbus (1.12.20-0+deb10u1) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for libc-bin (2.28-110.1) ...
Processing triggers for ntp (1:4.2.8p12+dfsg-4) ...
Processing triggers for ca-certificates (20200601~deb10u2) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for libvlc-bin:armhf (3.0.12-0+deb10u1) ...
osmc@osmc:/etc/apt$
drbd起動時に下記の様な「/lib/drbd/drbd: line 148: /var/lib/linstor/loop_device_mapping: No such file or directory」というログが出力されている。
root@ubuntu02:~# systemctl status drbd
● drbd.service - DRBD -- please disable. Unless you are NOT using a cluster manager.
Loaded: loaded (/lib/systemd/system/drbd.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2021-12-20 14:07:35 JST; 2s ago
Process: 241197 ExecStart=/lib/drbd/drbd start (code=exited, status=0/SUCCESS)
Main PID: 241197 (code=exited, status=0/SUCCESS)
Dec 20 14:07:34 ubuntu02 drbd[241197]: /lib/drbd/drbd: line 148: /var/lib/linstor/loop_device_mapping: No such file or directory
Dec 20 14:07:34 ubuntu02 drbd[241216]: [
Dec 20 14:07:34 ubuntu02 drbd[241216]: create res: alfons
Dec 20 14:07:34 ubuntu02 drbd[241216]: prepare disk: alfons
Dec 20 14:07:34 ubuntu02 drbd[241216]: adjust disk: alfons
Dec 20 14:07:34 ubuntu02 drbd[241216]: adjust net: alfons
Dec 20 14:07:34 ubuntu02 drbd[241216]: ]
Dec 20 14:07:35 ubuntu02 drbd[241258]: WARN: stdin/stdout is not a TTY; using /dev/console
Dec 20 14:07:35 ubuntu02 drbd[241197]: ...done.
Dec 20 14:07:35 ubuntu02 systemd[1]: Finished DRBD -- please disable. Unless you are NOT using a cluster manager..
root@ubuntu02:~#
まず、 /var/lib/linstor ディレクトリは標準状態では存在していない。
root@ubuntu02:~# ls -l /var/lib/linstor
ls: cannot access '/var/lib/linstor': No such file or directory
root@ubuntu02:~#
# Set up/detach linstor loopback devices for LINSTOR file based pools
# FIXME I think setting up these loop device mappings should be done elsewhere,
# and not in the DRBD init file; possibly we need proper support in drbdadm.
handle_linstor_loopback()
{
local line dev file
# || [[ -n $line ]]: in case there is no newline at EOF
while read -r line || [[ -n $line ]] ; do
dev=${line%%:*}
file=${line#*:}
test -f "$file" && test -r "$file" && test -w "$file" || continue
# should -f be allowed?
[[ $dev = loop* ]] || [[ $dev = /dev/loop* ]] || continue
case "$1" in
# what about existing, but "wrong", mappings?
start) losetup "$dev" 2>/dev/null || losetup "$dev" "$file";;
stop) losetup "$dev" 2>/dev/null && losetup -d "$dev";;
esac
done < /var/lib/linstor/loop_device_mapping
# at least we tried.
return 0
}
「drbdadm primary shares」でPrimaryとして動作させたあと、他方のサーバに切り替えるため降格する「drbdadm secondary shares」を実行したところ、「0: State change failed: (-12) Device is held open by someone」というメッセージで失敗した。
root@ubuntu01:~# drbdadm secondary shares
0: State change failed: (-12) Device is held open by someone
Command 'drbdsetup-84 secondary 0' terminated with exit code 11
root@ubuntu01:~#
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="maybe-ubiquity nomodeset"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
GRUB_GFXMODE=800x600
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
書き換えたらgrub.cfgを生成するため「sudo update-grub2」を実行します。
instadmin@ubuntu:~$ sudo update-grub2
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-91-generic
Found initrd image: /boot/initrd.img-5.4.0-91-generic
done
instadmin@ubuntu:~$
[root@centos7 ~]# grub2-mkconfig -o /etc/grub2.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1160.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1160.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-2c896cb2eafd4db586ecfbd67535d5dc
Found initrd image: /boot/initramfs-0-rescue-2c896cb2eafd4db586ecfbd67535d5dc.img
done
[root@centos7 ~]#