Re: Raid 1/10 on Fedora 15 and /var full

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aero Maxx wrote:
> On 19/07/2012 11:08, Ed Greshko wrote:
> >On 07/19/2012 06:00 PM, Aero Maxx wrote:
> >>I have a raid 1/10 setup working great doing what it does, but the /var partition
> >>which I wasn't aware of until now is where my mysql database are stored and this
> >>isn't on the raid 10, thats not that much of an issue, I would be gutted if I lost
> >>the data though, but the main issue is that its now become full.
> >>
> >>Where you recommend for this /var to be put, or should I just make that partition
> >>bigger ? for it to be raided that would be very nice.
> >Actually, if I were running mysql I would configure it to have my databases on a
> >partition that doesn't get affected by upgrades.
> >
> >For example, I run plenty of VirtualBox VM's and I keep them on /opt/VMs.  That way
> >it is easy to exclude them when doing an install of the next version of
> >fedora....much like having /home on its own partition.
> >
> >
> I understand the concept, although am a little confused as to how I
> would achieve this, my databases at the moment are in /var/lib/mysql

You could create a directory on your raid'd filesystem, for sake of 
argument let call it /raidedfilesystem and move the mysql files there:

 - mkdir /raidedfilesystem/{db,backup}
 - service stop mysqld
 - chown root:root /raidedfilesystem/backup
 - chmod 770 /radided/filesystem/backup
 - tar czvfp /raidedfilesystem/backup/pre-move-var-lib-mysql-backup.tgz \
   /var/lib/mysql
 - chmod 770 /raidedfilesystem/backup/pre-move-var-lib-mysql-backup.tgz
 - cd /var/lib; find mysql | cpio -pmudv /raidedfilesystem/db
 - mv /var/lib/mysql /var/lib/mysql.orig
 - ln -s /radidedfilesystem/db/mysql /var/lib
 - service start mysqld

Once you have verified that everything is working as expected feel free
to dispose of /var/lib/mysql.orig and the tgz backup as you wish. If this
do not work correctly, you have to solutions to restore.

/mek
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux