Re: Disk Full Problem....

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

 



On Fri, Feb 20, 2004 at 01:41:09PM -0500, Srinivas Koppisetti wrote:
> Can we move mysql data files to a different volume and ask the endine to
> pick the data files from there. If so I need some more help on how to do
> that. 

I'm doing this off the top of my head so double-check my work before you
shoot yourself in the foot. I have not verified that mysql follows
symbolic links.  An alternative to using the symbolic link is to edit
/etc/rc.d/init.d/mysqld and change the datadir symbol, but you'll have
to be careful with every mysql update that your edited version of the
mysqld script doesn't get overwritten.

Assume your new disk is /u01 and you want to move the databases to
/u01/mysql.

# /sbin/service mysqld shutdown
# du -sh /var/lib/mysql
        See how much space is used now.
# ls -ltR /var/lib/mysql
        Check file owners and permissions too
# mv /var/lib/mysql /u01/mysql
# du -sh /u01/mysql
# ls -ltR /u01/mysql
# ln -s /var/lib/mysql /u01/mysql
# ls -ltR /var/lib/mysql
        You should see the same files but in the new locations
# /sbin/service/mysqld start

-- 
Ed Wilts, Mounds View, MN, USA
mailto:ewilts@xxxxxxxxxx
Member #1, Red Hat Community Ambassador Program


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux