Re: fdisk: plus sign in the blocks number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 3, 2008 at 6:34 PM, g <geleem@xxxxxxxxxxxxx> wrote:
>   The  trailing - and + signs indicate that rounding has taken place, and
>   that the actual value is slightly less (more).  To see the  exact  val-
>   ues, ask for a listing with sectors as unit.
>
>
> oops. hit send too quick.
>
> when partitions are built, and you do not build them in even block size, a
> '+' or '-' occurs.
>
> when you resize, and if you build in even blocks, they will disappear.


Ah! I see your point It makes sense.
Here's some more digging I did just to understand this.

Please excuse the long, informative follow up, but is needed to
get the whole picture.

I used fdisk to create new partitions. I wanted to create
the filesystem and check for bad blocks in one shot, but
the operation failed.

root@orion> /sbin/mkfs -c -v -t ext3 /dev/sdc7
mke2fs 1.40.4 (31-Dec-2007)
mkfs.ext2: invalid blocks count - /dev/sdc7

from "man badblocks"

       "Important note: If the output of badblocks is going to be  fed  to  the
       e2fsck or mke2fs programs, it is important that the block size is prop-
       erly specified
       since the block numbers which are  generated  are  very
       dependent on the block size in use by the filesystem.  For this reason,
       it is strongly recommended that users not run badblocks  directly,  but
       rather use the -c option of the e2fsck and mke2fs programs."

Badblocks will work if used directly on the device

root@orion> badblocks -nv /dev/sdc7
Checking for bad blocks in non-destructive read-write mode
>From block 0 to 6249253
Testing with random pattern: Pass completed, 0 bad blocks found.

Here is the output in both Cylinders and Sectors from fdisk.
The Cylinders output show no gaps at the Start-End points.
The Sectors output does show gaps starting with /dev/sdb3, which
is the first partition I added with fdisk.

CYLINDERS
   Device Boot     Start       End      Blocks       Id  System
/dev/sdb1   *           1         127     1020096   83  Linux
/dev/sdb2            128      2039    15358140   83  Linux
/dev/sdb3          2040      2294     2048287+ 82  Linux swap / Solaris
/dev/sdb4          2295      9729    59721637+   5  Extended
/dev/sdb5          2295      3569    10241406   83  Linux
/dev/sdb6          3570     4844    10241406   83  Linux
/dev/sdb7          4845     9729    39238731    83  Linux

SECTORS
   Device Boot        Start         End          Blocks        Id  System
/dev/sdb1   *             63      2040254     1020096    83  Linux
/dev/sdb2        2040255     32756534    15358140   83  Linux
/dev/sdb3        32756535    36853109     2048287+ 82  Linux swap / Solaris
/dev/sdb4        36853110  156296384    59721637+  5  Extended
/dev/sdb5        36853173    57335984    10241406  83  Linux
/dev/sdb6        57336048  77818859    10241406   83  Linux
/dev/sdb7        77818923  156296384    39238731  83  Linux

I guess it would be more accurate to go by cylinders. But I'd have to
convert the units to megabytes in order to get the partition size I
want...

Now, where did I put that calculator? :-)

~af

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux