File-Sharing

Home Cloud

Banana Pi - Home Cloud (Part - 2) #


Refresh MiniDLNA #

MiniDLNA couldn’t find any new files in my media_dir even though I was adding new files. I think the problem was that my media_dir was set to an external hard drive.

(media_dir=v,/media/ExtHD/x/x). I got it working, here are the steps I used to fix.

sudo service minidlna stop sudo rm -rf /var/cache/minidlna/* sudo nano /etc/minidlna.conf

Home Cloud

Banana Pi - Home Cloud #


SSH #

(Enable SSH)

$ sudo apt-get install openssh-server

$ sudo nano /etc/rc.local
/etc/init.d ssh
exit 0

Resize #

(Card on a ubuntu box)

$ sudo fdisk -l
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 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
Disklabel type: dos
Disk identifier: 0x59d0bd13

Device         Boot     Start       End  Blocks  Id System
/dev/mmcblk0p1           2048    104447   51200  83 Linux
/dev/mmcblk0p2         104448  15523839 7709696  83 Linux

Disk /dev/sda: 7.5 GiB, 7998537728 bytes, 15622144 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
Disklabel type: dos
Disk identifier: 0x59d0bd13

Device    Boot     Start       End  Blocks  Id System
/dev/sda1           2048    104447   51200  83 Linux
/dev/sda2         104448   7167999 3531776  83 Linux

umount /dev/sda2

[bananapi@lemaker ~]$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.24.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n

Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (2-4, default 2): 2
First sector (104448-15622143, default 104448): 335872
Last sector, +sectors or +size{K,M,G,T,P} (104448-15622143, default 15622143): 

Created a new partition 2 of type 'Linux' and of size 7.4 GiB.

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

pi@bananapi:~$ sudo resize2fs /dev/mmcblk0p2

SAMBA #

(For accessing SSD from Windows PC inside home network on DLNA)