Score:1

Different output of parted and fdisk

nl flag

I have a strange CentOS behaviour, When I type parted -l command on my server I got following results :

Model: DELL PERC H730P Adp (scsi)
Disk /dev/sda: 5758GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: pmbr_boot

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  3146kB  2097kB                        bios_grub
 2      3146kB  1077MB  1074MB  ext4
 3      1077MB  5749GB  5748GB  ext4
 4      5749GB  5758GB  8590MB  linux-swap(v1)

And everything seems to be fine but when I check the same with fdisk -l I got :

Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: 79700B71-AB44-4ED5-95EC-0FE5E3C0CF1D


#         Start          End    Size  Type            Name
 1         2048         6143      2M  BIOS boot       
 2         6144      2103295      1G  Microsoft basic 
 3      2103296  11229198335    5.2T  Microsoft basic 
 4  11229198336  11245975551      8G  Linux swap      

As you can see types of filesystems are different in each cases and it bothers me a lot.
Who can explain me what causes such diverse in output results ?
Thanks in advance

Score:1
in flag

The difference is, that parted shows the file system, and fdisk shows the partition type.

There is no discrepancy here.

  • partition type: Microsoft basic
  • filesytem: ext4

Microsoft basic is technically not the correct type for a Linux partition, there is Linux filesystem for that, but practically that doesn't really make a difference.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.