Until now I used disks divided into eight partitions: two for systems, one for swap, and four for data storage (as well as one extended partition). Each partition was dedicated for some kind of data. When I saw that one of them is on the verge of fill up I removed some superfluous data or moved selected kind of data from full partition to empty one. It was convenient and logical.
Now I stated I waste a lot of disk space. Some data grow slow and some grow fast. On one partition I have 50% of free space and on the other merely 5%. I need to organize anew data on occupied partition while I have a lot of space on another one. So I decided to put all data to one big partition.
I use two machines: first and second. The first has 160 GB SATA HDD and the second -- 80 GB ATA HDD. On the second machine I keep backups of some valid data from the first machine. It's impossible to backup it entirely because the second hard drive is two times smaller then the first. Until now both these machines used the same pattern of partitions.
Now I decided to test new type of partitioning on the second machine.
This is the first machine with original eight partitions:
$ fdisk -l /dev/sda
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
240 heads, 63 sectors/track, 20673 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0xcccdcccd
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1000 7559968+ 83 Linux
/dev/sda2 1001 2000 7560000 83 Linux
/dev/sda3 2001 6600 34776000 83 Linux
/dev/sda4 6601 20673 106391880 5 Extended
/dev/sda5 6601 11200 34775968+ 83 Linux
/dev/sda6 11201 15800 34775968+ 83 Linux
/dev/sda7 15801 20400 34775968+ 83 Linux
/dev/sda8 20401 20673 2063848+ 82 Linux swap
This is the second machine after replacing partitions from 3 to 7 by one huge partition 3:
# fdisk -l /dev/hda
Code:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x3db012b3
Device Boot Start End Blocks Id System
/dev/hda1 1 1025 7748968+ c W95 FAT32 (LBA)
/dev/hda2 1026 2050 7749000 83 Linux
/dev/hda3 2051 10250 61992000 83 Linux
/dev/hda4 10251 10337 657720 82 Linux swap
On all Linux partitions I use Reiser File System.
After repartitioning the disk I copied data from partitions 3 and 7 on the first machine to partition 3 on the second machine.
This is the first machine with original data on partitions 3 and 7:
$ df
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 7559700 5218112 2341588 70% /
tmpfs 516672 0 516672 0% /dev/shm
/dev/sda3 34774932 7114156 27660776 21% /mnt/sda3
/dev/sda5 34774868 17603104 17171764 51% /mnt/sda5
/dev/sda6 34774868 10900692 23874176 32% /mnt/sda6
/dev/sda7 34774868 10739128 24035740 31% /mnt/sda7
This is the second machine and new data on partition 3:
# df
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 7748748 6895612 853136 89% /
tmpfs 257260 0 257260 0% /dev/shm
/dev/hda1 6790684 4091536 2699148 61% /mnt/hda1
/dev/hda3 61990104 19293484 42696620 32% /mnt/hda3
Partitions 3 and 7 on the first machine use 7114156 + 10739128 = 17853284 1K-blocks of disk space. Partition 3 on the second machine stores exactly the same data and uses 19293484 1K-blocks of disk space. The same data occupies on the second hard drive 8% more disk space than on the first hard drive.
I wonder what makes this difference. Are smaller partitions more economic than big ones? Does it depend on the used file system? Does it depend on hard drive geometry? Is there another reason of such behavior of data on these disks?
Any help will be welcomed.