lkml.org 
[lkml]   [2004]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Questions : disk partition re-reading
On Sun, Apr 18, 2004 at 03:24:46PM +0200, Remi Colinet wrote:

> I have 2 questions about disk partitioning under linux 2.6.x :
>
> 1/ Is it possible to alter a disk partition of a used disk and beeing
> able to use the modified partition without having to reboot the box?

Yes. Look at partx.

> 2/ Is it possible to delete a disk partition without having the
> partition numbers changed?

Yes. Look at partx.

> Do I need to upgrade fdisk or use an other utility? Or do I need to
> apply a kernel patch?

You must distinguish the on-disk partition table and the kernel
partition table. You can change the on-disk partition table just by
writing to it, but that does not change the kernel's ideas.
You can change the kernel partition table using the right ioctls
but that does not change the bits on disk.

Usually one does
blockdev --rereadpt /dev/something
after changing media, or after writing to the partition table,
but that will fail if the disk is busy.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:2.574 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site