Re: 2 hard drives - filesystem question?

2010-03-31 Thread Craig Falconer

Bryce Stenberg wrote, On 01/04/10 14:48:

I have two hard drives on this server.
Everything except /home is on the first drive.
/home is on the second drive, as configured during the install.



(so now the bit I don’t get):
I also want /var on the second drive.
I want /var and /home to be on the same partition on the second drive.
How do I go about that?
I get confused as /home is currently the mount point for that whole 
partition, so how do I add /var in at that level also? In windows I’d 
just add or move the directories on to the second drive, not sure what 
to do in linux.


If the home partition uses the complete second drive then you're stuffed.

You'll either have to reduce the size of the sdb1 partition to provide 
room on sdb for sdb2, or add a third drive.


You could move var into /home, but its a horrible answer.  Package 
management can get terribly upset. As root, something like:


init 1
mkdir /home/var
rsync -avH /var /home/var
mv /var /var.old
ln -s /home/var /var
reboot


In the future use PVs and create enough space for what you need, with 
some spare extents for adding to LVs later, if needed.




--
Craig Falconer



RE: 2 hard drives - filesystem question?

2010-03-31 Thread Bryce Stenberg
 -Original Message-
 From: Craig Falconer [mailto:cfalco...@totalteam.co.nz]

 In the future use PVs and create enough space for what you need, with
 some spare extents for adding to LVs later, if needed.

Luckily, this is all using PV's and LV's. So I'll go add another LV for
/var.  I was trying to get it all in one LV to simplify backup/restore
procedures, but looks like it can't be done without going via a
'horrible answer' :)

Thanks Craig.

Regards, Bryce Stenberg.





DISCLAIMER: If you have received this email in error, please notify us 
immediately by reply email, facsimile or collect telephone call to +64 3 
9641200 and destroy the original.  Please refer to full DISCLAIMER at 
http://www.hrnz.co.nz/eDisclaimer.htm







Re: 2 hard drives - filesystem question?

2010-03-31 Thread Christopher Sawtell
On 1 April 2010 15:03, Bryce Stenberg br...@hrnz.co.nz wrote:

  -Original Message-
  From: Craig Falconer [mailto:cfalco...@totalteam.co.nz]
 
  In the future use PVs and create enough space for what you need, with
  some spare extents for adding to LVs later, if needed.
 
 Luckily, this is all using PV's and LV's. So I'll go add another LV for
 /var.  I was trying to get it all in one LV to simplify backup/restore
 procedures, but looks like it can't be done without going via a
 'horrible answer' :)


A possibly somewhat less horrible - but still horrible - way might be to
physically make home be a subdir of /var and then to use the mount command
with the --bind option to mount /var/home on /home

The mount could either go in /etc/fstab, or if you have a tyranical distro,
put the mount cammand in your rc.local file.

I have used this approach in the past. It worked well.

-- 
Sincerely etc.
Christopher Sawtell


Re: 2 hard drives - filesystem question?

2010-03-31 Thread Craig Falconer

Bryce Stenberg wrote, On 01/04/10 15:03:

Luckily, this is all using PV's and LV's. So I'll go add another LV for
/var.  I was trying to get it all in one LV to simplify backup/restore
procedures, but looks like it can't be done without going via a
'horrible answer' :)


Actually its less hard for you with LVM already in use.

Run pvdisplay and look for Free PE If you have some then its easy.


Else you'll have to free some space.   What filesystem is /home ?  I 
understand ext2 and ext3 can be shrunk but xfs and jfs cannot.  No idea 
about ext4.





--
Craig Falconer



Re: 2 hard drives - filesystem question?

2010-03-31 Thread Ryan McCoskrie
On Thu, 01 Apr 2010 14:47:57 Bryce Stenberg wrote:
 Hi,
 
 
 
 Sorry, I don't seem to be able to grok the linux filesystem properly.
 
 
 
 I have two hard drives on this server.
 
 Everything except /home is on the first drive.
 
 /home is on the second drive, as configured during the install.
 
 
 
 (so now the bit I don't get):
 
 
 
 I also want /var on the second drive.
 
 I want /var and /home to be on the same partition on the second drive.
 
 
 
 How do I go about that?
 
 
 
 I get confused as /home is currently the mount point for that whole
 partition, so how do I add /var in at that level also? In windows I'd
 just add or move the directories on to the second drive, not sure what
 to do in linux.
 

How desperately do you want this done? The whole partitioning
scheme is designed on the assumption that no one is going to try
something like this.


Re: 2 hard drives - filesystem question?

2010-03-31 Thread Craig Falconer

Ryan McCoskrie wrote, On 01/04/10 17:44:
  How desperately do you want this done? The whole partitioning

scheme is designed on the assumption that no one is going to try
something like this.


Designed ?  Nah - wrong word.

Most of the interesting differences between unixes and other OSs come 
from the sheer age of the original.


Disks were much smaller and having a separate disk for /usr /home /var 
and mail was much more likely.


We've just taken that restriction and called it a feature.

LVM is one way around this, now that disks have got much larger.


--
Craig Falconer