LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2014, 12:26 PM   #1
ziltoid
LQ Newbie
 
Registered: Aug 2014
Posts: 3

Rep: Reputation: Disabled
Fdisk


Hi guys.

My first post here so excuse if it's in the wrong place.
Im writing(typing) my RHEL EX200 exam in 2 weeks. my question is regarding fdisk

It goes as follows - You already have 3 partitions, so obviously the 4th one will be an extended partition. There is 10G free space to use. When using fdisk i will do the following : fdisk dev/sda
-n(for new partition)
-e(for extended partition)
-4(for 4th partition)
-then I press enter to use the first avalible cylinder
-NOW this is where I get lost. when fdisk askes for the last cylinder I can only select 2 cylinders. And when doing so it only gives you a partition of 1G. wheres the other 9??????
 
Old 08-06-2014, 01:07 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
It picked an inappropriate starting cylinder in a gap preceding one of the existing partitions. You need to look at a list of the current partitions and choose an appropriate starting cylinder. And, you shouldn't be working in the obsolescent "cylinder" units anyway. Use the "u" command to switch to "sector" units.

Last edited by rknichols; 08-06-2014 at 01:08 PM.
 
1 members found this post helpful.
Old 08-07-2014, 12:40 AM   #3
ziltoid
LQ Newbie
 
Registered: Aug 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks man. Would using sectors stop me from choosing the the 2 lost cylinders or would I still have to select a sector that starts after the last partition?
 
Old 08-07-2014, 08:56 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
It may still default to a bad starting location. It will be using 1 Megabyte alignment for the starting sector (sector number a multiple of 2048), and depending on how the partitions are currently placed, it might find a gap that it could use.

BTW, any recent version of fdisk would default to using sector units. You must be using a fairly old one.

Also, it is not at all obvious that the 4th partition would be an extended one. You would need that if you envisioned ever wanting more than 4 partitions on that disk, but with just 10 GB remaining, how likely is that? Of course, it that is the way the question is phrased, then that is what you would do.
 
Old 08-07-2014, 09:30 AM   #5
ziltoid
LQ Newbie
 
Registered: Aug 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Im using an up-to-date Centos 6.5. The obvious part for me is of I would like to create swap space as well as a LV, then I would need an extended partition. Which make me think of another question. In the same scenario, after creating my 10G partition would it be beter practice to create a 10G LV and take a chunk of that for swap space or create another partition on the extended partition for the swap space the rest for the LV??
 
Old 08-07-2014, 10:37 AM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
I keep forgetting just how far behind RHEL and its clones tend to be. (And I have a machine running Scientific Linux 6.5, but it's using LVM, so I seldom have occasion to run fdisk.)

If you want to play around with LVM, I suggest just making partition 4 a primary LVM partition (type 8e), put that in a volume group, and break that up into LVs however you like. That way you can make changes without having to reboot, as you would have to when changing separate partitions.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD fdisk - Linux fdisk compatibility ? Vilius *BSD 2 01-17-2013 08:02 AM
How to use Fdisk ? gardenair Linux - Newbie 6 05-14-2011 03:32 AM
understadning /dev/dm-02 mapping and fdisk -l or fdisk -l | less mixxmaster27 Linux - Newbie 2 06-03-2010 12:17 PM
Replacing fdisk with gnu fdisk in busybox? Alkisx Slackware 5 10-23-2009 11:51 AM
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration