Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed Red Hat linux and when it came to partitioning, i left 20 GB of free space because i wasn't quite sure how i wanted to split that 20 GB up at the time.
Now i have decided i want a 10GB and 2x 5GB partitions. No problem - fdisk is the answer. Or so i thought. For some reason fdisk refuses to let me touch the free space. I'm not at all sure why. Any ideas?
[root@tigpr8 mnt]# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/hda2 35971 17840 16304 53% /
/dev/hda1 97 15 78 16% /boot
none 1004 0 1004 0% /dev/shm
[root@tigpr8 mnt]# fdisk /dev/shm
You will not be able to write the partition table.
The space on /dev/shm (shared memory) is not in any hard disk, but in main RAM memory !
It can be used as a temporary space that is erased at boot time.
The main purpose, as far I know, is to provide a transient space for programs exchange data or for temporary files created by user scripts.
Disk /dev/hda: 61.4 GB, 61492838400 bytes
16 heads, 63 sectors/track, 119150 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 203 102280+ 83 Linux
/dev/hda2 204 74453 37422000 83 Linux
/dev/hda3 74454 78516 2047752 82 Linux swap
This is just the partitions i created at boot time. It doesn't show any unallocated space
"fdisk -l" (as root) will give you partitions table for all disks you may have in your computer. Maybe the free space you are looking for is in an un-partitioned space.
Ah i thought df showed everything. It's ok now - i have gone into hda with fdisk and i can see that i have free blocks so i have created a new partition there.
ops, my previous post came a bit late
Sure you have a lot of space ! It isjust waiting for you !
Take a look at fdisk's output. It says your disk has 119150 cylinders. The last partition, hda3 just finish at cylinder number 78516, so there are 40634 unused cylinders (~34% free).
I suggest you create a extended partition on hda4. After that you can create several partitions to use those 40634 cylinders.
Ah, yes, it's on the end of that drive... you have only used 78526 cylinders of 119096...
You'll have to create an extended partion /dev/hda4 then divide that up into logical partitions of whatever size you want... They will be /dev/hda5 and /dev/hda6 if you want two partitions... You can then format /dev/hda5 and /dev/hda6 with whatever filesystem you want...
You won't use /dev/hda4 as such as it's just an extended partition to hold the logical drives... You use hda5 and hda6. You have to do it that way as you can only have 4 primary partitions.
Ah i thought df showed everything. It's ok now - i have gone into hda with fdisk and i can see that i have free blocks so i have created a new partition there.
Thanks for the help
Make sure you create an extended partition so you can add the two drives you want... If you created a primary, you can delete that and create an extended, then add logical partitions - as many as you want...
Thanks guys. I created the extended partition and then 3 partitions in that. 1 10gb and 2 5gb. I wanted the 5gb partitions to be raw so i chose "empty" as the filesystem type. I think that is right....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.