Sharing /home and /var on one partition
Bob Jonkman
bjonkman at sobac.com
Tue Apr 28 04:08:59 UTC 2009
Dominic Lepiane wrote:
> Check out mount bind. Basically mount your new drive somewhere (like
> /mnt/newdrive1) and then you can use the bind option to mount
> sub-directories from it to different parts of your file system.
In my fstab I already have
/dev/sdb1 /mount/newdrive ext3 auto 0 2
So, I should add
/mount/newdrive/home /home bind defaults,bind,auto 0 0
/mount/newdrive/var /var bind defaults,bind,auto 0 0
(syntax from various forums and web pages)
Andrew Mathenge wrote:
> Don't see why not. You're going to partition this drive and mount it
> under / and then symlink /home and /var to it.
>
> Are you running out of space on your primary drive?
>
> Andrew.
>
Past tense: I have already run out of space, and have been culling stuff
I believe is safely backed up elsewhere...
Tony Yarusso wrote:
> The bind option is probably the way you want to go, given what you
> said. Another possibility to consider would be to partition it with
> LVM (logical volumes), such that they would be separate partitions,
> but it would be possible to re-size them without destroying data.
>
Symbolic links sound easier than "mount --bind" but "mount --bind"
sounds more robust, so I'll do that first (but in fstab).
I've worked with logical volumes on other OSes, so this may the
opportunity to plunge into LVMs on Linux.
Daniel Robitaille wrote:
> another reason to keep them separate is that if an user does something
> stupid and fill up /home (or /var), then it doesn't affect the other
> filesystem and possibly the other users as badly. Less a problem
> with small install of one or just a couple of users. More of a
> problem with installation with a larger number of users (or with users
> who are more clueless...).
>
Very true. But it's an old server, and I have greater concerns about
juggling disk available disk space than clueless users (who would be me :)
Andy Boersma wrote:
> Hi Bob,
>
> There is no reason why not.
>
> You can put them both on the same drive.
>
> The only reason for putting them on separate drives is for performance, by
> being on separate drives, the kernel can read/write to both in parallel.
> On the same drive it will always be a sequential operation.
>
> Andy
I'm not too worried about performance at the moment. The DSL connection
forms a bigger bottleneck than disk IO.
Many thanx to all!
--Bob.
> On Mon, Apr 27, 2009 at 3:38 PM, Bob Jonkman <bjonkman at sobac.com> wrote:
>
>> Hi all: I've just added a drive to my server (8.04), and want to move
>> the /home and /var directories to it. Is it possible to put both on the
>> same partition, so that they'll share the pool of available space? Or
>> do I have to create separate partitions for /home and /var?
>>
>> --Bob.
>>
--
Bob Jonkman <bjonkman at sobac.com> http://sobac.com/sobac/
SOBAC Microcomputer Services Voice: +1-519-669-0388
6 James Street, Elmira ON Canada N3B 1L5 Cel: +1-519-635-9413
Software --- Office & Business Automation --- Consulting
More information about the ubuntu-ca
mailing list