You are not logged in.

#1 2008-02-17 23:29:13

fredrikhcs
Member
Registered: 2006-12-21
Posts: 13

Two Partitions Sharing the Same Space?

Is it possible to have several partitions share the same space? For instance, I want to have a separate partition for /opt and a separate for /home, but I can't decide how much space to give them. For me it would be best to let them share about 80% of the hard drive space, letting either one take the space needed for a new game or movie. Is it possible at all or should I look at other options?

Offline

#2 2008-02-18 00:01:40

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1,328

Re: Two Partitions Sharing the Same Space?

With linux, I don't think it's possible. It's possible with zfs filesystem (solaris or freebsd>7.0).
Nevertheless, on linux there's LVM (logical volume management, google for it, or you can start on wikipedia), which comes relatively close - you still cannot share, but it's relatively easy to resize partitions on the fly.

Offline

#3 2008-02-18 00:04:04

xdeusx
Member
Registered: 2007-10-15
Posts: 168

Re: Two Partitions Sharing the Same Space?

interesting idea...
i would also like to know if thats possible...

Offline

#4 2008-02-18 07:09:16

ploxiln
Member
Registered: 2006-10-27
Posts: 50

Re: Two Partitions Sharing the Same Space?

Making separate partitions that automatically share space isn't possible.

You could have two separate partitions, if they were next to each other and ext3, then if you ever needed to take  some space from one and give it to the other you could unmount those partitions and use gparted to easily move the delimiter between them, resizing them both.

Or, you could use LVM for them, which would allow you to make one partition to give to LVM, and from that create your two virtual ("logical") partitions which start out small, such that you can add space to whichever one you want whenever you want.

Or, if what you really want is one partition which contains both /opt and /home and nothing else, you can make and format such a partition, mount it to /mnt/blah, make folders /mnt/blah/home and /mnt/blah/opt, and then symlink (ln -s) or bind-mount (mount --bind) /opt and /home to /mnt/blah/opt and /mnt/blah/home.

As usual in linux, there's a bunch of ways to do it, even if none of them are the way you initially wanted to.

Offline

#5 2008-02-18 11:32:51

fredrikhcs
Member
Registered: 2006-12-21
Posts: 13

Re: Two Partitions Sharing the Same Space?

Thanks for the help. I think I've got an easier solution using symlinks, ploxiln. If I put all of that 80% hard drive space into /home, I could just create a symlink in / pointing to /home/opt or wherever I put my optional application software packages. wink

Last edited by fredrikhcs (2008-02-18 11:33:10)

Offline

#6 2008-02-18 17:22:14

xdeusx
Member
Registered: 2007-10-15
Posts: 168

Re: Two Partitions Sharing the Same Space?

damn i should have thought about this earlier wink
thanks

Offline

Board footer

Powered by FluxBB