[Solved] Using extra space of SD card

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?

To increase the partition size:

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

sudo resize2fs /dev/root

Check the updated partition size, you should now use the whole SD capacity.

df -h

Cheers :wink:
Julien

Thank you a lot!
Could I use this space to store music?
Will Volumio show this music in Library?

Found an old raspyfi post from michelangelo that should still work, let me know if it does / doesn’t:

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.

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!

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.

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

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 ! :smiley:

Disk resize do not work for me
Could you help me to solve it?
Details:
[spoiler]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[/spoiler]

Please use the code tags for codes [code]

[/code]

The first letter you need to enter is a d not a p or an n. You never deleted the partitions.
I would recommend reflash and retry

For my case it is 1-st partition
This code work for me:

sudo fdisk /dev/mmcblk0 Command : d (delete the partition won't delete the content, it's just a partition table update) Partition number : 1 Command : n Select : default Partition number : 1 Partition start : default Partition end : default Command : w sudo reboot

Umm, isn’t partition 1 the boot partition? I did this and now Raspi won’t boot :frowning: