Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I view my partitions if they are primary or secondary in Linux CentOS? I tried df -T but it does not show if partitions are primary or secondary.

Thanks.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Use the cfdisk command.

cfdisk /dev/sda
share|improve this answer

What are the names of the partitions? primary partitions are numbered 1 to 4, for example: sda1, hdb2, etc...

Whereas logical partitions are numbered 5 and above.

The primary extended partition is always numbered 4.

Check link for info

share|improve this answer
    
Your information is wrong, the extended partition is always numbered less than 5, but it doesn't have to be 4. You can also have primary partitions after extended partition. –  Jimmy Mar 2 at 15:31

Try fdisk -l and df -T and align the devices fdisk reports to the devices df reports. A standard MBR disk can contain only 4 primary partitions or 3 primary and 1 extended. If you have partitions numbered >= 5 they are logical partitions (with the extended partition hosting them being always number 4 i.e. /dev/sda4).

share|improve this answer
    
Your information is wrong, the extended partition is always numbered less than 5, but it doesn't have to be 4. You can also have primary partitions after extended partition. –  Jimmy Mar 2 at 15:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.