Operating System - Linux
1820095 Members
3488 Online
109608 Solutions
New Discussion юеВ

Re: Linux fdisk output says invalid partition table.

 
Gulam Mohiuddin
Regular Advisor

Linux fdisk output says invalid partition table.

The fdisk give message: Disk /dev/sdc doesn't contain a valid partition table

#fdisk -l /dev/sdc

Disk /dev/sdc: 299.9 GB, 299999690752 bytes
128 heads, 32 sectors/track, 143051 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes

Disk /dev/sdc doesn't contain a valid partition table

How to fix it and get rid of this message.

The disk is already in use and has lots of data on it.

Thanks,

Gulam.
Everyday Learning.
8 REPLIES 8
Kevin Wright
Honored Contributor

Re: Linux fdisk output says invalid partition table.

you are using the whole disk it appears (/dev/sdc as opposed to /dev/sdc1) and it is not partitioned. I would recommend placing a partition label on your disks in the future to avoid confusion.
Steven E. Protter
Exalted Contributor

Re: Linux fdisk output says invalid partition table.

Shalom,

fdisk /dev/sdc

Put a partition on the thing. Maybe even a filesystem after that.

Sometimes false messages like this can be caused by dual path if the disk is fiber and there are two fiber paths to the disk.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gulam Mohiuddin
Regular Advisor

Re: Linux fdisk output says invalid partition table.

I already have a filesystem on that disk.

Thanks,

Gulam.
Everyday Learning.
Stuart Browne
Honored Contributor

Re: Linux fdisk output says invalid partition table.

What type of device is 'sdc' ?

Some USB memory sticks or SCSI LUN's presented by some SAN's do not have partition tables, they are just raw filesystems.

Using the 'file -s /dev/sdc' command, you can tell if there's an existing filesystem or a boot sector a partition table can live in.
One long-haired git at your service...
Gulam Mohiuddin
Regular Advisor

Re: Linux fdisk output says invalid partition table.

It is IBM SCSI disk array.

[root@wolfdev04 ~]# file -s /dev/sdc
/dev/sdc: data

Thanks,

Gulam.
Everyday Learning.
Andrew Cowan
Honored Contributor

Re: Linux fdisk output says invalid partition table.

Be very careful as I get this message a lot when using a Firewire attached portable hard disk. I have now managed to corrupt the data on this disk and am looking at a reformat.

I think my problem has been caused by the instability of the Firewire drivers, and if your problem is intermittent, you could be in a similar situation.
TY 007
Honored Contributor

Re: Linux fdisk output says invalid partition table.

Hello Gulam,

Try the followings (example):

# parted /dev/sdc

GNU Parted 1.8.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

Model: xxxxxxx (scsi)
Disk /dev/sdc: 9999MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 271MB 271MB primary ext3 boot
2 271MB 8324MB 8053MB primary ext3

Thanks
Kevin Wright
Honored Contributor

Re: Linux fdisk output says invalid partition table.

You have a filesystem on /dev/sdc. Which doesn't contain a partition label, therefore the errors from fdisk as fdisk is attempting to read a partition table which doesn't exist.

fdisk /dev/sdc, put a partition on it, then recreate your filesystem on /dev/sdc1 and restore. Otherwise, you'll have to live with the error message.