Raspberry Pi で Linkstation を自動マウントする

以前 Raspberry Pi で Linkstation を自動マウントする方法について書いた(旧ブログ)。

Raspberry Pi で Linkstation を自動マウントする – with a Christian Wife
https://blog.withachristianwife.com/2018/01/25/auto-mount-linkstation-with-raspberry-pi/

しかし、最近 Raspbian Stretch で再度同じことをしようとすると、なぜかマウントができなくなった。マウントしようとすると "mount error: cifs filesystem not supported by the system" や "mount error(112): Host is down" と表示されたりする。

参考:
Raspberry Pi で IP カメラ – with a Christian Wife
https://blog.withachristianwife.com/2019/09/02/ip-camera-with-raspberry-pi/

これを解決する方法がわかった。

まず、最初に出てくる "mount error: cifs filesystem not supported by the system" は Raspberry Pi を再起動することで解決する。

次の "mount error(112): Host is down" というエラーは、Buffalo の Linkstation が古すぎて新しい OS(Raspbian Stretch)に対応していないことが原因のようだ。以下の方法でエラーを回避できる。

基本的に冒頭の自動マウントの方法と同じだが、そのうちマウントのコマンドを以下のように変える。

$ sudo mount -t cifs -o vers=1.0,password=password //192.168.1.XX/share /mnt/nas -o iocharset=utf8

つまりオプションで vers=1.0 のようにバージョンを指定すればいい。ついでに Linkstation のパスワード("password")も記入することで、次に来るパスワードを聞かれる対話を省略できる。

また、自動マウントのために /etc/fstab に記述する内容もバージョンを記入する。先ほどと違って -o は書かないので注意。

//192.168.1.XX/share /mnt/nas cifs vers=1.0,username=[username],password=[password],iocharset=utf8,rw,uid=1000,gid=1000,defaults 0 0

これでリブート後も自動マウントするようになった。

参考:
mount error: cifs filesystem not supported by the system - 天炉48町
https://x.momo86.net/?p=41

mount.cifsでmount error(112) - Palm84 某所の日記
https://diary.palm84.com/entry/20190308/1551989248

この記事が気に入ったらサポートをしてみませんか?