2015/10/15 (木)

OpenBlocks AX3 の SSD 搭載モデルを手に入れて、遊んでみる。

2015-10-15:OpenBlocks AX3 with SSD

OpenBlocks AX3 に 16G の SSD を搭載したのを入手。
ruby 環境を rbenv で入れようとして、いきなりはまった。/tmp の容量不足!
SSD 搭載の場合、/etc とか /usr とかもろもろは /dev/sda1 な SSD を ext4 フォーマットで /.rw とマウントされたとこの下に aufs でマウントされているんだけど、それでも /tmp は本体 RAM 上なのね。

$ mount
/dev/root on / type ext2 (rw,relatime,errors=continue,user_xattr,acl)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=103444k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=10240k,mode=755)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=206880k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda1 on /.rw type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered,discard)
aufs on /etc type aufs (rw,relatime,si=8baef055)
aufs on /bin type aufs (rw,relatime,si=88e78055)
aufs on /home type aufs (rw,relatime,si=976ea055)
aufs on /lib type aufs (rw,relatime,si=82ec9855)
aufs on /sbin type aufs (rw,relatime,si=b8e83855)
aufs on /usr type aufs (rw,relatime,si=82ec9055)
aufs on /var type aufs (rw,relatime,si=b8e83055)
aufs on /root type aufs (rw,relatime,si=86e5a855)
aufs on /opt type aufs (rw,relatime,si=86e5a055)
aufs on /srv type aufs (rw,relatime,si=82ebd855)
aufs on /media type aufs (rw,relatime,si=82ebd055)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)

ここらのマウントは /etc/init.d/openblocks-setup の中でやっているみたいで、

        # if using DEBIAN storage, /tmp directory mount under storage.
        #if [ -n "$rwdev" ] ; then
        #        UNIONFS_DIRS="$UNIONFS_DIRS tmp"
        #fi

という部分があったので、この下三行のコメントを外して再起動。。。してみたが、うまくいかない。残念。
いいや、手動でやっちゃえ、と

mount -n -t aufs -o xino=/.aufs.xino.tmp,dirs=/.rw:/tmp=ro aufs /tmp

を実行。これで /tmp が SSD 上になった。

で、rbenv install 2.2.1 みたいにビルドができるようになったけど、、、さすがに1時間コースだな。けっこう重い。^^;
ちなみに、ruby 環境を作った後、rails 入れて、Gemfile 書いて bundle install しようとしたら、therubyracer でこける。
ググッたら github の作者のとこにスレを発見。

unable to build therubyracer/libv8 on arm A10 #255
https://github.com/cowboyd/therubyracer/issues/255

ここの2013年8月24日の投稿のやり方で therubyracer のインストールに自分も成功。
事前に sudo gem uninstall libv8 しておいて、git clone してから、の手順。

bundle install で必要な gem が一通り入り、手製の rails アプリが動くことまで確認。
ちょっと重いけど、使えなくはなさそうだ。

comment