Increase root partition size

Increase root partition size

Postby lmendes » Sat Jun 09, 2012 9:09 am

Hi,

Is it possible to increase the root partition size ?
Was trying to install mysql5 but there's few space left in the partition.

Is it safe to move some root folders to the big partition and create symbolic links in order to get more root space ?

After failed attempt to install mysql5, how can one clear ipkg cache/download files ?

- Luis
lmendes
 
Posts: 6
Joined: Thu Oct 20, 2011 6:25 pm

Re: Increase root partition size

Postby lmendes » Sat Jun 09, 2012 9:52 am

Well seems that moving /root/opt does the trick.
Not sure if has any real impact, have to check it out.

So, but basically:

Code: Select all
mkdir /share/1000/root
cd /
cp -r -p opt/ /share/1000/root
mv opt/ opt_old
ln -s /share/1000/root/opt opt
lmendes
 
Posts: 6
Joined: Thu Oct 20, 2011 6:25 pm

Re: Increase root partition size

Postby lmendes » Sat Jun 09, 2012 1:06 pm

Still had some problems installing mysql5 though.

mysqld could not run due to permission issues.
Created mysql user/group, but after reboot both are lost. Is it normal ?
Only managed to run the daemon as root user, which is a security issue, but well in my case local network not a big problem.

Also mysqld seems not to be started at boot, have to manually start it.
Any chance of creating startup scripts ?

- Luis
lmendes
 
Posts: 6
Joined: Thu Oct 20, 2011 6:25 pm

Re: Increase root partition size

Postby fvdw » Sat Jun 09, 2012 3:54 pm

what you did with /opt folder is indeed a trick to be able to install bigger package. (you copied the content but that can give permission issues and does not preseve symlinks better to make a tar archive of the /opt folder content and unpack that in the new one you created.
Clearing ipkg installs. Difficult as sometimes many files and symlinks are added, just deleting some files might cause trouble with ipkg. If the nas has no free space anymore on the system partition then delete a few library files in /opt/lib of the packages you installed. Then re-install the firmware using the webinterface of the NAS. Making a little free space prevents that the installtion of the firmware fails. After re-installing the firmware you have a "normal" opt folder again.

About optware in general. Be aware that not all ipkg (optware) packages are reliable or working perfectly with the firmware. Some of these packages wil have dependeny issues, also you might overwrite some files in the /opt folder that the firmware binaries rely. If you replace for instance shared object libraries by newer ones some features of the nAS might stop working. Also are optware packages compiled with strange options. I have bad experiences with it and do not recommend to use it. Nowadyas I compile everything new to be sure that there are no dependency issues and also no malware included. Final goal is to get rid of all optware dependencies.
The system partitions can be increased of course but we will not do this. The reason is that we want to keep the size of the firmware image acceptable. If it becomes big then downloading and installing new version becomes an issue due to file sizes. Currently the size is 200 MB.
But we also recognize that some user want to install extra packages. Therefor we introduced in version 12-1 the possibility to install add-ons. Those will be installed on the big data partition and will work with the firmware in the system partition. In fact the firmware will see these addons as being present in the folder /usr/local using a symlink to the addon directory. All addons will be compiled to run form /usr/local

Why do you need myqsl ?
I should have a compiled version 5.1.37 of mysql that could be installed as add on in fvdw-sl-12-1. I used it in the trials to get older versions of logitech mediaserver running, those need mysql and it worked. Newer version don't use it mysql anymore but sqlite (much smaller). No need for mysql anymore.

Adapting scripts used at boot is of course possible but if you make a mistake it could make the nas non functional.

About user/groups. Yes they are redefined at every boot using information of users in nas database.
You could try to use the user "nobody" to run the mysql daemon
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Increase root partition size

Postby lmendes » Sun Jun 10, 2012 2:22 pm

Thanks for the reply, read recently about the add-ons in upcoming version 12-1, can't wait to try them out.
Was aware of the dangers of using ipkg packages, but decided to give it a go to extend even more the great functionality of your firmware :)
I guess when 12-1 is out, I'll backup the big partition (media files) and install from scratch again, probably needs some clean up at the moment, even if apparently everything seems to be working.

Need mysql5 to set up an XBMC centralized database, for using in multiple client devices/PC's.
http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries/Setting_up_MySQL

It requires mysql5 because it's using SQL syntax not backward compatible with mysql4 (more ligthweight).
Probably sql-lite can also be used, I guess it's only a matter of SQL syntax version.

Thanks,
Luís
lmendes
 
Posts: 6
Joined: Thu Oct 20, 2011 6:25 pm


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 2 guests