Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2007 17:32:46 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Evren Yurtesen <yurtesen@ispro.net>
Cc:        Jerry McAllister <jerrymc@msu.edu>, questions@freebsd.org
Subject:   Re: splitting a filesystem
Message-ID:  <20070329213246.GA55963@gizmo.acns.msu.edu>
In-Reply-To: <460C187B.5080703@ispro.net>
References:  <460BE15B.5090007@ispro.net> <20070329181259.GA55191@gizmo.acns.msu.edu> <460C187B.5080703@ispro.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 29, 2007 at 10:50:19PM +0300, Evren Yurtesen wrote:

> Jerry McAllister wrote:
> 
> >On Thu, Mar 29, 2007 at 06:55:07PM +0300, Evren Yurtesen wrote:
> >
> >
> >>Hi,
> >>
> >>Is it possible to split an existing filesystem into smaller ones(1to2).
> >
> >
> >Well, sort of.
> >You can back everything up with dump(8)
> >Then delete the partition and make two in its place.
> >Then newfs the two new partitions to create filesystems of them.
> >Then restore(8) the parts of the old one you want on to the two
> >new ones.
> >
> >I wonder if it is worthwhile though.  
> >Just make two main directories and divide the stuff and don't
> >worry if they are both in the same partition.
> >
> 
> I am not worried about the data, I want to split /tmp filesystem so I can 
> mount it as /tmp and /var/tmp seperately.
> 
> Because I want to enable noexec on these and unreachable from each other, 
> it is necessary.

> 
> The problem was that I use open_basedir with php and session files are in 
> /var/tmp while open_basedir allows /tmp only and programs(like joomla) get 
> confused and say that they cant write to the session directory. But they 
> actually can because session files are created automatically by php, they 
> are
> just not able to set directory manually. (which is weird thing of php)

Well, this wouldn't make them unreachable from each other, but;
You could make a symlink from /var/tmp to tmp.   Then things could
read and write it with either directory name.
  cd /var
  mv tmp othertmp
  ln -s /tmp tmp

voila ---

////jerry

> 
> Programs like joomla and oscommerce etc. work just fine but for example 
> joomla installer complains and my customers tell me that 'joomla says your 
> server is bad' :p
> 
> But now I think about it again if I put the open_basedir to /var/tmp which 
> gets preset in programs most used by my customers then I should set session 
> save path to /tmp and same problem would occur.
> 
> Anyhow :) it was a stupid idea... sorry to bother you all with it :)
> 
> Thanks,
> Evren



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070329213246.GA55963>