目次

画像録画サーバを作る

録画機能のあるカメラを使って画像録画サーバを作ってみましょう。

準備するもの

今回は、大量の画像を保存できるようにSSDを搭載した「FutureNet MA-E320M」使用します。
カメラは、SAMSUNG製SND-L6083Rを使います。
その他、カメラ用にPoEハブ等やネットワークケーブル等ご準備ください。

MA-E320Mを録画サーバにする

MA-E320M に SSD を認識させる

fdisk を使って SSD にパーティションを作成します。

root@plum:~# fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 512.1 GB, 512110190592 bytes
255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5dcda687

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-1000215215, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-1000215215, default 1000215215):
Using default value 1000215215

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83
Changed system type of partition 1 to 83 (Linux)

Command (m for help): p

Disk /dev/sda: 512.1 GB, 512110190592 bytes
255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5dcda687

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1000215215   500106584   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
root@plum:~# 

mkfs.ext4 を使用し ext4 でフォーマットします。

root@plum:~# fsck.ext4 /dev/sda1
e2fsck 1.42.9 (4-Feb-2014)
/dev/sda1: clean, 11/31260672 files, 2012648/125026646 blocks

mount を使用し /mnt/rw にマウントします。

root@plum:~# df
Filesystem      1K-blocks  Used Available Use% Mounted on
rootfs             253704   252    253452   1% /
udev               244332     4    244328   1% /dev
tmpfs               50744   168     50576   1% /run
/dev/mtdblock8      61184 61184         0 100% /ro
overlay-tmpfs      253704 13796    239908   6% /rw.tmpfs
overlay-persist    253704   252    253452   1% /rw
/dev/loop0           1792  1792         0 100% /ro/lib/modules
/dev/loop1          11264 11264         0 100% /ro/usr/lib/jvm
ubi0:overlay        40292   100     38136   1% /rw.tmpfs/.overlay
overlay            253704   252    253452   1% /
overlay.log        253704 13796    239908   6% /var/log
overlay.kmod       253704   252    253452   1% /lib/modules
overlay.jvm        253704   252    253452   1% /usr/lib/jvm
none                    4     0         4   0% /sys/fs/cgroup
none                 5120     0      5120   0% /run/lock
none               253704     0    253704   0% /run/shm
none               102400     0    102400   0% /run/user
root@plum:~# mount -t ext4 -o defaults /dev/sda1 /mnt/rw
root@plum:~# df
Filesystem      1K-blocks  Used Available Use% Mounted on
rootfs             253704   252    253452   1% /
udev               244332     4    244328   1% /dev
tmpfs               50744   168     50576   1% /run
/dev/mtdblock8      61184 61184         0 100% /ro
overlay-tmpfs      253704 13868    239836   6% /rw.tmpfs
overlay-persist    253704   252    253452   1% /rw
/dev/loop0           1792  1792         0 100% /ro/lib/modules
/dev/loop1          11264 11264         0 100% /ro/usr/lib/jvm
ubi0:overlay        40292   108     38124   1% /rw.tmpfs/.overlay
overlay            253704   252    253452   1% /
overlay.log        253704 13868    239836   6% /var/log
overlay.kmod       253704   252    253452   1% /lib/modules
overlay.jvm        253704   252    253452   1% /usr/lib/jvm
none                    4     0         4   0% /sys/fs/cgroup
none                 5120     0      5120   0% /run/lock
none               253704     0    253704   0% /run/shm
none               102400     0    102400   0% /run/user
/dev/sda1       492127584 71592 467034280   1% /mnt/rw
root@plum:~# 

/etc/udev/rules.d/10-mae3xx.rules に下記の行を追加し起動時に自動的にマウントするようにします。

# SSD
SUBSYSTEMS=="block", KERNEL=="sda1",RUN+="/bin/mount /dev/%k /mnt/rw"

samba をインストールする

apt-get update と apt-get upgrade を実行する。

root@plum:~# apt-get update && apt-get upgrade
Ign http://ports.ubuntu.com trusty InRelease
Get:1 http://ports.ubuntu.com trusty-updates InRelease [64.4 kB]
Get:2 http://ppa.launchpad.net trusty InRelease [15.5 kB]
Get:3 http://ppa.launchpad.net trusty/main armhf Packages [874 B]
Get:4 http://ports.ubuntu.com trusty-security InRelease [64.4 kB]
Get:5 http://ppa.launchpad.net trusty/main Translation-en [1314 B]
Get:6 http://ports.ubuntu.com trusty Release.gpg [933 B]
Get:7 http://ports.ubuntu.com trusty-updates/main armhf Packages [601 kB]
Get:8 http://ports.ubuntu.com trusty-updates/restricted armhf Packages [8421 B]
Get:9 http://ports.ubuntu.com trusty-updates/universe armhf Packages [328 kB]
Get:10 http://ports.ubuntu.com trusty-updates/main Translation-en [342 kB]
Get:11 http://ports.ubuntu.com trusty-updates/restricted Translation-en [3699 B]
Get:12 http://ports.ubuntu.com trusty-updates/universe Translation-en [175 kB]
Get:13 http://ports.ubuntu.com trusty-security/main armhf Packages [362 kB]
Get:14 http://ports.ubuntu.com trusty-security/restricted armhf Packages [8421 B]
Get:15 http://ports.ubuntu.com trusty-security/universe armhf Packages [121 kB]
Get:16 http://ports.ubuntu.com trusty-security/main Translation-en [220 kB]
Get:17 http://ports.ubuntu.com trusty-security/restricted Translation-en [3206 B]
Get:18 http://ports.ubuntu.com trusty-security/universe Translation-en [71.6 kB]
Get:19 http://ports.ubuntu.com trusty Release [58.5 kB]
Get:20 http://ports.ubuntu.com trusty/main armhf Packages [1295 kB]
Get:21 http://ports.ubuntu.com trusty/restricted armhf Packages [14 B]
Get:22 http://ports.ubuntu.com trusty/universe armhf Packages [5710 kB]
Get:23 http://ports.ubuntu.com trusty/main Translation-en [762 kB]
Get:24 http://ports.ubuntu.com trusty/restricted Translation-en [3457 B]
Get:25 http://ports.ubuntu.com trusty/universe Translation-en [4089 kB]
Fetched 14.3 MB in 3min 33s (67.0 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libmodbus5
Use 'apt-get autoremove' to remove it.
The following packages have been kept back:
  ddclient initramfs-tools initramfs-tools-bin nfs-common
The following packages will be upgraded:
  coreutils libgnutls-openssl27 libgnutls26 libpng12-0 libxml2 ntp
  python-apt-common python3-apt unattended-upgrades
9 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 2504 kB of archives.
After this operation, 8192 B disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main coreutils armhf 8.21-1ubuntu5.3 [999 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libgnutls-openssl27 armhf 2.12.23-12ubuntu2.4 [15.0 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libgnutls26 armhf 2.12.23-12ubuntu2.4 [359 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libpng12-0 armhf 1.2.50-1ubuntu2.14.04.2 [108 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libxml2 armhf 2.9.1+dfsg1-3ubuntu4.6 [483 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main ntp armhf 1:4.2.6.p5+dfsg-3ubuntu2.14.04.6 [372 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main python-apt-common all 0.9.3.5ubuntu2 [16.6 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main python3-apt armhf 0.9.3.5ubuntu2 [126 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main unattended-upgrades all 0.82.1ubuntu2.4 [25.9 kB]
Fetched 2504 kB in 34s (71.7 kB/s)
Preconfiguring packages ...
(Reading database ... 20851 files and directories currently installed.)
Preparing to unpack .../coreutils_8.21-1ubuntu5.3_armhf.deb ...
Unpacking coreutils (8.21-1ubuntu5.3) over (8.21-1ubuntu5.1) ...
Setting up coreutils (8.21-1ubuntu5.3) ...
(Reading database ... 20851 files and directories currently installed.)
Preparing to unpack .../libgnutls-openssl27_2.12.23-12ubuntu2.4_armhf.deb ...
Unpacking libgnutls-openssl27:armhf (2.12.23-12ubuntu2.4) over (2.12.23-12ubuntu2.3) ...
Preparing to unpack .../libgnutls26_2.12.23-12ubuntu2.4_armhf.deb ...
Unpacking libgnutls26:armhf (2.12.23-12ubuntu2.4) over (2.12.23-12ubuntu2.3) ...
Preparing to unpack .../libpng12-0_1.2.50-1ubuntu2.14.04.2_armhf.deb ...
Unpacking libpng12-0:armhf (1.2.50-1ubuntu2.14.04.2) over (1.2.50-1ubuntu2.14.04.1) ...
Preparing to unpack .../libxml2_2.9.1+dfsg1-3ubuntu4.6_armhf.deb ...
Unpacking libxml2:armhf (2.9.1+dfsg1-3ubuntu4.6) over (2.9.1+dfsg1-3ubuntu4.5) ...
Preparing to unpack .../ntp_1%3a4.2.6.p5+dfsg-3ubuntu2.14.04.6_armhf.deb ...
 * Stopping NTP server ntpd                                              [ OK ]
Unpacking ntp (1:4.2.6.p5+dfsg-3ubuntu2.14.04.6) over (1:4.2.6.p5+dfsg-3ubuntu2.14.04.5) ...
Preparing to unpack .../python-apt-common_0.9.3.5ubuntu2_all.deb ...
Unpacking python-apt-common (0.9.3.5ubuntu2) over (0.9.3.5ubuntu1) ...
Preparing to unpack .../python3-apt_0.9.3.5ubuntu2_armhf.deb ...
Unpacking python3-apt (0.9.3.5ubuntu2) over (0.9.3.5ubuntu1) ...
Preparing to unpack .../unattended-upgrades_0.82.1ubuntu2.4_all.deb ...
Unpacking unattended-upgrades (0.82.1ubuntu2.4) over (0.82.1ubuntu2.3) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libgnutls26:armhf (2.12.23-12ubuntu2.4) ...
Setting up libgnutls-openssl27:armhf (2.12.23-12ubuntu2.4) ...
Setting up libpng12-0:armhf (1.2.50-1ubuntu2.14.04.2) ...
Setting up libxml2:armhf (2.9.1+dfsg1-3ubuntu4.6) ...
Setting up ntp (1:4.2.6.p5+dfsg-3ubuntu2.14.04.6) ...
Setting up python-apt-common (0.9.3.5ubuntu2) ...
Setting up python3-apt (0.9.3.5ubuntu2) ...
Setting up unattended-upgrades (0.82.1ubuntu2.4) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB

Total disk space freed by localepurge: 0 KiB

apt-get を使用し samba をインストールする。

root@plum:~# apt-get install -y samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libmodbus5
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2
  libfile-copy-recursive-perl libgmp10 libhdb9-heimdal libkdc2-heimdal libldb1
  libntdb1 libpython2.7 libtalloc2 libtdb1 libtevent0 libwbclient0
  python-crypto python-dnspython python-ldb python-ntdb python-samba
  python-talloc python-tdb samba-common samba-common-bin samba-dsdb-modules
  samba-libs tdb-tools update-inetd
Suggested packages:
  cups-common python-crypto-dbg python-crypto-doc bind9 bind9utils ldb-tools
  smbldap-tools winbind ufw heimdal-clients
Recommended packages:
  attr samba-vfs-modules
The following NEW packages will be installed:
  libavahi-client3 libavahi-common-data libavahi-common3 libcups2
  libfile-copy-recursive-perl libgmp10 libhdb9-heimdal libkdc2-heimdal libldb1
  libntdb1 libpython2.7 libtalloc2 libtdb1 libtevent0 libwbclient0
  python-crypto python-dnspython python-ldb python-ntdb python-samba
  python-talloc python-tdb samba samba-common samba-common-bin
  samba-dsdb-modules samba-libs tdb-tools update-inetd
0 upgraded, 29 newly installed, 0 to remove and 4 not upgraded.
Need to get 7963 kB of archives.
After this operation, 38.2 MB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libavahi-common-data armhf 0.6.31-4ubuntu1 [21.0 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libavahi-common3 armhf 0.6.31-4ubuntu1 [19.7 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libavahi-client3 armhf 0.6.31-4ubuntu1 [21.9 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libcups2 armhf 1.7.2-0ubuntu1.6 [153 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libgmp10 armhf 2:5.1.3+dfsg-1ubuntu1 [187 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libhdb9-heimdal armhf 1.6~git20131207+dfsg-1ubuntu1.1 [48.1 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libtalloc2 armhf 2.1.0-1 [21.6 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libtdb1 armhf 1.2.12-1 [31.8 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libtevent0 armhf 0.9.19-1 [22.3 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libldb1 armhf 1:1.1.16-1 [107 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libntdb1 armhf 1.0-2ubuntu1 [39.3 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libpython2.7 armhf 2.7.6-8ubuntu0.2 [901 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libwbclient0 armhf 2:4.1.6+dfsg-1ubuntu2.14.04.9 [24.8 kB]
Get:14 http://ports.ubuntu.com/ubuntu-ports/ trusty/main python-ldb armhf 1:1.1.16-1 [27.3 kB]
Get:15 http://ports.ubuntu.com/ubuntu-ports/ trusty/main python-talloc armhf 2.1.0-1 [7702 B]
Get:16 http://ports.ubuntu.com/ubuntu-ports/ trusty/main python-dnspython all 1.11.1-1build1 [83.1 kB]
Get:17 http://ports.ubuntu.com/ubuntu-ports/ trusty/main python-ntdb armhf 1.0-2ubuntu1 [7768 B]
Get:18 http://ports.ubuntu.com/ubuntu-ports/ trusty/main python-tdb armhf 1.2.12-1 [9812 B]
Get:19 http://ports.ubuntu.com/ubuntu-ports/ trusty/main python-crypto armhf 2.6.1-4build1 [232 kB]
Get:20 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main samba-libs armhf 2:4.1.6+dfsg-1ubuntu2.14.04.9 [3557 kB]
Get:21 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main python-samba armhf 2:4.1.6+dfsg-1ubuntu2.14.04.9 [734 kB]
Get:22 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main samba-common all 2:4.1.6+dfsg-1ubuntu2.14.04.9 [157 kB]
Get:23 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main samba-common-bin armhf 2:4.1.6+dfsg-1ubuntu2.14.04.9 [455 kB]
Get:24 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main samba-dsdb-modules armhf 2:4.1.6+dfsg-1ubuntu2.14.04.9 [196 kB]
Get:25 http://ports.ubuntu.com/ubuntu-ports/ trusty/main tdb-tools armhf 1.2.12-1 [21.9 kB]
Get:26 http://ports.ubuntu.com/ubuntu-ports/ trusty/main libfile-copy-recursive-perl all 0.38-1 [20.6 kB]
Get:27 http://ports.ubuntu.com/ubuntu-ports/ trusty/main update-inetd all 4.43 [19.2 kB]
Get:28 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main libkdc2-heimdal armhf 1.6~git20131207+dfsg-1ubuntu1.1 [47.1 kB]
Get:29 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main samba armhf 2:4.1.6+dfsg-1ubuntu2.14.04.9 [790 kB]
Fetched 7963 kB in 32s (245 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libavahi-common-data:armhf.
(Reading database ... 20832 files and directories currently installed.)
Preparing to unpack .../libavahi-common-data_0.6.31-4ubuntu1_armhf.deb ...
Unpacking libavahi-common-data:armhf (0.6.31-4ubuntu1) ...
Selecting previously unselected package libavahi-common3:armhf.
Preparing to unpack .../libavahi-common3_0.6.31-4ubuntu1_armhf.deb ...
Unpacking libavahi-common3:armhf (0.6.31-4ubuntu1) ...
Selecting previously unselected package libavahi-client3:armhf.
Preparing to unpack .../libavahi-client3_0.6.31-4ubuntu1_armhf.deb ...
Unpacking libavahi-client3:armhf (0.6.31-4ubuntu1) ...
Selecting previously unselected package libcups2:armhf.
Preparing to unpack .../libcups2_1.7.2-0ubuntu1.6_armhf.deb ...
Unpacking libcups2:armhf (1.7.2-0ubuntu1.6) ...
Selecting previously unselected package libgmp10:armhf.
Preparing to unpack .../libgmp10_2%3a5.1.3+dfsg-1ubuntu1_armhf.deb ...
Unpacking libgmp10:armhf (2:5.1.3+dfsg-1ubuntu1) ...
Selecting previously unselected package libhdb9-heimdal:armhf.
Preparing to unpack .../libhdb9-heimdal_1.6~git20131207+dfsg-1ubuntu1.1_armhf.deb ...
Unpacking libhdb9-heimdal:armhf (1.6~git20131207+dfsg-1ubuntu1.1) ...
Selecting previously unselected package libtalloc2:armhf.
Preparing to unpack .../libtalloc2_2.1.0-1_armhf.deb ...
Unpacking libtalloc2:armhf (2.1.0-1) ...
Selecting previously unselected package libtdb1:armhf.
Preparing to unpack .../libtdb1_1.2.12-1_armhf.deb ...
Unpacking libtdb1:armhf (1.2.12-1) ...
Selecting previously unselected package libtevent0:armhf.
Preparing to unpack .../libtevent0_0.9.19-1_armhf.deb ...
Unpacking libtevent0:armhf (0.9.19-1) ...
Selecting previously unselected package libldb1:armhf.
Preparing to unpack .../libldb1_1%3a1.1.16-1_armhf.deb ...
Unpacking libldb1:armhf (1:1.1.16-1) ...
Selecting previously unselected package libntdb1:armhf.
Preparing to unpack .../libntdb1_1.0-2ubuntu1_armhf.deb ...
Unpacking libntdb1:armhf (1.0-2ubuntu1) ...
Selecting previously unselected package libpython2.7:armhf.
Preparing to unpack .../libpython2.7_2.7.6-8ubuntu0.2_armhf.deb ...
Unpacking libpython2.7:armhf (2.7.6-8ubuntu0.2) ...
Selecting previously unselected package libwbclient0:armhf.
Preparing to unpack .../libwbclient0_2%3a4.1.6+dfsg-1ubuntu2.14.04.9_armhf.deb ...
Unpacking libwbclient0:armhf (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Selecting previously unselected package python-ldb.
Preparing to unpack .../python-ldb_1%3a1.1.16-1_armhf.deb ...
Unpacking python-ldb (1:1.1.16-1) ...
Selecting previously unselected package python-talloc.
Preparing to unpack .../python-talloc_2.1.0-1_armhf.deb ...
Unpacking python-talloc (2.1.0-1) ...
Selecting previously unselected package python-dnspython.
Preparing to unpack .../python-dnspython_1.11.1-1build1_all.deb ...
Unpacking python-dnspython (1.11.1-1build1) ...
Selecting previously unselected package python-ntdb.
Preparing to unpack .../python-ntdb_1.0-2ubuntu1_armhf.deb ...
Unpacking python-ntdb (1.0-2ubuntu1) ...
Selecting previously unselected package python-tdb.
Preparing to unpack .../python-tdb_1.2.12-1_armhf.deb ...
Unpacking python-tdb (1.2.12-1) ...
Selecting previously unselected package python-crypto.
Preparing to unpack .../python-crypto_2.6.1-4build1_armhf.deb ...
Unpacking python-crypto (2.6.1-4build1) ...
Selecting previously unselected package samba-libs:armhf.
Preparing to unpack .../samba-libs_2%3a4.1.6+dfsg-1ubuntu2.14.04.9_armhf.deb ...
Unpacking samba-libs:armhf (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Selecting previously unselected package python-samba.
Preparing to unpack .../python-samba_2%3a4.1.6+dfsg-1ubuntu2.14.04.9_armhf.deb ...
Unpacking python-samba (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Selecting previously unselected package samba-common.
Preparing to unpack .../samba-common_2%3a4.1.6+dfsg-1ubuntu2.14.04.9_all.deb ...
Unpacking samba-common (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../samba-common-bin_2%3a4.1.6+dfsg-1ubuntu2.14.04.9_armhf.deb ...
Unpacking samba-common-bin (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Selecting previously unselected package samba-dsdb-modules.
Preparing to unpack .../samba-dsdb-modules_2%3a4.1.6+dfsg-1ubuntu2.14.04.9_armhf.deb ...
Unpacking samba-dsdb-modules (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Selecting previously unselected package tdb-tools.
Preparing to unpack .../tdb-tools_1.2.12-1_armhf.deb ...
Unpacking tdb-tools (1.2.12-1) ...
Selecting previously unselected package libfile-copy-recursive-perl.
Preparing to unpack .../libfile-copy-recursive-perl_0.38-1_all.deb ...
Unpacking libfile-copy-recursive-perl (0.38-1) ...
Selecting previously unselected package update-inetd.
Preparing to unpack .../update-inetd_4.43_all.deb ...
Unpacking update-inetd (4.43) ...
Selecting previously unselected package libkdc2-heimdal:armhf.
Preparing to unpack .../libkdc2-heimdal_1.6~git20131207+dfsg-1ubuntu1.1_armhf.deb ...
Unpacking libkdc2-heimdal:armhf (1.6~git20131207+dfsg-1ubuntu1.1) ...
Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.1.6+dfsg-1ubuntu2.14.04.9_armhf.deb ...
Unpacking samba (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libavahi-common-data:armhf (0.6.31-4ubuntu1) ...
Setting up libavahi-common3:armhf (0.6.31-4ubuntu1) ...
Setting up libavahi-client3:armhf (0.6.31-4ubuntu1) ...
Setting up libcups2:armhf (1.7.2-0ubuntu1.6) ...
Setting up libgmp10:armhf (2:5.1.3+dfsg-1ubuntu1) ...
Setting up libhdb9-heimdal:armhf (1.6~git20131207+dfsg-1ubuntu1.1) ...
Setting up libtalloc2:armhf (2.1.0-1) ...
Setting up libtdb1:armhf (1.2.12-1) ...
Setting up libtevent0:armhf (0.9.19-1) ...
Setting up libldb1:armhf (1:1.1.16-1) ...
Setting up libntdb1:armhf (1.0-2ubuntu1) ...
Setting up libpython2.7:armhf (2.7.6-8ubuntu0.2) ...
Setting up libwbclient0:armhf (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Setting up python-ldb (1:1.1.16-1) ...
Setting up python-talloc (2.1.0-1) ...
Setting up python-dnspython (1.11.1-1build1) ...
Setting up python-ntdb (1.0-2ubuntu1) ...
Setting up python-tdb (1.2.12-1) ...
Setting up python-crypto (2.6.1-4build1) ...
Setting up samba-libs:armhf (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Setting up python-samba (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Setting up samba-common (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...

Creating config file /etc/samba/smb.conf with new version
Setting up samba-common-bin (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Setting up samba-dsdb-modules (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Setting up tdb-tools (1.2.12-1) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man8/tdbbackup.8.gz because associated file /usr/share/man/man8/tdbbackup.tdbtools.8.gz (of link group tdbbackup) doesn't exist
Setting up libfile-copy-recursive-perl (0.38-1) ...
Setting up update-inetd (4.43) ...
Setting up libkdc2-heimdal:armhf (1.6~git20131207+dfsg-1ubuntu1.1) ...
Setting up samba (2:4.1.6+dfsg-1ubuntu2.14.04.9) ...
Adding group `sambashare' (GID 113) ...
Done.
smbd start/running, process 4310
nmbd start/running, process 4349
samba-ad-dc start/running, process 4391
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for ureadahead (0.100.0-16) ...
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB

Total disk space freed by localepurge: 0 KiB

root@plum:~#

SSD 上 (/mnt/rw) に共有ディレクトリを作成しておく。

root@plum:~# mkdir /mnt/rw/share
root@plum:~# chmod 777 /mnt/rw/share

共有サーバとして使えるように/etc/samba/smb.conf を編集する。 下記内容をsmb.confの[global]の下と末尾に加える。

[global]の下

   security = user

末尾

[Share]
   path = /mnt/rw/share
   valid users = user1
   writable = yes
   share modes = yes
   guest ok = yes
   guest only = yes
root@plum:~# smbpasswd -a user1
New SMB password:
Retype new SMB password:
Added user user1.
root@plum:~# smbpasswd -e user1
Enabled user user1.

設定ファイルを更新後は samba を再起動する。

root@plum:~# initctl restart smbd
smbd start/running, process 4506

カメラの画像を録画サーバに保存するようにする

カメラ(SND-L6083R) の設定をする

添付されてくるツールを使いアドレスを設定する。
SND-L6083R-01

カメラの WebUI にアクセスしSetup > event > ストレージ > NAS 接続設定を選択する。
IPアドレスには MA-E320M のアドレスを設定する。
SND-L6083R-02