This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 447623 - repartitioned disk drive partitions not reread until reboot
repartitioned disk drive partitions not reread until reboot
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
9
i686 Linux
low Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-20 16:47 EDT by Tom Shield
Modified: 2008-09-13 21:15 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-13 21:15:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom Shield 2008-05-20 16:47:17 EDT
Description of problem:

if a hard drive with existing partitions is repartitioned mkfs and subsequent
mounts still use the previous partition settings.  New partitioning scheme is
not active until after a reboot.

Version-Release number of selected component (if applicable):

Fedora 9 Live KDE running from CD

How reproducible:

I've only tried it once as I was repartitioning my system disk. The system was
originally set up as part of an FC3 install.

Steps to Reproduce:
1. repartition an existing disk so that a larger partition is subdivided into
several smaller partitions.  I had a three partitions initially, boot, root and
swap (see below).  I deleted the root and swap and made it into three roughly
equal partitions and a swap partition.  The boot partition stayed the same at
the front of the disk.  I used fdisk to repartition.
2. mkfs (ext3 was what I used) on the new partition, it will use the old size of
the second root partition.
3. mount the new partition it will report the size of the old partition.
  
Actual results:

file system of the old partition size

Expected results:

file system of the new partition size.

Additional info:

the original disk layout was something like (sorry I did not keep the exact
layout, but the cylinder numbers are correct):

Disk /dev/sda: 79.9 GB, 79998951424 bytes
255 heads, 63 sectors/track, 9725 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        9471    ????????+  83  Linux
/dev/sda3            9472        9725     2040223+  82  Linux swap


The following is the new disk layout:

Disk /dev/sda: 79.9 GB, 79998951424 bytes
255 heads, 63 sectors/track, 9725 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        2446    19543072+  83  Linux
/dev/sda3            2447        4879    19543072+  83  Linux
/dev/sda4            4880        9725    38925495    5  Extended
/dev/sda5            4880        9471    36885208+  83  Linux
/dev/sda6            9472        9725     2040223+  82  Linux swap

I tried to mkfs and mount /dev/sda2 and got the old sda2 partition size from before.
Comment 1 Chuck Ebbert 2008-05-23 01:37:58 EDT
Did you notice when fdisk rewrote the partition table, whether it said "the old
partition table will be used until the next reboot" or not?
Comment 2 Chuck Ebbert 2008-05-23 01:59:37 EDT
I can't reproduce this at all.
Comment 3 Tom Shield 2008-05-23 11:39:11 EDT
I don't recall it saying that.  I seem to recall it saying "Calling ioctl() to
re-read partition table."  But I don't know for sure.  I never recall seeing the
"used until reboot message" in all the times I've used fdisk.  Under what
conditions does this occur?

I probably should have also said sda is a pair of mirrored IDE disks on a 3ware
controller.
Comment 4 Chuck Ebbert 2008-06-06 21:07:52 EDT
(In reply to comment #3)
> I don't recall it saying that.  I seem to recall it saying "Calling ioctl() to
> re-read partition table."  But I don't know for sure.  I never recall seeing the
> "used until reboot message" in all the times I've used fdisk.  Under what
> conditions does this occur?
> 

It happens when any of the disk partitions are in use.

Note You need to log in before you can comment on or make changes to this bug.