[CentOS] LVM Input/output error

Mon Jul 10 15:13:42 UTC 2006
William L. Maltby <BillsCentOS at triad.rr.com>

On Mon, 2006-07-10 at 17:09 +0300, itayf at nospammail.net wrote: 
> > > [root at frodo ~]# sfdisk -l /dev/sdc
> > >
> > ><snip>


> 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].

My workstation, in use for over a year now, shows the same warning
message (start=63...) as your transcript. Further, having used sfdisk
for a *long* time for some fairly rigorous applications, I have complete
confidence in it. Reread the man sections on the "+" and "-" suffix and
you get your first clue. The run sfdisk again and add "-uS" and I think
you will be OK with it.

It will also give warning messages if the true geometry of a drive
appears to be other than what is shown in the disk label (often called
MBR).

Although I have faith in the software, the doc (as is normal?) is not so
trustworthy. You'll see only 1 HD in my transcript at the end of this
reply, but look at this.

   [root at wlmlfs08 ~]# sfdisk -l -uS /dev/hdd

   Disk /dev/hdd: 7297 cylinders, 255 heads, 63 sectors/track
   Units = sectors of 512 bytes, counting from 0

      Device Boot    Start       End   #sectors  Id  System
   /dev/hdd1   *        63    208844     208782  83  Linux
   /dev/hdd2        208845 117226304  117017460  8e  Linux LVM
   /dev/hdd3             0         -          0   0  Empty
   /dev/hdd4             0         -          0   0  Empty

There is a conflict in the man page: the prototype shows device is not
optional if options are provided but the paragraph you high-lighted says
it has a behavior that makes it optional. On my machine, the missing
device specification does not produce the documented behavior. I
conclude that if options are given, device is not optional *unless* you
accept undefined behavior as acceptable!  =>:-O

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

I don't think you'll see any difference if the config is similar. I've
attached my transcript below.

> 
>          Thanks,
>          Itay
> <snip>
=============================================================
[root at wlmlfs08 ~]# sfdisk -l

Disk /dev/hda: 12161 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/hda1   *      0+     12      13-    104391   83  Linux
/dev/hda2         13    2445    2433   19543072+  8e  Linux LVM
/dev/hda3       2446    4876    2431   19527007+  8e  Linux LVM
/dev/hda4          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 wlmlfs08 ~]# sfdisk -l -uS

Disk /dev/hda: 12161 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/hda1   *        63    208844     208782  83  Linux
/dev/hda2        208845  39294989   39086145  8e  Linux LVM
/dev/hda3      39294990  78349004   39054015  8e  Linux LVM
/dev/hda4             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 wlmlfs08 ~]#
============================================================================

-- 
Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20060710/5ce5a09d/attachment-0005.sig>