apt-get installでSamba、hfsplus、hfsutils、hfsprogs、lighted、nanoを入れた。
~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/root 705M 625M 30M 96% / devtmpfs 237M 0 237M 0% /dev tmpfs 242M 0 242M 0% /dev/shm tmpfs 242M 6.3M 235M 3% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 242M 0 242M 0% /sys/fs/cgroup /dev/mmcblk0p1 61M 20M 42M 32% /boot /dev/sda2 466G 93G 373G 20% /mnt/hdd1
/rootの残りが怪しくなってきたが、そもそも705Mしか確保されてないようなのでパーティションを拡張して2GBいっぱいまで使うことにする。
~$ sudo fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.25.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/mmcblk0: 1.9 GiB, 2040528896 bytes, 3985408 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: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 16 125055 125040 61.1M b W95 FAT32 /dev/mmcblk0p2 125056 1626112 1501057 733M 83 Linux
というふうに2番めのパーティションが733Mとなっており、かなり未使用領域が残っている。そこで
~$ sudo fdisk /dev/mmcblk0
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 (container for logical partitions) Select (default p): p Partition number (2-4, default 2): 2 First sector (125056-3985407, default 126976): 125056 Last sector, +sectors or +size{K,M,G,T,P} (125056-3985407, default 3985407): 3985407 Created a new partition 2 of type 'Linux' and of size 1.9 GiB. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: 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).
一旦再起動して
~$ sudo resize2fs /dev/mmcblk0p2
resize2fs 1.42.12 (29-Aug-2014) Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 The filesystem on /dev/mmcblk0p2 is now 482544 (4k) blocks long.
これで
~$ df -h
Filesystem Size Used Avail Use% Mounted on /dev/root 1.8G 625M 1.1G 36% / devtmpfs 237M 0 237M 0% /dev tmpfs 242M 0 242M 0% /dev/shm tmpfs 242M 4.5M 237M 2% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 242M 0 242M 0% /sys/fs/cgroup /dev/mmcblk0p1 61M 20M 42M 32% /boot /dev/sda2 466G 93G 373G 20% /mnt/hdd1
あと1.1GB使えるようになった。まあ、あんまり入れて重くしちゃっては意味が無いのでGUI関係は入れない方向で。