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 Husse on Mon Aug 13, 2007 7:33 am

Poor scorp :)
I'll give you cred :):)
Even if I don't think it is a copy :lol:
But you gave me that copy command :lol:
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Linux Mint is funded by ads and donations.
 

Postby nelamvr6 on Mon Aug 13, 2007 8:59 am

Well I appreciate it Scorp, and I'll give you cred too! :D
nelamvr6
Level 4
Level 4
 
Posts: 323
Joined: Sun Jul 08, 2007 8:14 pm
Location: New London, CT USA

Postby ElEdwards on Mon Aug 13, 2007 9:17 am

Scorp, you've been more help to me than you'll ever realize!! :)
ElEdwards
Level 3
Level 3
 
Posts: 116
Joined: Mon Jul 09, 2007 10:58 pm

Postby Lolo Uila on Fri Aug 31, 2007 10:49 pm

I'm ready to allocate some more space for Linux on my big tower system. I'm currently using a single 80GB drive for Linux, which I will probably still keep for /home, but I'd like to use some of the other drives for space-hungry things like music and video files (the tower has 6 drives totaling 1.5TB of storage).

I've seen talk about creating mount points (partitions) like /home/Videos or /home/Music, but would a /home/Videos mount point automatically be used as storage for things saved to my /home/Videos folder (which is actually /home/trp/Videos in the Linux file system)?

If not (as I suspect) what needs to be done to accomplish this?

Would creating a /home/trp/Videos mount point do it?

I figure I could do it with sim-links. Could fstab be modified for the same result?

Any other way to accomplish this?

Trying to examine my options here and learn a little more, so I appreciate any info and suggestions.

Aloha, Tim

FYI: Current system
80 GB Linux drive (75G actual capacity)
Primary partition
2 GB /
Extended Partition
8 GB /usr
60 GB /home
3 GB /var
2 GB /swap

I'm planning on repartitioning two 320 GB SATA drives (298 GB actual) something like below, but I'd also like to make room for my Linux Music, Videos and Downloads folders in here somewhere.

SATA-1 (Windows boot drive)
36 GB NTFS Windows boot
2 GB Linux /swap
260 GB NTFS Windows data

SATA-2 (Linux boot drive)
2 GB /
16 GB /usr
4 GB /opt
4 GB /var
2 GB /tmp
270GB NTFS Windows data

and I will expand the /home partition to fill the 80G drive.
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 Sep 01, 2007 3:18 am

Lolo Uila wrote:I figure I could do it with sim-links.
I do the exactly same thing here.

I have a /home directory .... and somewhere there is a /data directory. Inside /data there is a directory called after my username which fully belongs to me (it has the same permissions as my home directory), and then underneath it I have directories such as 'Movies', 'Music', 'Photos', and so on.

/data
/data/scorp
/data/scorp/Movies
/data/scorp/Music
/data/scorp/Photos

...

Now, how does that stuff get into my $HOME directory? Sym-Links!

Inside my /home I have this:

/home
/home/scorp
/home/scorp/Documents
/home/scorp/Documents/Movies => /data/scorp/Movies
/home/scorp/Documents/Music => /data/scorp/Music
/home/scorp/Documents/Photos => /data/scorp/Photos

...

So your diskspace-hungry files can absolutely be on another disk partition, that's no problem. Just place your stuff on another mount point inside a directory which 100% belongs to you (not the mount point itself!) and then sym-link to it.
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby Lolo Uila on Sun Sep 02, 2007 4:31 pm

Is there a tool that can convert my home partition to primary (from logical) and resize it to fill the entire drive? I was looking through the parted manual and it doesn't appear that parted can do that.

I have Partition Magic, but it doesn't support the current version of ext3.
User avatar
Lolo Uila
Level 5
Level 5
 
Posts: 547
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby Husse on Sun Sep 02, 2007 5:23 pm

Don't think so but if you want to use the drive entirely for /home it does not have to be a primary. You could just remove the rest and resize the logical to fit (almost) the entire drive (I think) This would however be a bit dangerous as you could loose data in the process
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Postby Lolo Uila on Sun Sep 02, 2007 9:32 pm

Yea, I figure I'll just have to brute-force it (backup, repartition, restore, edit fstab). I suppose another option would be to convert back to ext2 and see what Partition Magic can do, then convert to ext3 again when finished (but that may be more trouble than it's worth).

Anyway... I already have backups of both my Windows & Linux drives, so I won't lose anything if something goes wrong. I did a full partition backup last week when I tried to get Linux running on an Intel RAID-0 array. The Linux part went okay, and wasn't even all that difficult. I had Mint booting off of the RAID volume with home in its original partition on my 80G drive. Grub wouldn't boot into my Windows 2000 install, though. Error-15 if I remember right. Googled around and tried everything suggested and just couldn't get Windows booting. Finally gave up and did a partition restore and went back to using the BIOS to change the boot order.

So today I was getting ready to just get rid of the RAID volume and run the drives individually, when I started wondering if something might have been wrong with the MBR of the RAID stripe... Partition Magic couldn't read it (bad MBR), but all of my other software could. At first that made me think it was just a PM issue, but after the grub problems I wasn't so sure.

Since I had partition backups of my 2 boot drives, I decided to just blow the RAID volume partitions away completely and use Partition Magic to set them up again. That went well. I set up my Windows boot partition, along with /, /usr, /var and swap for Linux, and 2 more NTFS data volumes to use up the rest of the space. Then I restored my Windows boot partition from the backup and booted my Mint live CD. From the live CD I reinstalled Mint to the RAID volume (using the dmraid software), and after going through the little contortions needed to get grub installed on the RAID volume I rebooted, and it WORKS! :) I can now dual-boot Mint & Win2K with grub from my Intel SATA RAID volume.

I'm probably still going to get rid of the RAID, but I'm gonna keep it for a week or so and see if I can really notice a worthwhile performance boost. First impression is that boot times are faster, but not dramatically so. Shutdown, however, is super-fast!

Thanks again to everyone helping out here! I have learned a great deal and gained a lot of confidence in Linux, and the helpful people here are largely responsible for that. This really is a great community.

Aloha, Tim
User avatar
Lolo Uila
Level 5
Level 5
 
Posts: 547
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Postby Husse on Mon Sep 03, 2007 6:07 am

Interesting....
Unfortunately all (?) raid on consumer mobos is not hardware raid but some mix of soft- and hardware
You get a performance boost from RAID0 but not much (I have tested)
But what you really get is a total loss of data if the raid goes down
But thumbs up for backups :lol:
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Postby subgeniusd on Wed Sep 05, 2007 10:23 am

Hello people- I picked up a Linux Mag last week that included the Bianca live cd. Browsing WikiMint then this forum thread has been quite interesting. I used some of the suggestions for custom install/partitioning and am very pleased with the results.

I understand some of the objections regarding the default installer which might be confusing to a new Linux user who would have no idea what "hda" means much less what swap is. Making this thread sticky was a great idea.


If you think the Mint default is inadequate take a look at this Xandros 4.0 default partition table. At least Mint default puts swap in an extended partition. No wonder Xandros is a "bit" sluggish!!


IDE1 37.26Gb
Primary (hda1) linux-swap 360Mb
Primary (hda2) ReiserFs 36.91Gb /

Thanks to scorp123 and Husse and the rest.

I've only used a few distros with KDE and Xfce and don't understand this User = Root situation but I'll look elsewhere. Thanks again. D.
subgeniusd
Level 1
Level 1
 
Posts: 1
Joined: Wed Sep 05, 2007 9:07 am
Location: Atlanta,Georgia

Postby Wh1sper on Sat Sep 08, 2007 4:24 am

scorp123 wrote:I'd stay away from ReiserFS ... It crashed several times on me and took all the data with it to Nirvana. If you want reliability I'd go with ext3 or XFS.

Me too. 2 times Reiserfs 3 has blow up the root filesystem. Parts of the open systemfiles like some init.d scripts where part of the directory.
Not funny! and all the wondertools to repair are absolutly useless and make it harm more and more.
(the cause was not found. there was no crash but only init 6)
So I for myself use only extfs3, in future maybe exfs4
Mein Blog fuer Nerten und Linux Strategen http://zockertown.de/s9y/
Wh1sper
Level 2
Level 2
 
Posts: 70
Joined: Sun May 20, 2007 7:38 am
Location: Germany

Postby Wh1sper on Sat Sep 08, 2007 4:41 am

I do not want to enter discussion about to partion the disk(s).
Just giving my thought. I am using this:

/ 10 Gig
/usr/local/ 45 Gig
/home 45 Gig
swap

Why /usr/local ?
I do not want install big games again and again after reinstall
I place my self made stuff always in /usr/loca/bin
why /home ? This is anwered more then one time.

why no /boot? I am using grub, so why?
why not /tmp /var ... because, this is my personal computer, no need for this and for not having lvm this is a very effective way to waste space.
And more partitions = more trouble :)

If possible I am using lvm, which I am greatly miss by default at linuxmint.
debian etch is doing this much better
(btw. I am working for a very large company, too I'm dealing with a sun cluster, there is be a use for /opt /serv /var ... but at home I have a fileserver with nfs... :)
Mein Blog fuer Nerten und Linux Strategen http://zockertown.de/s9y/
Wh1sper
Level 2
Level 2
 
Posts: 70
Joined: Sun May 20, 2007 7:38 am
Location: Germany

Re: How To: Partition your Hard Drive.

Postby immyls on Thu Mar 20, 2008 6:47 pm

Along the lines of how to partition:

Can you mount multiple drives to the same mount point? ie. hda3 mounted to /home and also hdb1 mounted to /home?
immyls
 

Re: How To: Partition your Hard Drive.

Postby Fred on Thu Mar 20, 2008 10:31 pm

immyls,

More accurately, you mount partitions, not physical drives. If the partition includes the entire drive then yes, you have also mounted the drive. There are some storage system setups that include more than one drive in a partition also. But what you mount is the partition.

You can mount a partition within the file system. For an example. Let's say you have a partition, sda5, that has music on it. Also, let's say you have a partition, sda6, that has pictures on it. You could make a folder in /home/Your_username called Music. And another called Pictures. Then mount sda5 to /home/Your_username/Music and sda6 to /home/Your_username/Pictures. You would then have a folder in your /home that would be called Music that would contain all your music on sda5 and another folder in your /home that would contain all your pictures on sda6.

Hope that answers your question.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: How To: Partition your Hard Drive.

Postby atlef on Fri Mar 21, 2008 5:25 pm

It is good that I found back to this post, as I just remembered reading it, but couldn't for the love of me figure out where it was.
Thanks for the tips and suggestions made here. It has made my computing a little less of a hassle when I do upgrades/reinstalls and installs every so often.

Here is my set-up as fdisk -l sees it.

fdisk -l says wrote:$ sudo fdisk -l /dev/sda

Disk /dev/sda: 320.0 GB, 320072933376 bytes
240 heads, 63 sectors/track, 41345 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0xed3eed3e

Device Boot Start End Blocks Id System
/dev/sda1 * 1 35 264568+ 7 HPFS/NTFS vista's (/boot)
/dev/sda2 36 41345 312303600 5 Extended
/dev/sda5 36 7145 53751568+ 7 HPFS/NTFS vista (/) mounted in /media/vista
/dev/sda6 7146 41345 258551968+ 7 HPFS/NTFS other (/usr) mounted in /media/vistabckup

$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe89ce89c

Device Boot Start End Blocks Id System
/dev/sdb1 17 9154 73400985 7 HPFS/NTFS W2 (/home) mounted in /media/vistadoc
/dev/sdb2 * 1 16 128488+ 83 Linux /boot
/dev/sdb3 9155 14593 43688767+ 5 Extended
/dev/sdb5 9155 9652 4000153+ 83 Linux /
/dev/sdb6 9653 10150 4000153+ 83 Linux /usr
/dev/sdb7 10151 10399 2000061 83 Linux /var
/dev/sdb8 10400 14460 32619951 83 Linux /home
/dev/sdb9 14461 14593 1068291 82 Linux swap / Solaris

Partition table entries are not in disk order (I am aware of this one)


atlef.
User avatar
atlef
Level 4
Level 4
 
Posts: 306
Joined: Sun Nov 18, 2007 8:20 am
Location: Stavanger NORWAY

Re: How To: Partition your Hard Drive.

Postby wesireal on Wed Jun 04, 2008 4:13 pm

This thread is titled; How to partition your hard drive. It is everything but............

It is a thread where everyone is looking to prove that his/her partition scheme is better than everybody else's.

PLEASE is there a tutorial that actually teaches one to partition the hard drive and all schemes be damned? :evil:
wesireal
Level 1
Level 1
 
Posts: 26
Joined: Fri Apr 04, 2008 5:42 pm

Re: How To: Partition your Hard Drive.

Postby Husse on Wed Jun 04, 2008 5:58 pm

to partition the hard drive and all schemes be damned?

Theoretically impossible :)
What/how ever you do it is a scheme :)
Take a look at this wiki
http://www.linuxmint.com/wiki/index.php ... _partition
As so often written by yours truly and supposes you dual boot with XP
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How To: Partition your Hard Drive.

Postby wesireal on Wed Jun 04, 2008 7:12 pm

I have already read the wiki.It presents grand schemes and then tell to use Gparted.I have not been able to find a tutorial on how to use gparted, without it I do not know where to begin!!!!!!!!
wesireal
Level 1
Level 1
 
Posts: 26
Joined: Fri Apr 04, 2008 5:42 pm

Re: How To: Partition your Hard Drive.

Postby Fred on Sun Jun 08, 2008 11:53 am

wesireal,

Below is a pretty good How-To for Gparted. There are others if you take the time to Google for them. I have recommended this one before with pretty good results.

http://www.howtoforge.com/partitioning_with_gparted

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: How To: Partition your Hard Drive.

Postby Eric Weir on Wed Jun 11, 2008 3:57 pm

mdd4696 wrote:Anyways, I've used scorp123's post to partition a drive for a small desktop/server running Ubuntu 6.10 with a 200GB drive (pretty much the system he designed his example for).

  • Primary (sda1) ext3 128MiB /boot/
  • Primary (sda2) ext3 4GiB /
  • Extended 182.18GiB (the rest of the drive)
    • Logical (sda5) ext3 8GiB /usr/
    • Logical (sda6) ext3 4GiB /var/
    • Logical (sda7) ext3 168.18GiB /home/
    • Logical (sda8) linux-swap 2GiB swap
Can anyone comment on this partition scheme? Does it seem reasonable?

I'm getting ready to install Mint 5 after having just installed Mint 5RC2, and I'm think of partitioning my drive roughly this way, allowing for difference in the size of the drives.

I have two questions: [1] Why is the swap partition at the end? I've heard it should be at the beginning, so it can be accessed more quickly. [2] I have two drives on my machine. How do I mount the second drive? Or do I leave it unmounted?

Thanks,
Eric Weir
Decatur, GA USA
Linux Mint 5
User avatar
Eric Weir
Level 2
Level 2
 
Posts: 93
Joined: Sat May 31, 2008 3:06 pm
Location: Decatur, GA USA

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 10 guests