LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2013, 01:46 AM   #1
RaviTezu
Member
 
Registered: Nov 2012
Location: India
Distribution: Fedora, CentOs, RHEL
Posts: 164

Rep: Reputation: 24
How to link a file from /var to / ?


Hi LQ,

I have a Mysql file(which may grow to 14G) residing in /var directory. Total size of the /var is just 10GB,so i want to link(hard/sym) it(if possible..I'm not sure) to some other file(may be a new file) on / dir. As i have 30G of / dir.


Thanks in Advance.
 
Old 02-12-2013, 02:06 AM   #2
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 51
When you are trying to make sym-link using ln -s, does it show link (broken) (inode/symlink) for linked file?
Does it show size approx 10 bytes?
or
Are you implementing it using another method?
 
Old 02-12-2013, 02:12 AM   #3
ali.abry
Member
 
Registered: Feb 2013
Posts: 74

Rep: Reputation: Disabled
hard links are only usable in a partition that file is exist.
you can move your file to / and then make symbolic link to var.
symbolic links make in this way :
Code:
ln -s SOURCE-FILE LINK-FILE
 
Old 02-13-2013, 04:12 AM   #4
smbhandary
LQ Newbie
 
Registered: Jan 2013
Distribution: RHEL and AIX ( sort of )
Posts: 18

Rep: Reputation: Disabled
Ravi, Im not aware of your systems physical configuration, so this suggestion will be vagueish....

If this is long term or not a fun activity, Id suggest get yourself a separate filesystem for mysql and if you cannot migrate your mysql installation from /var to the new mysql filesystem, move your mysql data files to the new filesystem and link the files from there.

Placing non OS files on / is not a good idea...

Last edited by smbhandary; 02-13-2013 at 04:13 AM. Reason: edit
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic link from /var/www/html NirvanaBaby Linux - Server 8 07-30-2012 06:15 AM
link /var/www digitolx Linux - Server 4 07-02-2010 05:44 AM
file /var/lib/named/var/named/reverse/named.zero failed: file not found Toadman Linux - Software 15 03-18-2009 07:01 PM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
php:passing a var by a link by using session norbs Programming 5 08-02-2002 03:50 PM


All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration