LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   1tb hard disk partition (https://www.linuxquestions.org/questions/linux-newbie-8/1tb-hard-disk-partition-805115/)

ekalavya 04-30-2010 03:56 AM

1tb hard disk partition
 
Hi,

I have installed 1tb hard drive and would like to partition as follows:

1) / - 20g
2) /swap - 6G
3) /photos /150g
4) /videos /500g
5) /audio /300g

After 2-3 partition an extended partition automatically created in which i am not able to create specified capacity i.e., say i want 150g of /photos partition, the /videos partition is automatically reduced and a free space at the end appears. Some free space is always there which i am not able to understand. Nevertheless i clicked to create, but i get an error viz. 'device not created'

Does anybody has a clue?

regards,

Ekalavya

pierre2 04-30-2010 05:27 AM

You can't have more than Four Primary partitions ....

a better system would be say :

1) / 10-15Gb - primary
2) /home 50Gb - primary
3) extended - rest of drive
4) /photos /100g - logical
5) /videos /500g - logical
6) /audio /300g - logical
7) /swap - 6G

the 1Tb drive will have around 960Gb of usable space.

David the H. 04-30-2010 05:40 AM

First of all, what program are you using to create the partitions? Can you show us the actual output? Give us some details here.

A disk can only hold a maximum of 4 primary partitions. to divide it up further, one of those primaries has to be designated as an "extended" partition. That extended partition can then hold a larger number of "logical" partitions. There will always be a little overhead involved here, since the logical partitions by definition have to be smaller than the extended partition holding them.

Instead of letting it (whatever "it" is) automatically partition things for you, you might try starting out by manually creating a single extended partition that takes up the whole disk, then divide that into five logical partitions. Or something similar, like the scheme that pierre2 listed above.

By the way, that's a rather big swap space. Unless you have some special need for it, most systems can get by with less than half that.

ekalavya 05-03-2010 11:57 PM

Hi,

I am trying to partition while installing fedora 12.

regards,

Ekalavya

Quote:

Originally Posted by David the H. (Post 3952804)
First of all, what program are you using to create the partitions? Can you show us the actual output? Give us some details here.

A disk can only hold a maximum of 4 primary partitions. to divide it up further, one of those primaries has to be designated as an "extended" partition. That extended partition can then hold a larger number of "logical" partitions. There will always be a little overhead involved here, since the logical partitions by definition have to be smaller than the extended partition holding them.

Instead of letting it (whatever "it" is) automatically partition things for you, you might try starting out by manually creating a single extended partition that takes up the whole disk, then divide that into five logical partitions. Or something similar, like the scheme that pierre2 listed above.

By the way, that's a rather big swap space. Unless you have some special need for it, most systems can get by with less than half that.


ArthurSittler 05-04-2010 05:47 PM

fewer partitions might be better
 
I can offer some lessons learned from my past experiences with lots of partitions. Basically, I came to regret it.

Years ago -- actually, it was decades ago -- I had divided up my drives into a lot of partitions. But, as time went by, some partitions became full, while others remained largely empty. I came to regret having carved up the space so much. I was able to move things around, moving some directories onto other partitions, and remounting some partitions on different mount points. I learned that having a lot of partitions is actually not such a good thing. Now I typically allocate a small partition near the beginning of the drive for /boot, a few gigs at most for swap, and all the rest of the drive as one big happy / partition. I might consider finer granularity if I wanted to run multiple versions of OS, but even then, I might be more inclined to use multiple drives in removable cartridges instead.

With my current machine, which has triple core AMD64 and 4G RAM, I have actually never used any swap. If I implemented suspend instead of shutdown, that might change. But I seem to be limited by CPU or by disk transfer rate with the SATA II drives before I run out of RAM.

ArthurSittler 05-04-2010 06:25 PM

mystery space at end of drive
 
The mysterious space at the end of the drive is caused by the partitions insistence that the drive consists of cylinders with some number of heads and fixed number of sectors per track. The partition table still believes this myth, even though it has not been true for a long time.

Disk drives now use different bit clock rates at different groups of physical cylinders (track zones). This puts more sectors per track on outer tracks and fewer sectors per track on inner tracks to make better use of the longer tracks far away from the spindle. The firmware in the disk drive takes care of the differences as well as buffering the writes and reading ahead on reads with the memory built into the hard drive electronics.

For historical reasons, the size of the numbers used for number of sectors per track and for number of heads is limited. Hard drives actually only have one or two platters with two or four heads these days, not the twelve platters and 24 physical heads used in 1.6" high drives a few years ago. The hard drive makes up some fiction about having more heads and fewer sectors and tracks than what is physically present to satisfy the limitations in the legacy BIOS firmware. That only matters at boot time, but that is what the partition table has to present fiction about. Consequently, there are tracks or parts of tracks at the end of the drive that don't evenly fit with the size of the fictional cylinders used in the BIOS.

However, fdisk gets a different view of the disk drive because the hard drive tells it how much capacity the drive has as a block count. The capacity reported by the drive is also actually fictitious, because the drive reserves some of its capacity so that it can substitute working blocks for blocks on the medium that either never did work reliably or which get damaged by physical scratches, power glitches while accessing the media, and other assorted bit mange over the servce lifetime of the drive unit.

Absent Minded 05-04-2010 06:39 PM

For myself (I use Debian), I create the fallowing partitions:

swap 1.6GB (primary and set as active for using resume from disk features)
/ 20GB (leaves plenty of room for packages and is primary)
/temp 4.5GB (10GB if I happen to have a duallayer DVD recorder and is created in the extended partition used for the rest of the disk)
/var 3GB (15GB or more depending on web services I need for the box and is created in the extended partition)
/home rest of space on drive (created in extended partition)

This is pretty much a standard system partitioning scheme for me. I seperate out /temp simply to make sure that the root partition stays relitively fragment free. In this day and age it probibly doesn't matter where the swap partition is but out of old habbit I still put it at the beginning. Since I am "old school" I still seperate out /var even on my workstations where it really isn't nessary. However it is "commom practice" on servers for various reasons (one being the DoS attack but there are other reasons as well).

pierre2 05-05-2010 06:38 AM

Quote:

I had divided up my drives into a lot of partitions. But, as time went by, some partitions became full, while others remained largely empty. I came to regret having carved up the space so much.
Been there, done that2.

nowadays its usually more like 10Gb for / & 100Gb for /home ( usually has multiple O/Ss using it as /home),
if more than one O/S, it usually is - then each gets a 10Gb / partition.

this box has three O/Ss each has its / in a primary partition, the /home & /swap are in a logical partition.

this setup makes it easy to change / upgrade any of the O/Ss, without losing anything in its /home.


All times are GMT -5. The time now is 12:56 PM.