How to expand the storage memory on the Yún

leafarhz:
After I formatted the SD card, I put it back on the Arduino YUN and kept on going with the following steps.

mkdir -p /mnt/sda1
mount /dev/sda1 /mnt/sda1
mkdir -p /mnt/sda1/arduino/www
mkdir -p /mnt/sda2
mount /dev/sda2 /mnt/sda2
rsync -a --exclude=/mnt/ --exclude=/www/sd /overlay/ /mnt/sda2/
umount /dev/sda1
umount /dev/sda2
uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled_fsck=0
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit

I just used your steps to expand an Arduino Dragino Yun Shield, and they worked, but the first time I tried them they didn't. Not exactly sure, but I suspected maybe I had to disable the already mounted overlay device (which in my case was /dev/mtdblock3). So before entering your uci commands, I did:

uci add fstab mount
uci set fstab.@mount[0].device=/dev/mtdblock3
uci set fstab.@mount[0].enabled=0
uci commit

As I said, not really sure this was an issue, but the second time I tried this and it worked.

Otherwise, your solution worked fine, thanks!