ここはyamagが {powder|white|tdiary}.nadare.netと自宅のLinuxBoxをいぢくった時のメモを書いておく場所なので、見てもつまんないと思いまっせ ;-)
Sat Jul 13, 2019 [長年日記]
#1 [自転車] 少し南へ
先々週と先週は週末が雨だったので、自転車に乗ることができませんでした。
で、本日久々に乗ったわけですが、いつものコースより少し多く走りたかったのと、そうは言っても龍Q館まではちょっと遠いかと考え、いつも北側ばかり走っているところを、少し南に走って折り返してからいつものコースを走ることにしました。
走り始めはほとんど風が無く、調子良く走ることができたのですが、復路残り20キロくらいのところで向かい風が強くなり、脚も力が入らなくなり、最後はグダグダでした。
さて、本日の走行記録は、走行距離:63.44km、走行時間:2時間51分8秒、平均速度時速22.2キロでした。
Create Routes or Search for a route from millions at MapMyRide
Sat Jun 29, 2019 [長年日記]
#1 [電脳][nadare.net] ディスク交換
nadare.net は仮想サーバで動いていて、そのホストOSを動かしているサーバのDISKドライブが壊れて交換したのが2016年2月でした。
DISKドライブ交換前はデバイスドライバによるソフトウェアRAIDでしたが、この時点でOS標準のソフトウェアRAIDに変更し、RAID1構成で運用をしました。
で、先日(6月中旬頃)、RAID1構成の内の1デバイスでハードウェアエラーが発生し、切り離されてしまいました。この状態を長く放置はできないので、本日、DISKを購入して交換しました。
以下、手順です。
- 状態確認
/dev/sda2 が fault であることが分かります。
[root@debussy ~]# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[0] 499904 blocks [2/2] [UU] md1 : active raid1 sda2[2](F) sdb2[1] 1933479360 blocks [2/1] [_U] unused devices:
- /dev/sda をRAID構成から除外します(生きている方は明示的に fault 状態にしてから除外します)
[root@debussy ~]# mdadm --manage /dev/md0 --fail /dev/sda1 mdadm: set /dev/sda1 faulty in /dev/md0 [root@debussy ~]# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[2](F) 499904 blocks [2/1] [_U] md1 : active raid1 sda2[2](F) sdb2[1] 1933479360 blocks [2/1] [_U] unused devices:
[root@debussy ~]# mdadm --manage /dev/md0 --remove /dev/sda1 mdadm: hot removed /dev/sda1 [root@debussy ~]# mdadm --manage /dev/md1 --remove /dev/sda2 mdadm: hot removed /dev/sda2 [root@debussy ~]# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdb1[1] 499904 blocks [2/1] [_U] md1 : active raid1 sdb2[1] 1933479360 blocks [2/1] [_U] unused devices: [root@debussy ~]# - shutdown 後、ドライブを交換して再起動します。
- 新しいドライブにパーティションを作ります。
[root@debussy ~]# sfdisk -d /dev/sdb >/tmp/sdb.part [root@debussy ~]# sfdisk /dev/sda --force < /tmp/sdb.part Checking that no-one is using this disk right now ... OK Disk /dev/sda: 243201 cylinders, 255 heads, 63 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/sda: unrecognized partition table type Old situation: No partitions found Warning: given size (39070291) exceeds max allowable size (39065188) New situation: Units = sectors of 512 bytes, counting from 0 Device Boot Start End #sectors Id System /dev/sda1 * 1 1000000 1000000 fd Linux raid autodetect /dev/sda2 1000001 3867958876 3866958876 fd Linux raid autodetect /dev/sda3 3867958877 3907029167 39070291 83 Linux /dev/sda4 0 - 0 0 Empty Warning: partition 3 extends past end of disk Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) [root@debussy ~] # fdisk -l /dev/sdb Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 63 500000 fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sdb2 63 240770 1933479438 fd Linux raid autodetect /dev/sdb3 240770 243202 19535145+ 83 Linux [root@debussy ~]# fdisk -l /dev/sda Disk /dev/sda: 2000.3 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 63 500000 fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sda2 63 240770 1933479438 fd Linux raid autodetect /dev/sda3 240770 243202 19535145+ 83 Linux [root@debussy ~]#
- 交換後のドライブをRAIDに参加させる
[root@debussy ~]# mdadm --manage /dev/md0 --add /dev/sda1 mdadm: added /dev/sda1 [root@debussy ~]# mdadm --manage /dev/md1 --add /dev/sda2 mdadm: added /dev/sda2 [root@debussy ~]#
- 同期状態を確認します。
[root@debussy ~]# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sda1[0] sdb1[1] 499904 blocks [2/2] [UU] md1 : active raid1 sda2[2] sdb2[1] 1933479360 blocks [2/1] [_U] [>....................] recovery = 0.0% (450432/1933479360) finish=786.6min speed=40948K/sec unused devices:
[root@debussy ~]# - 新しいDISKドライブにブートレコードを書き込みます。
[root@debussy ~]# grub Probing devices to guess BIOS drives. This may take a long time. GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd0,0) root (hd0,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd0) setup (hd0) Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... yes Checking if "/grub/stage2" exists... yes Checking if "/grub/e2fs_stage1_5" exists... yes Running "embed /grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal) Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal) Running "install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf "... succeeded Done. grub> quit quit [root@debussy ~]#
Fri Jun 28, 2019 [長年日記]
#1 [電脳] サーバ証明書自動更新(Let's Encrypt)
先日、Let's Encrypt のサーバ証明書を設定しましたが、有効期限が3ヶ月なので自動更新するよう設定しています。
で、そろそろ期限が近いので確認してみたところ、バーチャルホスト3つの内、ひとつだけが更新に失敗していました。
これについて調べたところ、失敗しているバーチャルホストは一番最初に設定したもので、後から追加したバーチャルホストと DocumentRoot が重複するため、サーバ証明書設定後に DocumentRoot を変えたものでしたが、certbot 側の設定ファイルに DocumentRoot のパスが設定されており、それが合っていないことが原因でした。
Sat Jun 22, 2019 [長年日記]
#1 [自転車] 追い風にそそのかされて
追い風にそそのかされて、龍Q館まで走ってしまいました。
数年前まではよくここまで走っていましたが、ここしばらくは玉葉橋で折り返すことが多く、久々にこの景色を見ました。
復路は向かい風でモチベーションが下がりますが、雨まで降ってくると生存本能を刺激するのか、結構良い感じで走ることができましたが、ラスト10kmで力尽きました。
さて、本日の走行記録は、走行距離:79.51km、走行時間:3時間15分55秒、平均速度時速24.3キロでした。
Create Routes or Search for a route from millions at MapMyRide
Sat Jun 01, 2019 [長年日記]
#1 [自転車] 少し距離を延ばして
いつも玉葉橋で折り返していますが、今日は時間的・体力的に余裕があったので、もう一つ先の野田橋を折り返し地点としました。
今日は風が味方になってくれて、往路・復路とも無風か追い風という状態で、また、気温もさほど高く無く、気持ち良く走ることができました。
さて、本日の走行記録は、走行距離:62.59km、走行時間:2時間31分21秒、平均速度時速24.8キロでした。
Create Routes or Search for a route from millions at MapMyRide
♪1 よりこ [そそのかされてって言うのが、なんだか楽しそうですね。お疲れ様でした。]