Jammy Jellyfish(22.04) – matoken's blog https://matoken.org/blog Is there no plan B? Tue, 28 Jun 2022 14:13:27 +0000 ja hourly 1 https://wordpress.org/?v=7.1.3 https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9-32x32.jpeg Jammy Jellyfish(22.04) – matoken's blog https://matoken.org/blog 32 32 OracleCloud VPSにブロックストレージを追加 https://matoken.org/blog/2022/06/28/add-block-storage-to-oracle-cloud-vps/ https://matoken.org/blog/2022/06/28/add-block-storage-to-oracle-cloud-vps/#respond Tue, 28 Jun 2022 14:13:26 +0000 http://matoken.org/blog/?p=3691

Matrixの文章を見ていたらOracleのサービスで200GBまでストレージが使えそうなのに気づきました.

表 1. Free Matrix Server using Oracle Cloud | Matrix.org
Vendor Time-limit Count RAM (GB) Storage (GB) Transfer (GB)

AWS

12 months

1 t2.micro

1

30

15

Azure

12 months

1 B1S

1

2x 64

15

GCP

no limit

1 e2-micro

1

30

1

Oracle

no limit

1-4 VM.Standard.A1.Flex

24

200

10000

公式ページを見ても200GB使えそうです.

2つのBlock Volumeストレージ、合計200 GB。

現在は50GB程x2利用しているのであと100GB使えそうです.試してみました.


https://cloud.oracle.com/ からログインして,「ストレージ」→「ブロック・ボリューム」から,「ブロック・ボリュームの作成」を行います.

そこで「名前」に「任意の名前」,ボリューム・サイズとパフォーマンス → カスタム,ボリューム・サイズ(GB)に「100GB」を設定.

左下の「リソース」,「メトリック」→「アタッチされたインスタンス」から「ブロック・ボリュームのアタッチ」で既存のインスタンスニアタッチします.
ここでは「ボリュームの選択」→「上で作成したボリューム」,「アタッチメント・タイプ」→「準仮想化」,「アクセス」→「読取り/書込み」,「デバイス・パス」→「/dev/oracleoci/oraclevdb」
という感じで設定しました.

(スクリーンショットを取得してなかったので大雑把です……)

この状態でインスタンを確認するとデバイス( /dev/oracleoci/oraclevdb )が出来ていました. /dev/sdb にシンボリックリンクがはられています.

$ ls /dev/oracleoci/oraclevdb
/dev/oracleoci/oraclevdb
$ ls -l /dev/sdb /dev/oracleoci/oraclevdb
lrwxrwxrwx 1 root root     6 Jun 28 12:57 /dev/oracleoci/oraclevdb -> ../sdb
brw-rw---- 1 root disk 8, 16 Jun 28 12:57 /dev/sdb

後は普通のLinuxなのでパーティションを切って,フォーマットしてマウントします.

$ sudo fdisk -l /dev/oracleoci/oraclevdb (1)
Disk /dev/oracleoci/oraclevdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: BlockVolume
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
$ sudo fdisk /dev/oracleoci/oraclevdb (2)

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x130d310a.

Command (m for help): n (3)
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p (4)
Partition number (1-4, default 1): (5)
First sector (2048-209715199, default 2048): (6)
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-209715199, default 209715199): (7)

Created a new partition 1 of type 'Linux' and of size 100 GiB.

Command (m for help): p (8)
Disk /dev/oracleoci/oraclevdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: BlockVolume
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disklabel type: dos
Disk identifier: 0x130d310a

Device                    Boot Start       End   Sectors  Size Id Type
/dev/oracleoci/oraclevdb1       2048 209715199 209713152  100G 83 Linux

Command (m for help): w (9)
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

$ sudo mkfs.ext4 /dev/oracleoci/oraclevdb1 (10)
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 26214144 4k blocks and 6553600 inodes
Filesystem UUID: dbc5f8b5-5f38-4246-9f41-6003e1f5d1fb
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: done

$ sudo mkdir /export (11)
$ sudo mount /dev/oracleoci/oraclevdb1 /export (12)
$ df -H | grep -vE "loop|tmpfs|udev" (13)
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        49G   29G   20G  60% /
/dev/sda15      103M  297k  102M   1% /boot/efi
/dev/sdb1       106G   63M  100G   1% /export
$ sudo umount /export (14)
$ echo "/dev/sdb1        /export ext4    defaults        0 1" | sudo tee -a /etc/fstab (15)
/dev/sdb1       /export ext4    defaults        0 1
$ sudo mount -a (16)
$ df -H | grep -vE "loop|tmpfs|udev" (17)
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        49G   29G   20G  60% /
/dev/sda15      103M  297k  102M   1% /boot/efi
/dev/sdb1       106G   63M  100G   1% /export
  1. diskの確認
  2. パーティションの設定
  3. n で新しいパーティション作成
  4. p でプライマリパーティション作成
  5. パーティション番号を Enter で規定値の 1
  6. 先頭セクタを Enter で規定値の 2048
  7. 終了セクタを Enter で規定値の 209715199 (全領域)
  8. p でパーティション設定確認
  9. w でパーティション書き込み
  10. ext4の既定値でフォーマット
  11. マウントポイント作成
  12. マウント
  13. 容量確認
  14. アンマウント
  15. /etc/fatab を設定
  16. fstab を使ってマウント
  17. マウント確認

後は普通に使えるはずです.

ということでarm64 4core, 24GB RAN, Disk 150GBな無料VPSができました.amd64のインスタンスを削除すればDisk 200GBにもできるはずです.
これが無料で使えるのすごいですね.(いつ使えなくなってもおかしくはないだろうけど)

]]>
https://matoken.org/blog/2022/06/28/add-block-storage-to-oracle-cloud-vps/feed/ 0
argosをGnome42(Ubuntu 22.04)でも使う https://matoken.org/blog/2022/05/21/use-argos-with-gnome42-ubuntu-22-04/ https://matoken.org/blog/2022/05/21/use-argos-with-gnome42-ubuntu-22-04/#respond Sat, 21 May 2022 13:58:36 +0000 http://matoken.org/blog/?p=3640

久々にGnome Shellを起動したところ拡張機能のargosが起動しなくなっていました.

argos gnome42 ng

リポジトリを見るとGnome42対応をしている人がいたので,以下のリポジトリの gnome-42 ブランチを利用させてもらうことで動くようになりました :)

$ trash ~/.local/share/gnome-shell/extensions/argos\@pew.worldwidemann.com (1)
$ git clone https://github.com/Coda-Coda/argos (2)
$ cd argos
$ git branch (3)
* gnome-42
$ cp -a argos\@pew.worldwidemann.com ~/.local/share/gnome-shell/extensions/ (4)
  1. 古いargosをゴミ箱に
  2. Gnome42対応argosのリポジトリをクローン
  3. ブランチが gnome-42 になっているのを確認
  4. argos をGnomeShell拡張機能ディレクトリにコピー

このあと, Alt + F2 r Enter で反映します.

argos gnome42

動作するようになりました :)

詳細は以前の記事を.

環境
$ dpkg-query -W gnome-shell gnome-shell-extensions
gnome-shell     42.0-2ubuntu1
gnome-shell-extensions  42.0-1
$ lsb_release -dr
Description:    Ubuntu 22.04 LTS
Release:        22.04
$ arch
x86_64
]]>
https://matoken.org/blog/2022/05/21/use-argos-with-gnome42-ubuntu-22-04/feed/ 0
Ubuntu 21.10 -> 22.04のアップグレードに失敗 https://matoken.org/blog/2022/04/14/ubuntu-21-10-22-04-upgrade-failed/ https://matoken.org/blog/2022/04/14/ubuntu-21-10-22-04-upgrade-failed/#respond Wed, 13 Apr 2022 22:29:33 +0000 http://matoken.org/blog/?p=3600

Ubuntu 21.10 amd64 から 22.04(development branch) へのアップグレード時に以下のようなエラーで失敗してしまいました.

unable to open '/usr/share/themes/Yaru/gnome-shell/calendar-today-light.svg.dpkg-new': No such file or directory

Preparing to unpack .../yaru-theme-gnome-shell_22.04.3.1_all.deb ...
Unpacking yaru-theme-gnome-shell (22.04.3.1) over (21.10.2) ...
dpkg: error processing archive /var/cache/apt/archives/yaru-theme-gnome-shell_22.04.3.1_all.deb (--unpack):
 unable to open '/usr/share/themes/Yaru/gnome-shell/calendar-today-light.svg.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
       Errors were encountered while processing:
 /var/cache/apt/archives/yaru-theme-gnome-shell_22.04.3.1_all.deb
.../yaru-theme-gnome-shell_22.04.3.1_all.deb を転換する準備をしています ...
yaru-theme-gnome-shell (22.04.3.1) で (21.10.2 に) 上書き展開しています ...
dpkg: アーカイブ /var/cache/apt/archives/yaru-theme-gnome-shell_22.04.3.1_all.deb の処理中にエラーが発生しました (--install):
 '/usr/share/themes/Yaru/gnome-shell/calendar-today-light.svg.dpkg-new' をオープンできません: そのようなファイルやディレクトリはありません
処理中にエラーが発生しました:
/var/cache/apt/archives/yaru-theme-gnome-shell_22.04.3.1_all.deb

エラーメッセージで検索すると以下のBugが見つかりました.

とりあえず添付された.debをダウンロードしてdpkgで導入すれば良さそうです.

$ wget https://bugs.launchpad.net/ubuntu/+source/yaru-theme/+bug/1968405/+attachment/5580229/+files/yaru-theme-gnome-shell_22.04.3.1+git2ff06a41_all.deb
$ sudo dpkg -i ./yaru-theme-gnome-shell_22.04.3.1+git2ff06a41_all.deb
$ sudo apt --fix-broken install
  :
$ sudo apt dist-upgrade
  :

若しくは少し待ってリポジトリに反映されるのを待ちましょう.

環境
$ lsb_release -dr
Description:    Ubuntu 21.10
Release:        21.10
$ arch
x86_64
]]>
https://matoken.org/blog/2022/04/14/ubuntu-21-10-22-04-upgrade-failed/feed/ 0