Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Best way to partition my harddrive?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Wed Apr 07, 2004 3:40 pm    Post subject: Best way to partition my harddrive? Reply with quote

Hi,

I'v been using gentoo for some time now and I'm planning to repartition my 2 harddrives. The first one is an 80 GB drive and the second one a 40 GB.
At the moment both gentoo and win xp are installed on the 80 gb drive, but at some point my partition table on the second drive got damaged and I can't use 15 gb of that drive. To solve the problem the drive must completely be erased, so I thought why not put gentoo on that drive. That way I can install and optimize gentoo on that disc first before I remove my existend distro. After that I will erase the old distro and reinstall windows too. My problem is not how to do it, but how should my partition sheme look like?

for the moment:
hda1: /boot
hda2: Windows C
hda3: /
hda5: Windows D
hda6: Windows E
hdb: Doesn't matter (needs to be completely erased)

I'm also planning to use LVM

Any suggestions?
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 993
Location: Quebec, Canada

PostPosted: Wed Apr 07, 2004 3:44 pm    Post subject: Reply with quote

Personaly, I would stick the /boot and Windows c: in first, both as primary.
It makes working with boot easier. I'd also keep both small as possible. Maybe giving c: just enough space to put the swap file on it and nothing else.

then probably put the root / next
put windows D where you will install teh OS itself. after that, it's pretty much your call

I'd personaly try to put HDB as a single fat32 partition. this way, you can use it to swap data between the OSs
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
www.madchaz.com A small candle of a website. As my lab specs on it.
Back to top
View user's profile Send private message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Thu Apr 08, 2004 10:30 am    Post subject: Reply with quote

good suggestion. But how much space should I give my linux? I'm planning to use it as a desktop. 20GB?
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
madchaz
l33t
l33t


Joined: 01 Jul 2003
Posts: 993
Location: Quebec, Canada

PostPosted: Thu Apr 08, 2004 12:35 pm    Post subject: Reply with quote

if you want to use it as your main desktop, I'd say give it about 15 or 20 gig. you could also keep a larger portion of your 80 gig for, say, your document's folder. by making it a fat32 partition, you can put both /home/username/Documents and the windows "my document" folder on the same place. Makes for much smoother switch between the 2
_________________
Someone asked me once if I suffered from mental illness. I told him I enjoyed every second of it.
www.madchaz.com A small candle of a website. As my lab specs on it.
Back to top
View user's profile Send private message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Thu Apr 08, 2004 1:27 pm    Post subject: Reply with quote

Thanks for your reply, I think i'm going to make it the following:

hda: (80Gb)
- /boot (50Mb)
- winxp drive C (10Gb)
- swap (256Mb)
extended:
|- / (500Mb)
|- LVM (15Gb) (/usr, /home, /var, /opt, /tmp)
|- winxp d (win prg dir) (10Gb)
|- winxp e (documents) (the rest) (bit much isn't it?)

hdb: (40Gb)
- Downloads + tmp files (fat32)

btw: madchaz, your from cadada?
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
Gherald2
Guru
Guru


Joined: 02 Jul 2003
Posts: 326
Location: Madison, WI USA

PostPosted: Fri Apr 09, 2004 6:29 am    Post subject: Reply with quote

Ok I have a few related questions. This is my first *nix install; here are my drive, partition, raid, and filesystem setups so far:

Code:
Drives:

/dev/sda = 36GB raptor
/dev/sdb = 36GB raptor

Partitions (size in MB, both sda and sdb partitioned identically):

/dev/sd(a,b)1 = 107 type fd (boot)
/dev/sd(a,b)2 = 1028 type 82
/dev/sd(a,b)3 = 15365 type fd
/dev/sd(a,b)4 = 20514 type fd

mount   device      type   part1   part2   MB   fs

/boot   /dev/md0   RAID1   sda1   sdb1   107   ext2
/       /dev/md2   RAID1   sda3   sdb3   15365   reiserfs
/home   /dev/md3   RAID0   sda4   sdb4   41028   reiserfs


The installation is up and running, but I would like to tweak my /var filesystem so the important stuff (e.g. /var/mail) gets stored on the RAID1 reiserfs, but non-critical stuff (tmp files, ccache, etc) is stored on the RAID0.

My idea is to create a directory /home/var and move all the non-critical var stuff there and symlink to it from /var. Does this make any sense?

I am trying to understand the /var file system, and so far this has been my reference, but it is difficult to be sure which directories are important and which are non-critical. Can anyone point me in the right direction?
Back to top
View user's profile Send private message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Fri Apr 09, 2004 8:30 am    Post subject: Reply with quote

You should post this as a new subject. That way the others wouldn't be mislead by the title.

I don't know anything about RAID, but the symlink doesn't make sense to me. If you have any questions about LVM, just ask... :wink:
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
Gherald2
Guru
Guru


Joined: 02 Jul 2003
Posts: 326
Location: Madison, WI USA

PostPosted: Fri Apr 09, 2004 9:18 am    Post subject: Reply with quote

*sigh, I've been trying to avoid LVM as it looks somewhat complex. RAID is hard enough without adding additional levels of abstraction... yet maybe LVM is what I need.

But why wouldn't symlinks make sense?


Anyway, I've thought about your partitioning scheme a bit and I think I'd be inclined to do things a little differently if I was starting from scratch with your drives and setting up only XP and Gentoo:

hda: (80Gb)
- winxp C (sys + win prg dir) (30Gb)
- /boot (50Mb)
- /swap (2*RAM)
extended:
| - / (1Gb)
| - LVM (20Gb) (/usr, /home, /var, /opt, /tmp)
| - winxp D && /home/win (documents) (rest)

hdb: (40Gb)
- Downloads + tmp files (fat32)

And that's being a little conservative... I'd consider rearranging things further if I knew how your 80 and 40 drives compare (make/model/RPM/cache/etc)
Back to top
View user's profile Send private message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Fri Apr 09, 2004 9:28 am    Post subject: Reply with quote

Quote:
But why wouldn't symlinks make sense?

My opinion, may be wrong.

I like to keep my win progs on a seperate partition because I sometimes (usually) modify my progs a little and a reinstall would lose a lot of work.
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
Gherald2
Guru
Guru


Joined: 02 Jul 2003
Posts: 326
Location: Madison, WI USA

PostPosted: Fri Apr 09, 2004 4:51 pm    Post subject: Reply with quote

I actually reinstall XP fairly often (on a seperate machine) and I generally like to reinstall all my programs as well.

I just have a backup .bat file that copies all my settings to a seperate drive.

Comes in handy...

I guess I just hate having four hard drives (C to F) under Windows. It's a habit I picked up from the old days, I guess, when something as simple as adding a CDROM drive would mess up all your drive letters.
Back to top
View user's profile Send private message
Noth
n00b
n00b


Joined: 08 Jan 2003
Posts: 74
Location: Finland/Arizona/NewJersey

PostPosted: Fri Apr 09, 2004 5:21 pm    Post subject: Reply with quote

I just want to point a few things out as I tend to run alot of still in development stuff.

Do what you want for for the windows partitions it doesn't really matter

You do need a /boot partition (but I think you already know that).
Acording to the gentoo security guide, and the more traditinial way. Is to set /, /home, /var, /tmp, and /usr as their own partition. With LVM you still need to do this. You would create one type 0xe8 (I think) partition, then create LVM partitions inside of that.

LVM is easy to use, there are some very good how-to's floating around, which I believe are still valid for LVM2. If you may EVER move to a 2.6 kernel you must use LVM2. Also if using a 2.6 kernel you can no longer have a root "/" LVM partition. LVM in the 2.6 kernel has been moved to userland. Consaquently you can't get to the program till / is mounted, and you can't mount / till you have the program loaded.....etc...

I find it easier to use a RAID mode 0, or software RAID mode 0. and suggest the same if you have more then one disk of the same or close size.

If you don't have multiple disks. I will assume you want LVM for its ability to resize partitions, this of course can not be done on the fly, you must first umount them. If doing this to an importent dir et.(/var, or /tmp) you will most likely have to boot and work from the livecd. I don't suggest using this unless you plan to add more hard drives at a later time.

For ease of space managment with the same effect as following the gentoo security guide, I would recomend just a root partition "/". While using an ACL system such as grsec or SELinux. The easiest one of those two is grsec. Grsec has just recently released its patch for the 2.6.4 kernel, there is no ebuild as of yet, patch will apply to the vanilla kernel but not the -mm. If you want to go with SELinux then you will have to use reiserfs4 or it will not work. I recomend using it anyway! The stable branch was supposed to have been out of testing last month "03/2004" but has not yet been released as such. There are Ebuilds for it currently masked.

Edit* The last paragraph brings about a small caveat.. ok so its large. Without a seperate /home partition, if things screw up really badly while your playing around to the point it is just easier to reformat the drive, you will loose all your saved files. So make a 10Gb "/" and give the rest of the space to a "/home" partition. a 10Gb "/" is not "needed", but would give you plenty of room for source files, logs, ccache if you choose to install it, and other things.


I also have seem a few posts were people have so many partitions on one disk that it broke the FAT, and the system would not load after reboot. This was justified by knowing where all the space is going and being able to control were it goes. Nothing wrong with that reasoning! But if you want that you should use disk quotas thats whay it is there. Again reiserfs4 has it native, reiser3 (the standerd gentoo reiserfs) would need it patched (I just saw today 04/09 a just posted query of someone asking if there is any interaste in him posting a how-to to get reiser3 with quotas working), works also with ext2, ext3, and I belive XFS.

Swap
Again traditionaly you would use x2 the amount of ram in your system. This is no longer needed really. If you have at least 500mb of ram you will probably never touch the swap file, unless you are running really big graphical/Video editing software, or large databases. So drop the size to 500mb of swap if you want to play it safe or if you would like to actualy use that space you have paid for, don't have one at all. Some people might point out that things are getting bigger, for instence Unreal Tournament 2004, has an option to precache all skins into memory. It suggest you to have at least 500mb of ram for this. If you only have 500mb of ram then there is a good chance of your swap being used here. But if it is some of the UT game files or files it will need during play, it will just slow you down. So be smart don't select options in programs that are more then your system can chew.

I think thats about it. Have fun! :D
_________________
!!!teG I sdrawkcaB eroM ehT oG I sdrawroF eroM ehT


Last edited by Noth on Fri Apr 09, 2004 5:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Fri Apr 09, 2004 5:29 pm    Post subject: Reply with quote

you can make partitions larger without unmounting them.
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
Noth
n00b
n00b


Joined: 08 Jan 2003
Posts: 74
Location: Finland/Arizona/NewJersey

PostPosted: Fri Apr 09, 2004 6:09 pm    Post subject: Reply with quote

Stanley56 wrote:
you can make partitions larger without unmounting them.


That depends on the format of the partition. http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html

ext3 must be unmounted. (unless kernel is properly patched with the ext2online patch)
XFS, JFS, must be mounted
Reiser can be either.
_________________
!!!teG I sdrawkcaB eroM ehT oG I sdrawroF eroM ehT
Back to top
View user's profile Send private message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Sat Apr 10, 2004 11:09 am    Post subject: Reply with quote

only use ext3 for /boot
all the rest:
linux -> reiserfs
win -> fat32
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
Gherald2
Guru
Guru


Joined: 02 Jul 2003
Posts: 326
Location: Madison, WI USA

PostPosted: Sat Apr 10, 2004 6:58 pm    Post subject: Reply with quote

NTFS for winxp sys and programs ...?
Back to top
View user's profile Send private message
Stanley56
n00b
n00b


Joined: 07 Jan 2004
Posts: 65
Location: Belgium

PostPosted: Sun Apr 11, 2004 5:30 pm    Post subject: Reply with quote

no thanks
_________________
"In a world without fences, who needs gates?" :D
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sun Apr 11, 2004 5:48 pm    Post subject: Reply with quote

Noth wrote:
If you want to go with SELinux then you will have to use reiserfs4 or it will not work.

Why? selinux works just dandy with ext3, or do you mean it's necesarry in combination with lvm/raid?
Back to top
View user's profile Send private message
Noth
n00b
n00b


Joined: 08 Jan 2003
Posts: 74
Location: Finland/Arizona/NewJersey

PostPosted: Sun Apr 11, 2004 8:29 pm    Post subject: Reply with quote

nixnut wrote:
Noth wrote:
If you want to go with SELinux then you will have to use reiserfs4 or it will not work.

Why? selinux works just dandy with ext3, or do you mean it's necesarry in combination with lvm/raid?


Yes your right, I should have been clearer. Versions of Reiserfs <4 are incompatable with SELinux. There is no room for the file system security bits. (So I've been told...)
Ext3 is fine, and I belive xfs works as well.

SELinux should be indeffernt to LVM or RAID.
_________________
!!!teG I sdrawkcaB eroM ehT oG I sdrawroF eroM ehT
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum