[parted-devel] Warning message if create partition when a partition is mounted
Curtis Gedak
gedakc at gmail.com
Fri Oct 9 20:04:36 UTC 2009
Jim Meyering wrote:
> Curtis Gedak wrote:
>
>> There appears to be a regression in (alpha) parted-2.0 since parted-1.9.0.
>>
>> Specifically something has changed that causes a warning message to be
>> displayed when a new partition is created and at least one partition
>> on the device is mounted. The warning messaged displayed is:
>>
>> Warning: The kernel was unable to re-read the partition table
>> on /dev/sdd (Device or resource busy). This means Linux
>> won't know anything about the modifications you made until
>> you reboot. You should reboot your computer before doing
>> anything with /dev/sdd.
>>
>> This change occurs with (alpha) parted-2.0 that was downloaded from:
>> ftp://alpha.gnu.org/gnu/parted/parted-2.0.tar.gz
>>
>
> Hi Curtis,
>
> Thank you for the very detailed report!
>
> However, shouldn't we consider it a *feature* that parted now prints
> this warning? In other words, isn't it risky (and worthy of a warning)
> to modify a partition table when one or more of its partitions is mounted?
>
Hi Jim,
Thank you for the quick response. I agree that a warning message about
the device being in use is probably a good idea.
The difficultly I see with this warning message is that I believe that
it is incorrect in saying that the kernel cannot re-read the partition
table.
To prove the point, I followed the steps in the original message and
added some more steps to format and mount the last partition. The
kernel did _NOT_ experience any problems seeing this newly updated
partition table and correctly mounted the partition.
The steps I added are as follows:
--> $ mkfs.ext2 ${dev}3
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
2448 inodes, 9764 blocks
488 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=10223616
2 block groups
8192 blocks per group, 8192 fragments per group
1224 inodes per group
Superblock backups stored on blocks:
8193
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
--> $ mount ${dev}3 /mnt/testmnt/
--> $ df /mnt/testmnt
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdd3 9449 90 8871 2% /mnt/testmnt
--> $ umount /mnt/testmnt
--> $
Hence I believe that this regression that occurred in (alpha) parted-2.0
is not correct.
Regards,
Curtis Gedak
More information about the parted-devel
mailing list