Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Ubuntu filesystem error corrupt GPT label Post 302595893 by ccj4467 on Sunday 5th of February 2012 08:49:57 PM
Old 02-05-2012
Ubuntu filesystem error corrupt GPT label

Need help/advice urgently.Smilie

I really shot myself in the foot this time. Here is the scenario
Have a Solaris server Solaris 10 x86 Update 8.
Installed an LSI MegaRaid 9280 raid controller and attached a 16 bay JBOD box to it, created a RAID6 virtual drive with 1 hot spare.

Created a ZFS filesystem on it and loaded it up with users data about 7.6TB.
Created another identical system and rsynced the data from the first to the second.
Both of the servers are to act as fileservers exporting the directoies via NFS

Then I discovered the disk performance was horrible, did some research and discover my configuration was less the ideal. I decide to install Ubuntu 10.04LTS server on one of the machines and rebuild the RAID filesystem. This is where I shot myself in the foot.

I did zpool destroy on the ZFS system
Then installed Ubuntu
Ubuntu recognized the disk and an fdisk -l displayed the correct partitioning.

Code:
Disk /dev/sdb: 12995.5 GB, 12995497295872 bytes
255 heads, 63 sectors/track, 1579945 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x08046e04

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      267350  2147483647+  ee  GPT

I then created an ext3 filesystem on it, loaded all of the data on it and things were fine for about a week.

I started get I/O errors any time I accessed the filesystem. I tried unmounting the file system and remounting but it would not remount

Code:
root@fileserver2:~/testdisk-6.13# mount /dev/sdb1 /raid2
mount: special device /dev/sdb1 does not exist

Tried rebooting still no luck

I ran parted then and it gives this error:

Code:
root@fileserver2:~/testdisk-6.13# parted /dev/sdb
GNU Parted 2.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/sdb: unrecognised disk label
(parted) quit

I then realized that when I created the filesystem I had not run parted to create a proper partition table. Big oops.

A few questions questions

1 Why would mkfs allow me to create a filesystem on disk that was not partitioned correctly?

Why did it take a week for things to go south?

and finally is this a reasoble way to recover from my screwup:

Run parted:

Code:
mklabel gpt
rescue 0 267350

Any hints, advice or other solutions would be greatly appreciated.
 

8 More Discussions You Might Find Interesting

1. Solaris

ultra 10 boot warning---corrupt label

Hi All, Any idea why i'm having this warning during boot: WARNING: /pci@1f,0/pci@1,1/ide@3/dad@1,0 (dad1): corrupt label - wrong magic number This happens after I added another ide HD and reinstall it from solaris 10 to solaris 8. Thanks in advance. (7 Replies)
Discussion started by: itik
7 Replies

2. Solaris

Corrupt label bad geometry

Hi, I have a Sun X4200, when I try to reboot the machine it's not detecting the drive and it shows the following error when I try to rebuilt it. I am not sure whether its a bad HD or something else. Label says 983040 blocks: Drive says 983039 blocks WARNING:... (1 Reply)
Discussion started by: gunnervarma
1 Replies

3. Solaris

Filesystem - error when extend the filesystem

Hi all, currently , my root filesystem already reach 90 ++% I already add more cylinder in the root partition as below Part Tag Flag Cylinders Size Blocks 0 root wm 67 - 5086 38.46GB (5020/0/0) 80646300 1 swap wu 1 - ... (11 Replies)
Discussion started by: SmartAntz
11 Replies

4. UNIX for Advanced & Expert Users

Mounting SunSolaris Filesystem on Linux Ubuntu Server

Can someone please help me out here. I have SunSolaris server that has a ridiculous about of space on it. several hundred gigabytes of space. There are lots of partitions on this server that has at least 100Gs on them. I want to mount just one of these partitions on my Linux server so I can... (4 Replies)
Discussion started by: SkySmart
4 Replies

5. Solaris

corrupt label - wrong magic number

I have created 1 LUN. 1)LUN 00BB 200GB /dev/rdsk/c1t3d44 /dev/rdsk/c2t28d44 /dev/rdsk/c3t19d44 /dev/rdsk/c4t12d44 2) Already added the new entry into sd.conf and rebooted. 3) Already done these: powercf –q power config 4) power display dev=all I can see the new Symmetrix device.... (1 Reply)
Discussion started by: sirius20d
1 Replies

6. Filesystems, Disks and Memory

Original SAN to a New Solaris Server: Corrupt Label

I've seen several posts that are similar to what I'm trying to do but no dice. I have a server (SunFire V215) that went belly up. I've set up a new one. I'm getting a corrupt label: wrong magic number error. Everything I'm seeing says label the drives, but if I do I'm afraid I'll lose the data... (0 Replies)
Discussion started by: tnelson
0 Replies

7. Solaris

Unable to mount ext4 filesystem (created from Ubuntu) in Solaris 11

Hello everyone, I am trying to mount an ext4 filesystem which I created from Ubuntu. But mount command fails saying: prakhar@Solaris:~$ sudo mount /dev/dsk/c10t0d0p1 /mnt Password: mount: /dev/dsk/c10t0d0p1 is not this fstype And I also tried this: prakhar@Solaris:~$ fstyp... (6 Replies)
Discussion started by: Prakhar Mishra
6 Replies

8. Red Hat

GPT Partitions

(Don't you hate being on holiday and being the only IT person in the family?) Got a wonderful thanksgiving surprise .. dead windows-8 laptop with "important" unbacked-up data. No worries, I have my my fedora labtop and a magical SATA to USB converter. Plugged in the drive, and ... can't mount... (4 Replies)
Discussion started by: derekludwig
4 Replies
PARTED(8)							 GNU Parted Manual							 PARTED(8)

NAME
       GNU Parted - a partition manipulation program

SYNOPSIS
       parted [options] [device [command [options...]...]]

DESCRIPTION
       parted  is  a program to manipulate disk partitions.  It supports multiple partition table formats, including MS-DOS and GPT.  It is useful
       for creating space for new operating systems, reorganising disk usage, and copying data to new hard disks.

       This manual page documents parted briefly.  Complete documentation is distributed with the package in GNU Info format.

OPTIONS
       -h, --help
	      displays a help message

       -l, --list
	      lists partition layout on all block devices

       -m, --machine
	      displays machine parseable output

       -s, --script
	      never prompts for user intervention

       -v, --version
	      displays the version

       -a alignment-type, --align alignment-type
	      Set alignment for newly created partitions, valid alignment types are:

	      none   Use the minimum alignment allowed by the disk type.

	      cylinder
		     Align partitions to cylinders.

	      minimal
		     Use minimum alignment as given by the disk topology information. This and the opt value will use layout information  provided
		     by the disk to align the logical partition table addresses to actual physical blocks on the disks.  The min value is the min-
		     imum alignment needed to align the partition properly to physical blocks, which avoids performance degradation.

	      optimal
		     Use optimum alignment as given by the disk topology information. This aligns to a multiple of the physical block  size  in  a
		     way that guarantees optimal performance.

COMMANDS
       [device]
	      The block device to be used.  When none is given, parted will use the first block device it finds.

       [command [options]]
	      Specifies the command to be executed.  If no command is given, parted will present a command prompt.  Possible commands are:

	      help [command]
		     Print general help, or help on command if specified.

	      align-check type partition
		     Check if partition satisfies the alignment constraint of type.  type must be "minimal" or "optimal".

	      mklabel label-type
		     Create  a	new  disklabel	(partition table) of label-type.  label-type should be one of "aix", "amiga", "bsd", "dvh", "gpt",
		     "loop", "mac", "msdos", "pc98", or "sun".

	      mkpart part-type [fs-type] start end
		     Make a part-type partition for filesystem fs-type (if specified), beginning at  start  and  ending  at  end  (by  default	in
		     megabytes).  part-type should be one of "primary", "logical", or "extended".

	      name partition name
		     Set the name of partition to name. This option works only on Mac, PC98, and GPT disklabels. The name can be placed in quotes,
		     if necessary.

	      print  Display the partition table.

	      quit   Exit from parted.

	      rescue start end
		     Rescue a lost partition that was located somewhere between start and end.	If a partition is found, parted will  ask  if  you
		     want to create an entry for it in the partition table.

	      resizepart partition end
		     Change the end position of partition.  Note that this does not modify any filesystem present in the partition.

	      rm partition
		     Delete partition.

	      select device
		     Choose  device  as  the current device to edit. device should usually be a Linux hard disk device, but it can be a partition,
		     software raid device, or an LVM logical volume if necessary.

	      set partition flag state
		     Change the state of the flag on partition to state.  Supported flags are: "boot", "root", "swap",	"hidden",  "raid",  "lvm",
		     "lba", "legacy_boot", "irst", "esp" and "palo".  state should be either "on" or "off".

	      unit unit
		     Set  unit	as the unit to use when displaying locations and sizes, and for interpreting those given by the user when not suf-
		     fixed with an explicit unit.  unit can be one of "s" (sectors), "B" (bytes), "kB", "MB", "MiB", "GB", "GiB", "TB", "TiB", "%"
		     (percentage  of  device size), "cyl" (cylinders), "chs" (cylinders, heads, sectors), or "compact" (megabytes for input, and a
		     human-friendly form for output).

	      toggle partition flag
		     Toggle the state of flag on partition.

	      version
		     Display version information and a copyright message.

REPORTING BUGS
       Report bugs to <bug-parted@gnu.org>

SEE ALSO
       fdisk(8), mkfs(8), The parted program is fully documented in the info(1) format GNU partitioning software manual which is distributed  with
       the parted-doc Debian package.

AUTHOR
       This manual page was written by Timshel Knoll <timshel@debian.org>, for the Debian GNU/Linux system (but may be used by others).

parted								   2007 March 29							 PARTED(8)
All times are GMT -4. The time now is 07:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy