GEMCC
asked on
Linux Ubuntu 14.04 LTS /dev/md0 doesn't contain a valid partition table
Hello,
I replaced a HDD in my server. This is a RAID1 configuration with a swap partition and a "/" partition. It appears the mirror was recreated, but now I am getting the errors "/dev/md0 doesn't contain a valid partition table" and "/dev/md1 doesn't contain a valid partition table" when I run fdisk -l
I am not able to boot to the replaced "new" drive.
Please let me know if you need additional info.
Please advise.
Have a great day,
Don
I replaced a HDD in my server. This is a RAID1 configuration with a swap partition and a "/" partition. It appears the mirror was recreated, but now I am getting the errors "/dev/md0 doesn't contain a valid partition table" and "/dev/md1 doesn't contain a valid partition table" when I run fdisk -l
I am not able to boot to the replaced "new" drive.
Please let me know if you need additional info.
Please advise.
Have a great day,
Don
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello,
If I run parted /dev/md0 mklabel msdos, I am given a warning that the data will be lost.
Here is what fdisk -l says:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6992f643
Device Boot Start End Blocks Id System
/dev/sda1 2048 487423 242688 fd Linux raid autodetect
/dev/sda2 487424 1953523711 976518144 fd Linux raid autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
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 identifier: 0x000cf274
Device Boot Start End Blocks Id System
/dev/sdb1 2048 487423 242688 fd Linux raid autodetect
/dev/sdb2 487424 1953523711 976518144 fd Linux raid autodetect
Disk /dev/md0: 248 MB, 248315904 bytes
2 heads, 4 sectors/track, 60624 cylinders, total 484992 sectors
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 identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 999.8 GB, 999820165120 bytes
2 heads, 4 sectors/track, 244096720 cylinders, total 1952773760 sectors
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 identifier: 0x00000000
Disk /dev/md1 doesn't contain a valid partition table
Please advise.
Have a great day,
Don
If I run parted /dev/md0 mklabel msdos, I am given a warning that the data will be lost.
Here is what fdisk -l says:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6992f643
Device Boot Start End Blocks Id System
/dev/sda1 2048 487423 242688 fd Linux raid autodetect
/dev/sda2 487424 1953523711 976518144 fd Linux raid autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
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 identifier: 0x000cf274
Device Boot Start End Blocks Id System
/dev/sdb1 2048 487423 242688 fd Linux raid autodetect
/dev/sdb2 487424 1953523711 976518144 fd Linux raid autodetect
Disk /dev/md0: 248 MB, 248315904 bytes
2 heads, 4 sectors/track, 60624 cylinders, total 484992 sectors
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 identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 999.8 GB, 999820165120 bytes
2 heads, 4 sectors/track, 244096720 cylinders, total 1952773760 sectors
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 identifier: 0x00000000
Disk /dev/md1 doesn't contain a valid partition table
Please advise.
Have a great day,
Don
So far so good, your partitioning is ok.
next I need the output of
cat /proc/mdstat
and
file -s /dev/md0
file -s /dev/md1
you also could try to mount /dev/md1 to /mnt within your rescue environment, to check if you can mount it.
please mount like this:
mount /dev/md1 /mnt -o ro
which will mount it read only to prevent accidential damage.
if mount was successful you could check if /mnt contains the files of your ubuntu installation.
next I need the output of
cat /proc/mdstat
and
file -s /dev/md0
file -s /dev/md1
you also could try to mount /dev/md1 to /mnt within your rescue environment, to check if you can mount it.
please mount like this:
mount /dev/md1 /mnt -o ro
which will mount it read only to prevent accidential damage.
if mount was successful you could check if /mnt contains the files of your ubuntu installation.
ASKER
Ended up wiping out and restarting install.
ASKER
Not sure if this would have really resolved the issue as I wiped out the system and started from scratch.
would have not as your filesystems should have been in /dev/md1 and swap in /dev/md0,
But i also think reinstalling is fastest way for you. hope you didnt had important files inside.
my assumption of your problem was is that the system either had not mirrored the raid correctly OR that the bootloader on the new disk wasnt properly installed.
Nevermind if reinstallation was ok for you its surely the solution with less hassle. (but lesser learning ;))
But i also think reinstalling is fastest way for you. hope you didnt had important files inside.
my assumption of your problem was is that the system either had not mirrored the raid correctly OR that the bootloader on the new disk wasnt properly installed.
Nevermind if reinstallation was ok for you its surely the solution with less hassle. (but lesser learning ;))
Im also guessing the mds itself were unpartitioned before and contain the filesystem itself. The mds i think are sitting in its partitions on the disks. And those partitions /dev/sda1 /dev/sdb1 are mirrored as a md device.
In this scenario each /dev/md will not have partitions.
You need to create the same partition table on the new disk as its on the remaining of the raid mirror and then use mdadm to initialize and add the new created paritions back into the raid.
(im assuming it was a linux soft raid and not a mainboard raid).
afterwards you may need to re install the bootloader to the MBR of the new installed HDD. Especially it it was /dev/sda that was failing before.
If lucky and the old setup was correct the bootloader should have been on BOTH disks so just switch bios boot order to the other HDD as 1st device and your linux may boot.