How To: Partition your Hard Drive.

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

scorp123 wrote:
marcus0263 wrote: I've been using Reiser for a few years and have never had a problem, it's pretty stable.
You were just lucky :wink:
marcus0263 wrote: SuSE uses it along with a few other distro's as their default FS.
I always change it to ext3 or XFS. It was exactly on one of my SUSE servers where I once had a really bad crash. I never quite understood why it happened, it just came out of the blue. That day I lost 500 GB of data. Thank you Hans Reiser ... :evil: And besides: Novell/SUSE have dropped ReiserFS as their default filesystem! If you check their wikis and mailing lists they even advise against using it because of the increasing amount of strange stories where people like me lost gigabytes of data due to ReiserFS doing strange things ...

Thank the Gods I had a backup somewhere that day ... But for me ReiserFS is dead. I've heard other horror stories from other admin colleagues who had a similar bad experience. It appears that if your machine goes beyond a certain workload (as it could happen on a server!!) ReiserFS has the tendency to cripple its filesytems all of sudden. You get I/O read errors, you reboot, hoping that a fsck will fix the problem .... and BLAMMMO! your data is gone.

No thanks. If I wanted to lose data without apparent reason I'd be using Windoze. :wink:
So far no problems, but if I was to go with another FS I'd use XFS.

But I've everything backed up to where all that I'd need to do is slice up the drives, extract the tarball then install grub. Simple recovery if needed.

But for server, I'd use XFS or what ever fit the bill.
User avatar
kenetics
Level 5
Level 5
Posts: 737
Joined: Thu Dec 14, 2006 9:57 pm
Location: Fort Lonesome, Florida
Contact:

Post by kenetics »

Scorp wrote:
/dev/hda1 -- 15 GB openSUSE 10.2, containing everything but /home
/dev/hda2 -- 15 GB Fedora Core 6, containing everything but /home
/dev/hda3 -- 15 GB Linux Mint, containing everything but /home
/dev/hda4 -- extended partition, from here to the end of the HD
/dev/hda5 -- ca. 75-78 GB shared /home between all three distros (user names could nontheless be different between the three; having the same user name on all three may create new problems eg. with incompatible settings in GNOME and KDE ... with the help of symbolic links stuff like documents, browser settings, etc. could still be shared easily between all three distros and user accounts!) ...Very important: Make sure you only format this partition the first time (e.g. during the installation of the first Linux distro you want to use) and then don't format it in all subsequent installations! Wink Or else: bye bye oh beloved files, bye bye browser settings, bye bye e-mails ... Wink
/dev/hda9 -- swap, whatever is left of the harddisk (e.g. 2 GB)
Following the above scheme, I used GParted to delete existing partitions, add and resize. I could not change the name of the existing extended partition, which is /dev/hda2. Does it matter? If so, how does one change partition names?

I wound up with:
/dev/hda1 -- 15 GB
/dev/hda3 -- 15 GB
/dev/hda4 -- 18 GB
/dev/hda2 -- extended partition, from here to the end of the HD
/dev/hda6 -- 62 GB shared /home
/dev/hda5 -- 2 GB swap
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

kenetics wrote:Following the above scheme, I used GParted to delete existing partitions
It would be better if you deleted everything (if this is possible) and started from scratch. Having your partition numbers messed up could create problems later on. Maybe not tomorrow, maybe not next week, maybe not even next year. But one day it could. All it takes is a broken installer (e.g. the one from a Linux distro that you will want to try out in two years??) that messes up about the partition numberings or their order on the disk ... :wink: Been there, seen it happen :?

So it would be better to have everything tidy and in the right order. 8)
User avatar
kenetics
Level 5
Level 5
Posts: 737
Joined: Thu Dec 14, 2006 9:57 pm
Location: Fort Lonesome, Florida
Contact:

Post by kenetics »

I managed to redo my partitions and got them in proper order. I mounted Mint / on: /dev/hda1 but the install program wouldn't let me leave /hda2 & /hda3 unmounted, So I mounted /usr & /var on them. Now, there's data in those partitions (I guess its done automatically) and I can't install other distros without messing up Mint. I guess I can uninstall Mint but I would be left with the same problem on a re-install. Can that data be moved to the root partition? Thanks again,

Ken
User avatar
kenetics
Level 5
Level 5
Posts: 737
Joined: Thu Dec 14, 2006 9:57 pm
Location: Fort Lonesome, Florida
Contact:

Post by kenetics »

I think I'll just delete /dev/hda1,2 & 3 and recreate hda1, reinstall Mint on hda1 and partition hda2 & 3 as needed. That should not interfere with the other partitions numbering. Does that sound logical?
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

kenetics wrote:I think I'll just delete /dev/hda1,2 & 3 and recreate hda1, reinstall Mint on hda1 and partition hda2 & 3 as needed. That should not interfere with the other partitions numbering. Does that sound logical?
Best advice is to have at least the minimum number of file systems of

/boot
/
/home
User avatar
kenetics
Level 5
Level 5
Posts: 737
Joined: Thu Dec 14, 2006 9:57 pm
Location: Fort Lonesome, Florida
Contact:

Post by kenetics »

What puzzles me is that when I installed Bea, I let it automatically partition the drive and it left me some partitions unmounted. But when I create the partitions manually, it wont let me install Mint and leave unmounted partitions. Just doesn't make sense to me, but then a lot of things don't! :o
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

kenetics wrote:What puzzles me is that when I installed Bea, I let it automatically partition the drive and it left me some partitions unmounted. But when I create the partitions manually, it wont let me install Mint and leave unmounted partitions. Just doesn't make sense to me, but then a lot of things don't! :o
Interesting, I don't think I've seen that. I've never had an issue with unmounted file systems.

BTW I never do the "automatic", it's usually pretty ugly.
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

marcus0263 wrote:BTW I never do the "automatic", it's usually pretty ugly.
Oh yes. Better to do it manually ...
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

At the bare minimum you always want

/boot (I usually got with about 128 Meg, more than sufficient)
/ (10-12 Gig is fine)
/home (the rest)

Also for security reasons in fstab I also have /boot with "noauto", you should only have /boot mounted in a running system if you're upgrading or building a new kernel.

I myself have /var on it's own slice also, but for n00b's the above is good to go till they get more of a feel for Linux.
User avatar
kenetics
Level 5
Level 5
Posts: 737
Joined: Thu Dec 14, 2006 9:57 pm
Location: Fort Lonesome, Florida
Contact:

Post by kenetics »

Hey crusti, thanks for the information. I will give it a try when I install the Bianca final version.

I've learned a lot about partitioning the last week or two, with some help from the posters here, especially Scorp and marcus. So a big thanks for all your help!
User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Post by Lolo Uila »

What about /tmp? I'm trying to learn about Linux partitioning and besides the /usr and /var partitions I've seen a few articles suggesting /tmp should be on it's own as well (since it gets written to alot).

And if you are going to experiment with different distros, how does that affect a system with /usr & /var on sepparate partitions? Do those also get shared between distros (like /home), or would you need a set of those for each distro?

Thanks. I'm getting ready to deploy Mint on one of my main computers and I'd like to do it "right" so I don't have to redo anything later.

Aloha, Tim
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

Lolo Uila wrote: What about /tmp? I'm trying to learn about Linux partitioning and besides the /usr and /var partitions I've seen a few articles suggesting /tmp should be on it's own as well (since it gets written to alot).
Yes, I did that once on a server that really got heavy traffic.
Lolo Uila wrote: And if you are going to experiment with different distros, how does that affect a system with /usr & /var on sepparate partitions? Do those also get shared between distros (like /home), or would you need a set of those for each distro?
You can't share those partitions ... they would get into each others way pretty soon. What can be done though is to share e.g. /opt or mount points containing e.g. your web site or other stuff that the package management of each distro won't care about.

If you want to have multiple distros on the same computer you have these options:

- put each distro into it's own partition
- put each distro into it's own partition, but share /home between them
- create an elaborate UNIX-style partitioning scheme for one distro (e.g. the one you expect to use the most or the one you want to expose to heavy workloads ...), place the others into their own single partition, share /home between them

- use multiple large harddisks and create elaborate partitioning schemes for all the distros you want to use. You could probably place 3-4 distros like that on 2-3 very large harddisks ... and still add more distros which you place into single partitions.

A friend of mine had Windows + 8 different Linux distros + some form of BeOS (YellowTab "Zeta OS") on one single machine ... a pretty weird setup!!! :?

:wink:
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

Lolo Uila wrote:What about /tmp? I'm trying to learn about Linux partitioning and besides the /usr and /var partitions I've seen a few articles suggesting /tmp should be on it's own as well (since it gets written to alot).

And if you are going to experiment with different distros, how does that affect a system with /usr & /var on sepparate partitions? Do those also get shared between distros (like /home), or would you need a set of those for each distro?

Thanks. I'm getting ready to deploy Mint on one of my main computers and I'd like to do it "right" so I don't have to redo anything later.

Aloha, Tim
Howzit Brudda -


I wouldn't worry about /var/tmp unless it's a server, here's what I'd recommend for the minimum

/boot 64 Meg
/ 8-10 Gig
/home Everything else

What I myself run is

/boot 64 Meg
/ 8 Gig
/opt 2 Gig
/var 3 Gig
/home Everything else

Also I have another drive that I put my swap file on and slice it up for

/home/Video
/home/Music

It's good to have /var on it's own slice due to log's and tmp


You know da kind ;-)
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Post by Lolo Uila »

Okay, thanks for the info.

I'm still not clear on why it's recommended to put /boot in a separate partition. The rest makes sense, but it seems to me something that small that gets written to infrequently should not have much of a fragmentation risk (and wouldn't be much of a problem if it happened), so why is it bad to just let /boot be part of / ?

Again, thanks for all the help.

Aloha, Tim

PS: and Marcus, it's Da kine... :cool:
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

Lolo Uila wrote:Okay, thanks for the info.

I'm still not clear on why it's recommended to put /boot in a separate partition. The rest makes sense, but it seems to me something that small that gets written to infrequently should not have much of a fragmentation risk (and wouldn't be much of a problem if it happened), so why is it bad to just let /boot be part of / ?

Again, thanks for all the help.

Aloha, Tim

PS: and Marcus, it's Da kine... :cool:
Having a /boot partition is for two reasons, one for security and also that's where your kernel and boot info is stored. So you want to keep it safe from possible corruption, etc.

Yeah, been a few years since I lived over there. I lived in Kialua and Kanehoe, miss the hell out of it you know! I still get cravings for Boiled Peanuts and an Ahi or Teri Beef plate ;-(
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Post by Lolo Uila »

Okay, thanks.

I'm from Kailua originally. I live in Kapolei now. Couldn't afford a house in Kailua. Too expensive! My mortgage in Kapolei in less than I used to pay for rent in Kailua.

Aloha, Tim
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

Lolo Uila wrote:Okay, thanks.

I'm from Kailua originally. I live in Kapolei now. Couldn't afford a house in Kailua. Too expensive! My mortgage in Kapolei in less than I used to pay for rent in Kailua.

Aloha, Tim
One note, I do recommend setting /boot not to mount by default. You would only want to mount it when upgrading the kernel. Here's a copy of my fstab on my Bianca VMware image

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> 			<mount point>   <type>     <options>       	<dump>  <pass>
proc            			/proc           proc        defaults        	0 0
# /dev/sda3
UUID=2a71a794-f8c5-41bb-9b57-5d9370f24f27 /             reiserfs    noatime,notail	 0 1
# /dev/sda1
UUID=8419bbab-b9a1-48b3-8eda-eeccda467e33 /boot     ext2        noauto        	     1 1
# /dev/sda4
UUID=68e72803-e617-4ba1-8762-b2c1080ec301 /home   reiserfs    noatime,notail	0 2
# /dev/sda2
UUID=29c2b2cd-8261-4485-9d60-6d9e6cac1b40 none      swap        sw              	0 0
/dev/hdc        			/media/cdrom0  	udf,iso9660 user,noauto     	0 0
/dev/           			/media/floppy0  auto        rw,user,noauto  	0 0
So you're on the Ewa side eh? I hope you don't have to commute to the Windward side for work. But then again I left before the H3 was finished. Yeah when I was there the houses in Kialua were way to expensive even then, no way I could afford to buy.

MMMMM I still have dreams of Shave Ice though ;-)
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Post by Lolo Uila »

I'm putting Cassandra on a separate 80GB drive in the big tower system. Decided to go with the following partition scheme:

4GB /dev/sda1 ext3 / (primary partition)
6GB /dev/sda5 ext3 /usr (extended partition)
63G /dev/sda6 ext3 /home
3GB /dev/sda7 ext3 /var
2GB /dev/sda8 swap

I'll see how this works out. The tower is dual booting with Win2K and has a LOT more storage available (over 1.5TB currently). Hopefully I can get get most of what I need to do running under Linux, and then I will have to give it some more room.

Any comment, criticisms or suggestions on this partitioning scheme will be appreciated. I haven't installed a lot of stuff yet, so there is still time to change things if there is a compelling need.

Thanks! Tim
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

Lolo Uila wrote:I'm putting Cassandra on a separate 80GB drive in the big tower system. Decided to go with the following partition scheme:

4GB /dev/sda1 ext3 / (primary partition)
6GB /dev/sda5 ext3 /usr (extended partition)
63G /dev/sda6 ext3 /home
3GB /dev/sda7 ext3 /var
2GB /dev/sda8 swap

I'll see how this works out. The tower is dual booting with Win2K and has a LOT more storage available (over 1.5TB currently). Hopefully I can get get most of what I need to do running under Linux, and then I will have to give it some more room.

Any comment, criticisms or suggestions on this partitioning scheme will be appreciated. I haven't installed a lot of stuff yet, so there is still time to change things if there is a compelling need.

Thanks! Tim
You don't have a slice for /boot
put /home and swap on another physical drive if you can
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
Post Reply

Return to “Tutorials”