Hi, I'm trying to figure out if I can do a resize of the storage (/dev/mmcblkp02) partition on OpenElec.Tried loads of googling but kinda getting lost in it all as I'm new to Linux.
So I have my Pi running the latest openelec xbmc build, which I installed via a precompiled image on to my 32GB SD card, and I want to drop a few HD films over onto the card but because it was a precompile I think its only taking up just under a gig and I can't (or don't know how to) see the rest of the space, so can someone help me with the commands I need to put in, to expand the storage partition to fill the rest of the space (got the PC linked up to the Pi with PuTTy btw), if possible that is.
ta muchly
Re: Resizing Openelec 'Storage' partition
Hi enuui. I'm interested in Openelec as a digital signage solution myself but haven't gotten around to it yet. Maybe we can help each other out here. I'm no expert by any stretch but I have figured out how to recover the unused space on my sd card thanks to all the good advice in this forum.
If you can open a terminal or get to a command line on boot up, type; sudo raspi-config and hit enter. It will open an awkward interface in which you can make some changes to the configuration. One of the options is to recover the unused space on the sd card.
The reason I call the interface awkward is you actually use the tab key to highlight selections and then hit enter to execute them, rather than just using the arrows and enter. It feels a little awkward to use but does the job.
So try it, and if it works for you, come back to this thread and let me know if it worked and also tell me a little about your media center. Are you using it for signage? If not, what plug ins are you using and how are they working? Nothing too in depth. I'm just interested in a new openelec users initial impressions.
Good luck.
If you can open a terminal or get to a command line on boot up, type; sudo raspi-config and hit enter. It will open an awkward interface in which you can make some changes to the configuration. One of the options is to recover the unused space on the sd card.
The reason I call the interface awkward is you actually use the tab key to highlight selections and then hit enter to execute them, rather than just using the arrows and enter. It feels a little awkward to use but does the job.
So try it, and if it works for you, come back to this thread and let me know if it worked and also tell me a little about your media center. Are you using it for signage? If not, what plug ins are you using and how are they working? Nothing too in depth. I'm just interested in a new openelec users initial impressions.
Good luck.
Re: Resizing Openelec 'Storage' partition
Hey. Cheers, but sudo raspi-config doesn't seem to work on OpenElec
I've used it before on my other SD card with Raspbian installed.
I'm using OpenElec just to play some HD films really, as I've had my HD TV for 3 years and it never had any HD through it until I got the Pi. I have a few plugins installed just to check them out, like Rockpalast for some concerts, BBC Iplayer.
Saturday just gone I got a new SD card, as my last one was borrowed, so just trying to get a sweet setup where I can easily access films and stuff either by dropping them onto the card - or over wireless (and today is the first day I've accessed the Pi via SSH, all new things to me really)
I've used it before on my other SD card with Raspbian installed.
I'm using OpenElec just to play some HD films really, as I've had my HD TV for 3 years and it never had any HD through it until I got the Pi. I have a few plugins installed just to check them out, like Rockpalast for some concerts, BBC Iplayer.
Saturday just gone I got a new SD card, as my last one was borrowed, so just trying to get a sweet setup where I can easily access films and stuff either by dropping them onto the card - or over wireless (and today is the first day I've accessed the Pi via SSH, all new things to me really)
Re: Resizing Openelec 'Storage' partition
hey guys,
i am not sure which version of openelec you two are using but I installed the latest "OpenELEC 3.0 RC 1 (2.99.1)" which was released on Jan 3rd 2013 and I didn't need to resize my card since the installing script "create_sdcard" which comes with it creates the second partition with whatever space left in the card.
this is the part of the script that creates the partitions:
as you see the second partition starts from 16 (which is the end of the first partition) and ends at -2 (negative value means start counting backward from the end of the drive)
So the script creates the first partition with a fixed size then creates the second partition with the remaining free space.
However, if you already have an sd-card with a small partition then i would suggest using GParted (from your computer) which is a GUI for parted to resize, the app is really easy to use. Resizing from within the Rpi is still possible but it will require un-mounting the second partition. *I assumed that you two are using linux based on your posts.
i am not sure which version of openelec you two are using but I installed the latest "OpenELEC 3.0 RC 1 (2.99.1)" which was released on Jan 3rd 2013 and I didn't need to resize my card since the installing script "create_sdcard" which comes with it creates the second partition with whatever space left in the card.
this is the part of the script that creates the partitions:
Code: Select all
parted -s "$DISK" unit cyl mkpart primary fat32 -- 0 16
parted -s "$DISK" unit cyl mkpart primary ext2 -- 16 -2
So the script creates the first partition with a fixed size then creates the second partition with the remaining free space.
However, if you already have an sd-card with a small partition then i would suggest using GParted (from your computer) which is a GUI for parted to resize, the app is really easy to use. Resizing from within the Rpi is still possible but it will require un-mounting the second partition. *I assumed that you two are using linux based on your posts.
Fahad
http://www.fadvisor.net/blog
http://www.fadvisor.net/blog
Re: Resizing Openelec 'Storage' partition
I just did a fresh install of 2.99.3 and my /storage shows 755.9/M on my 16GB flash drive (14GB usable).
How did you install OE, through Linux or Windows/Mac? Can I run that script manually?
How did you install OE, through Linux or Windows/Mac? Can I run that script manually?
-
- Posts: 1277
- Joined: Fri Sep 14, 2012 9:13 am
Re: Resizing Openelec 'Storage' partition
I found that pretty late in the night and followed these directions and it worked (for any future searchers):Cloudcentric wrote:http://openelec.tv/forum/64-installatio ... pi-windows
SSH in as root
By default you’re in /storage; switch to root partition:
cd /
Keep XBMC from restarting:
touch /var/lock/xbmc.disabled
Stop XBMC, so we can unmount /storage:
killall -9 xbmc.bin
umount /storage
Verify mounts:
mount
parted /dev/mmcblk0
In parted:
change to sectors display:
unit s
show partitions, make note of starting sector of your partition:
p
remove the partition:
rm 2
re-create it, using same starting sector # and ending of -1 to use remaining space:
mkpart primary 258048 -1
quit parted
e2fsck -f /dev/mmcblk0p2
resize2fs /dev/mmcblk0p2
mount /dev/mmcblk0p2 /storage
df -h
rm /var/lock/xbmc.disabled
XBMC will start up again
I'm a beginner linux user (just know ls and such), so I had no idea what I was doing there, but it worked. Now I just need to know how to actually utilize the /storage drive

The quest never ends!
Re: Resizing Openelec 'Storage' partition
Wow. This worked perfectly!! Thanks! I'm also a novice linux user and that was way over my head..but the commands worked flawlessly to resize it.
Re: Resizing Openelec 'Storage' partition
Woww.. all my congratulation for this clean and efficient way to resize the SD card.
Exactly what I needed.
Two thumbs up.
Exactly what I needed.
Two thumbs up.
Re: Resizing Openelec 'Storage' partition
What about to use Gparted? Clean and easy! 

- PiKISS for Raspberry Pi: https://github.com/jmcerrejon/PiKISS
- Blog: https://misapuntesde.com/
- Patreon: https://www.patreon.com/cerrejon?fan_landing=true
- Twitter: https://twitter.com/ulysess10
- Discord: https://discord.gg/Y7WFeC5
Re: Resizing Openelec 'Storage' partition
Hi. I have openelec 3.0.2 (frodo 12.2), and when I try
I get:
Code: Select all
umount /storage
Code: Select all
umount: can't umount /storage: Device or resource busy
Re: Resizing Openelec 'Storage' partition
I had the same problem, make sure you aren't accessing one of the samba shares, and it may take a minute for it to become not busy. It took less than one minute for it to work on my Pi after I closed the Windows Explorer window that was pointed at the Pi.alecjcook wrote:Hi. I have openelec 3.0.2 (frodo 12.2), and when I try
I get:Code: Select all
umount /storage
Code: Select all
umount: can't umount /storage: Device or resource busy
Re: Resizing Openelec 'Storage' partition
METDeath, make sure you aren't typing
unmount
(with the letter "n"). The command is umount
cheers,
pazure
unmount
(with the letter "n"). The command is umount
cheers,
pazure
Re: Resizing Openelec 'Storage' partition
use:
fuser -m /storage
to see what processes are still open and stopping you from umount /storage
fuser -m /storage
to see what processes are still open and stopping you from umount /storage
Re: Resizing Openelec 'Storage' partition
So I just resized the partition and now airplay won't work nor can I access files using samba.
Any help in diagnosing the issue will be greatly appreciated.
Thanks
Any help in diagnosing the issue will be greatly appreciated.
Thanks
Re: Resizing Openelec 'Storage' partition
I did that and this is what I got :jdenbrok wrote:jdenbrok
openelec:/ # fuser -m /storage
1567 1568
How do I close these processes ? Also, can I make the root partition 256mb instead of the default 128mb ?
Re: Resizing Openelec 'Storage' partition
What I do, since I have a Windows Machine, is run a copy of Ubuntu Linux in VirtualBox. I then mount my Card Reader inside VirtualBox and run gparted to resize the partitions on the SD Card. The versions of gparted I found for Windows seemed to only be usable via booting a CD or USB which is a bit inconvenient. Using VirtualBox also allows me access to run certain Linux utilities when I need them without having to dual boot.
-
- Posts: 1
- Joined: Sat Nov 09, 2013 10:50 pm
Re: Resizing Openelec 'Storage' partition
Just a couple of pointers, because I found this while running into the same problems.
First, if you get this error:
umount: can't umount /storage: Device or resource busy
You have to stop whatever processes are touching /storage. When you run fuser -m /storage, depending on options, there might be a couple, but the only one that gives you trouble is connmand. When you kill it, it automatically restarts.
However, there's a small window, so if you run:
OpenELEC:/ # kill -9 <connmand pid> && umount /storage
It'll go ahead and unmount and let you resize it.
Hope that helps!
N
First, if you get this error:
umount: can't umount /storage: Device or resource busy
You have to stop whatever processes are touching /storage. When you run fuser -m /storage, depending on options, there might be a couple, but the only one that gives you trouble is connmand. When you kill it, it automatically restarts.
However, there's a small window, so if you run:
OpenELEC:/ # kill -9 <connmand pid> && umount /storage
It'll go ahead and unmount and let you resize it.
Hope that helps!
N
Re: Resizing Openelec 'Storage' partition
How ridiculous, I still can't unmount the storage partition.
I installed using a mac so there's no option to set the storage partitions size when using dd
I installed using a mac so there's no option to set the storage partitions size when using dd
Re: Resizing Openelec 'Storage' partition
you are probably on /storage
type "pwd" it will tell you which is your current directory.
then cd .. to go to the upper direcotry
try again the umount
type "pwd" it will tell you which is your current directory.
then cd .. to go to the upper direcotry
try again the umount
Re: Resizing Openelec 'Storage' partition
I know this might be a bit late, but I encountered the same issue, and found a much simpler way to resize the /storage partition here:
http://raspberrypi.stackexchange.com/qu ... n-openelec
Log in as root (ssh).
Then simply reboot, and the resizing will be done automagically.
http://raspberrypi.stackexchange.com/qu ... n-openelec
Log in as root (ssh).
Code: Select all
# touch /storage/.please_resize_me