Page 1 of 2

[Solved] Using extra space of SD card

PostPosted: Tue Dec 02 2014 13:44
by z-dima
I have 16 GB SD card on my Cubox-I
Volumio use less then 2 GB
About 14 GB - unallocated - so I could create additional partition and format as Ext4/exFat/FAT32/NTFS
But Volumio do not show it in Library
Could I use this 14 GB as internal storage for music?
How it is better to format and add this space to Volumio?

Using extra space of SD card

PostPosted: Tue Dec 02 2014 14:56
by djoulle
To increase the partition size:
Code: Select all
sudo fdisk /dev/mmcblk0
Command : d  (delete the partition won't delete the content, it's just a partition table update)
Partition number : 3
Command : n
Select : default
Partition number :  3
Partition start : default
Partition end : default
Command : w
sudo reboot

Expand the updated partition
Code: Select all
sudo resize2fs /dev/root

Check the updated partition size, you should now use the whole SD capacity.
Code: Select all
df -h


Cheers ;)
Julien

Using extra space of SD card

PostPosted: Tue Dec 02 2014 15:15
by z-dima
Thank you a lot!
Could I use this space to store music?
Will Volumio show this music in Library?

Using extra space of SD card

PostPosted: Tue Dec 02 2014 15:51
by MobeyDuck
Found an old raspyfi post from michelangelo that should still work, let me know if it does / doesn't:

what you can do is copy your music on

/var/lib/mpd/music

but the best way is to do as follows:

cd /home/pi
sudo mkdir music
sudo chmod 777 music
cd /var/lib/mpd/music
ln -s /home/pi/music

So you create a symlink pointing to /home/pi/music. You copy your music here and update your db and you're done!

[Solved] Using extra space of SD card

PostPosted: Sat Dec 06 2014 20:15
by Johnny_Fever
Ive had problems getting this to work right. When I created a symlink in /var/lib/mpd/music it does not show in volumios webiu browse tab which only shows its usual top level structure , NAS , RAMPLAY, USB , WEBRADIO but nothing else. mpd can see the files fine and they appear if you do a 'mpc ls' . I finnally just gave up and made a symlink to my local music directory in /mnt/NAS , now volumios web-ui displays it fine under NAS.

Once you get this working you can edit /etc/samba/smb.conf to create a new smb share for your local music directory so you can drop things there from other computers on your network.

[Solved] Using extra space of SD card

PostPosted: Sat Dec 06 2014 23:00
by ks1g
Johnny_Fever wrote:...made a symlink to my local music directory in /mnt/NAS , now volumios web-ui displays it fine under NAS.


Thank you for posting this - After doing my own resize, I was trying to figure out how to get the web interface to recognize the new file area. I have some larger cards lying around and it would be convenient sometimes to have music on the card vs. a USB device.

After creating the sym link in /mnt/NAS and putting some music files in the directory, I did need to have mpd rescan the library, then Voila!

[Solved] Using extra space of SD card

PostPosted: Sat Dec 13 2014 03:59
by dsfraser
Thanks for the tip about the symlink in NAS. I was also trying to add some sdcard music storage but was unable to get Volumio to recognize it and mount it in the Browse window. I'm using the new 1.5 for beaglebone black. Adding folders to /mnt & symlinks to /var/lib/mpd/music worked under the old 1.4 version, not sure what has changed.

[Solved] Using extra space of SD card

PostPosted: Sat Dec 13 2014 12:13
by MobeyDuck
Yes this is a small bug, it should work, but in 1.5 it doesn't. The workaround is linking to one of the existing locations.
added to the FAQ

[Solved] Using extra space of SD card

PostPosted: Thu Dec 25 2014 18:14
by yakelkun
Thank you for this quick and efficient tutorial.

I was a little worried when deleting the partition, but as you specify, everything is back after operation ! :D

[Solved] Using extra space of SD card

PostPosted: Sun Dec 28 2014 16:13
by z-dima
Disk resize do not work for me
Could you help me to solve it?
Details:
root@volumio:~# sudo fdisk /dev/mmcblk0
Command (m for help): p
Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 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
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 2972024 1484988+ 83 Linux
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 2): 3
First sector (2972025-31116287, default 2972025):
Using default value 2972025
Last sector, +sectors or +size{K,M,G} (2972025-31116287, default 31116287):
Using default value 31116287

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@volumio:~# sudo reboot

*******

root@volumio:~# resize2fs /dev/root
The filesystem is already 371247 blocks long. Nothing to do!

root@volumio:~# resize2fs /dev/mmcblk0p3
resize2fs: Bad magic number in super-block while trying to open /dev/mmcblk0p3

root@volumio:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 1.4G 569M 755M 43% /
/dev/root 1.4G 569M 755M 43% /
devtmpfs 880M 0 880M 0% /dev
tmpfs 202M 344K 202M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 512M 0 512M 0% /run/shm
Ramdisk 512M 0 512M 0% /run/shm

root@volumio:~# sudo fdisk /dev/mmcblk0
Command (m for help): p
Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 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
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 2972024 1484988+ 83 Linux
/dev/mmcblk0p3 2972025 31116287 14072131+ 83 Linux