How To: Partition your Hard Drive.

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Postby marcus0263 on Thu Feb 15, 2007 9:48 pm

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
marcus0263
Level 4
Level 4
 
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Linux Mint is funded by ads and donations.
 

Postby kenetics on Thu Feb 15, 2007 11:08 pm

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
kenetics
Level 5
Level 5
 
Posts: 609
Joined: Thu Dec 14, 2006 9:57 pm
Location: Somewhere on a Florida beach

Postby mintero on Sun Feb 18, 2007 8:12 am

That' s my partionning scheme:

hda1 partition for testing distros
hda2 / (mint)
hda3 swap
hda4 /home/<user>/storage with options: nodev, noexec,nosuid

In the storage partition there are the folders of multimedia, system backups, Archives and generally anything that doesnt need backup

Every evening the program sbackup backups automatically /home and /etc in the storage partition.

I know that more partitions means more security, but I love simplicity. Do you think it is a secure scheme? What could be a possible danger?
I dont talk about dangers which could happen 1/ 1000 and could be fixed by reinstalling the system, but about real dangers that is lost or modification of data, manipulation by hackers etc
Any comment is welcome :)
LinuxMint Bea
mintero
Level 2
Level 2
 
Posts: 60
Joined: Fri Feb 16, 2007 2:22 pm

Postby Lolo Uila on Sat May 26, 2007 4:08 pm

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
User avatar
Lolo Uila
Level 5
Level 5
 
Posts: 547
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby scorp123 on Sat May 26, 2007 5:02 pm

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
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby marcus0263 on Sat May 26, 2007 5:09 pm

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
marcus0263
Level 4
Level 4
 
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby Lolo Uila on Sat May 26, 2007 10:14 pm

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
Lolo Uila
Level 5
Level 5
 
Posts: 547
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby marcus0263 on Sat May 26, 2007 10:22 pm

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
marcus0263
Level 4
Level 4
 
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby Lolo Uila on Sat May 26, 2007 10:40 pm

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
Lolo Uila
Level 5
Level 5
 
Posts: 547
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby marcus0263 on Sat May 26, 2007 11:24 pm

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
marcus0263
Level 4
Level 4
 
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby Lolo Uila on Sun May 27, 2007 8:11 pm

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
Lolo Uila
Level 5
Level 5
 
Posts: 547
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby marcus0263 on Sun May 27, 2007 9:51 pm

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
User avatar
marcus0263
Level 4
Level 4
 
Posts: 361
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby flyhippo on Sat Jun 23, 2007 9:18 am

Hello... Totally newbie linux here :)

I decided to migrate from dark side to this light/good side heheh...

Anyway I got a question about this partition, thank you for all discussion from page 1-4 I learn a lot from your partition clear explanation, from some questions and answers and from other problems. So I now I understand a bit about linux partition.

Now I have a question regarding this partition, I read an article from: http://linuxgazette.net/102/piszcz.html (tested 2004) regarding Benchmarking Filesystems.

In conclusion they said that the best journaling file system to choose based upon these results would be: JFS, ReiserFS or XFS

Is this true? is the JFS reliable and good? I read that scorp123 recommend XFS or EXT3.

Do I have to really understand about this FileSystems? Or I just need to know that XFS is the best file systems. If I do need to learn about file systems and why they are important, could you point me to a site where I can learn more about file systems?

Also a bit out of topic: If I want to use windows running as well (since I need to run some windows softwares like filemaker, ms Project, etc) what is the best solution for me.
Therefore dual boot is not the option since I have to log out one OS then login to other OS.

Thank you :)

Dani
flyhippo
Level 1
Level 1
 
Posts: 4
Joined: Sat Jun 23, 2007 8:59 am

Postby scorp123 on Sat Jun 23, 2007 1:03 pm

flyhippo wrote: I read that scorp123 recommend XFS or EXT3.
If in doubt use Ext3 ... It just works and is a good overall performer for every-day use. Those benchmarks are to be taken "cum grano salis" ... Unless you do some really special stuff (e.g. storage of tons and tons and tons of extremely large files ... for which XFS would be best) you won't even notice any significant speed difference in your every-day usage of your computer.

flyhippo wrote: Or I just need to know that XFS is the best file systems.
There is no such thing like a "best" filesystem. What is "best" or not highly depends on what you do with your system and how the filesystem can handle that. Generally people say that XFS is best when dealing with tons and tons of really huge files (e.g. 1000 DVD *.iso images, each beyond 4 GB in size ...) ... but if you don't have so many huge files, then XFS isn't necessarily the best choice for you.

As I said ... If you are in doubt: Use Ext3 ... it just works. 8)

flyhippo wrote: If I want to use windows running as well (since I need to run some windows softwares like filemaker, ms Project, etc) what is the best solution for me. Therefore dual boot is not the option since I have to log out one OS then login to other OS.
VMware Server ... it's available via Canonical's "commercial" repos and can easily be installed via apt-get install vmware-server ... or in GUI via Synaptic.
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby flyhippo on Wed Jul 18, 2007 1:46 am

I decided to use dual boot windows and ubuntu.

But I am confused now with the partition.

I am using Dell 6400 with Media Direct and I did Install windows.

So this is my partition

Dell Utility 47 MB (Primary)
Windows 15 GB (Primary)
Empty For Linux 30 GB
Storage 27 GB (Logical)
MediaDirect 2 GB (Logical)

So I tried to install linux in 30 GB drive, but when I start to do partition it will only allow me to use 1 primary partition only then the rest have to be in Logical.

Is there any way to do this? What do I need to put in primary? /boot or / ?

Thank you.
flyhippo
Level 1
Level 1
 
Posts: 4
Joined: Sat Jun 23, 2007 8:59 am

Postby linuxviolin on Thu Jul 26, 2007 6:32 pm

Personally I would say to you not to be bored, for a home user use simply 1 partition for / (about 10 GB should be enough) and 1 for /home, both in ext3.

For swap use 1 GB maximum and I recommend to you to lower the swappiness (that depends on your memory):

"The use of the swap memory by default on Kernel 2.6.xx is set to 60% that means that the system will use intensively the swap memory. This sounds good if we have a small amount of memory (around 512MB or less) and lot of load on our PC especially if it is working as server. But if we have plenty of RAM (at least 1GB), as I do which is 2GB, and we are using our PC as desktop machine for daily use, we can change the percentage of swap to be utilized. This setting will increase the performance of Linux experience." (Vichar Bhatt)

Run at the CLI, as root:

cat /proc/sys/vm/swappiness

You should see 60. Now change it to 10 (or even 0 as I did it, adapt according to your system, test):

sysctl -w vm.swappiness=10

Now is time to work for some minutes with some applications if you see that is better, you can make the changes permanent, adding this line at the end of /etc/sysctl.conf:

vm.swappiness=10
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Postby msgnomer on Fri Aug 03, 2007 1:18 am

I'm thinking of wiping my drives and starting fresh (with no Windows partition! All Mint). Does this setup seem okay?

HDA 160 GB
hda1 /home (rest of disk)
hda2 /swap 3 GB (1.75 GB RAM)

HDB 120 GB
hdb1 /boot 150 MB
hdb2 / 5 GB
hdb3 extended partition to end
hdb5 /usr 20 GB
hdb6 /var 5 GB
hdb7 /tmp 2 GB
hdb8 /VMs (rest of disk) <- virtual box machine space (not sure I can actually do this. They may have to go in /home?)

I also have a 160 GB external USB drive in 2 partitions (NTFS & FAT32 at the moment) for storage (photos, music, etc). I intend to switch those over to be a backup for /home and the VMs, maybe.

BIOS is already set to boot hdb first.

What say you?
Jess
msgnomer
Level 2
Level 2
 
Posts: 59
Joined: Sun Jul 15, 2007 3:22 pm
Location: NY, USA

Postby scorp123 on Fri Aug 03, 2007 4:07 am

msgnomer wrote: HDB 120 GB
hdb1 /boot 150 MB
hdb2 / 5 GB
hdb3 extended partition to end
hdb5 /usr 20 GB
hdb6 /var 5 GB
hdb7 /tmp 2 GB
hdb8 /VMs (rest of disk) <- virtual box machine space (not sure I can actually do this. They may have to go in /home?)
/usr appears a little bit too large in my opinion, 10 GB would most likely suffice too and you'd still have plenty of space. /var is a bit large too with 5 GB ... but depending on what you intend to do with this machine (maybe you'll get plenty of log files?) it's maybe not a bad idea to make it this large. As for your /VMs ... you can do it if you do it right. E.g. you could create sub-directories underneath /VMs and then give those sub-directories to each user on your system. Example:
Code: Select all
sudo mkdir /VMs/user1
sudo mkdir /VMs/user2
...
sudo chown -R user1:user1sgroup /VMs/user1
sudo chown -R user2:user2sgroup /VMs/user2
Then, inside each user's /home directory the normal users could create a symbolic link to their sub-directory underneath /VMs, e.g. for "user1":
Code: Select all
cd /home/user1
ln -s /VMs/user1 ./my-virtual-machines
So the directory /VMs/user1 appears as /home/user1/my-virtual-machines in user1's home directory; so "user1" would not have to search on the disks, e.g. "OH man ... where the hell did I put that VMware image yesterday?? And where did my VirtualBox images go?" ==> now it would be easily accessible underneath your home directory, despite in fact being on a different disk partition (which is good BTW: Avoids fragmentation and helps the disk performance; and in case something goes terribly wrong it hopefully won't affect /home directly!).

Hope this was useful ....

msgnomer wrote: BIOS is already set to boot hdb first.
OK then. Otherwise I'd suggest to swap the Master/Slave setup but changing the boot order should work too.
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby msgnomer on Fri Aug 03, 2007 10:11 am

Thanks much!

So taking /usr down to 10 GB and /var down to 2 GB or so would be okay? It's just a desktop system with one user.
Jess
msgnomer
Level 2
Level 2
 
Posts: 59
Joined: Sun Jul 15, 2007 3:22 pm
Location: NY, USA

Postby linuxviolin on Fri Aug 03, 2007 11:37 am

msgnomer wrote:It's just a desktop system with one user.


Again personally I would say to you not to be bored to do as many different partitions and just to make / and /home (maybe /boot if you really want it). That is completely sufficient. It is just a personal opinion.

{scorp123, do not strike me! :lol:}

msgnomer wrote:hda2 /swap 3 GB (1.75 GB RAM)


I guess 3 GB seems excessive to me. 1 GB is sufficient:

http://www.extremetech.com/article2/0,1697,2114123,00.asp

"There is an old rule-of-thumb about the amount of swap space. The conventional wisdom says that you should have twice as much swap as RAM. A computer with 256 MB of RAM should start with 512 MB of swap. Although this is a good idea for memory limited systems, it isn't practical for high-end home user systems. If you have 1 GB of RAM, then you probably will never need swap space—and you are very unlikely to need 2 GB of swap unless you are planning on doing video editing or audio composition."

Personally I have 1 GB RAM and a 1 GB swap partition with swappiness at 0 (see my post above) with no problem. I am a simple desktop user. :)
Last edited by linuxviolin on Fri Aug 03, 2007 12:22 pm, edited 1 time in total.
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 16 guests