[CentOS] LVM Input/output error

itayf at nospammail.net itayf at nospammail.net
Mon Jul 10 14:09:18 UTC 2006


> > [root at frodo ~]# sfdisk -l /dev/sdc
> >
> > Disk /dev/sdc: 38913 cylinders, 255 heads, 63 sectors/track
> > Units = cylinders of 8225280 bytes, blocks of 1024 bytes,
> > counting from 0
> >
> >     Device Boot Start     End   #cyls    #blocks   Id  System
> > /dev/sdc1   *      0+    254     255-   2048256    c  W95 FAT32 (LBA)
> > /dev/sdc2        255   38912   38658  310520385   83  Linux
> > /dev/sdc3          0       -       0          0    0  Empty
> > /dev/sdc4          0       -       0          0    0  Empty
> >
> > ** I note that the file system on /dev/sdc2 is 'Linux' and not
> > 'Linux LVM'.  This is what I got, eventhough I created it with
> >       parted /dev/sdc mkpart ...
>
> There's your problem I think. In my first post, I *guessed* that type
> needed to be 86. I'm sure 83 is NG - that's a standard Linux part. With
> fdisk and it's variations, there is a command to change partition type.
> Do that and select the one that shows LVM 986 I think). Write and
> (possibly) reboot or sfdisk -R /dev/sdc (which re-reads the partition
> info. If it shows *LVM* as the type, do you pvcreate, vgcreate, etc. and
> I bet you are OK.
>

Had to wait until I came back to work and could reboot the 
machine. Using William's instructions, modulus using 8e as Matt 
Hyclak pointed out, seems to solve the problem.  Everything seems 
to work fine: lvcreation, writing files, etc.

The only odd thing is in regard to the output of sfdisk.  Note 
the warning when 'sfdisk -l' is invoked without a device 
argument.  According to the man page this is a legitimate call 
that should produce output similar in nature to 'fdisk -l' (which 
works as expected).

<man>
        The  second  type  of invocation: sfdisk -l [options] device will list
        the partitions on this device.  If the device argument is omitted, the
        partitions on all hard disks are listed.
        % sfdisk -l /dev/hdc
</man>

I am quite sure that this is an 'sfdisk' issue unrelated to the 
problem I needed to solve.  But I would like to be careful before 
I declare [RESOLVED].

Perhaps I will try sfdisk with a different machine to see if 
there is a difference.

         Thanks,
         Itay


<transcript>
[root at frodo ~]# sfdisk -l

Disk /dev/sda: 30401 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, 
counting from 0

    Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     12      13-    104391   83  Linux
/dev/sda2         13   30400   30388  244091610   8e  Linux LVM
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
Warning: start=63 - this looks like a partition rather than
the entire disk. Using fdisk on it is probably meaningless.
[Use the --force option if you really want this]


[root at frodo ~]# sfdisk -l /dev/sda
Disk /dev/sda: 30401 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, 
counting from 0

    Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     12      13-    104391   83  Linux
/dev/sda2         13   30400   30388  244091610   8e  Linux LVM
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty


[root at frodo ~]# sfdisk -l /dev/sdb
Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, 
counting from 0

    Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+    254     255-   2048256    c  W95 FAT32 (LBA)
/dev/sdb2        255   38912   38658  310520385   8e  Linux LVM
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
</transcript>





More information about the CentOS mailing list