Re: re-reading the partition table on a "busy" drive



Hallo,

Michael Tokarev wrote:
Currently, the kernel refuses to re-read partition table
from a drive which has usage count > 0. Motivation for
this is pretty clear ,
> pretty annoying -- in order to change
to reboot the machine.

Yes, very interesting thing. While one will destroy its part.table, he can not see until reboot, heh. But there were days, when grub used to install itself on XFS partition (XFS isn't FAT-boot-record compatible) *silently*, but nothing was wrong to me : it's linux-gnu ;D

I would love just little kernel boot parameter to configure it, or sysctl in procfs.

I wonder if it's possible to actually read the new partition
table, compare it with previous, and apply changes IF they
don't conflict with currently open partitions? Say, if we
have sda1 and sda2, sda1 is open/mounted, and new partition
table does not have sda2, but sda1 is unchanged - it's pretty
safe to apply new partition table, without affecting mounted
sda1. Ditto for adding new partitions.

Yes, a line should be drawn somewhere - say, if sda3 was
mounted, and we removed unused sda2, but sda3 (which becomes
sda2 with new table) is intact, we should not apply new
table.

Is it possible to implement such a feature? I mean, is it
easy to know which *partitions* (subdevices?) of the whole
device are currently in use, as opposed to the whole drive?

IMHO you've wrote much more here, then just for not-so-useless-solution, that i've wrote above, unless you want another wind0s clever-heuristic with patches from happy users to lkml: <http://article.gmane.org/gmane.linux.kernel/437388>

Thanks.

/mjt


--
-o--=O`C /. .\ (+)
#oo'L O o |
<___=E M ^-- | (you're barking up the wrong tree)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [opensuse] HowTo get rid of SuSe 10.2 a residual burden on my hard drive
    ... Your assessment of openSUSE 10.2 is somewhat discouraging. ... Installation" believing this would wipe out the hard drive so erasing ... It will make the *partition* sda2 available ...
    (SuSE)
  • Re: expand /boot partition?
    ... That's why I stopped using a /boot partition. ... I use the Windows Vista boot manager to load up Windows or Ubuntu. ... grub is installed on sda2 instead of the root of sda. ... It won't even let me load grub from sda2 to get into ubutnu. ...
    (Ubuntu)
  • Re: Disk Partiotioning
    ... it depends mostly on your partition layout. ... sda3, then merge the new space onto the end of sda2. ... you should then be able to expand sda2 into the re-claimed space. ...
    (Fedora)
  • Re: Disk Partiotioning
    ... Since your root partition comes ... Create a new sda2 the size your new root partition should be. ... Copy everything in sda3 to sda2. ...
    (Fedora)
  • Re: error loading operating system
    ... and it seems that swap is in sda1 and the root in sda2, ... when I have the root partition as the only partition, ...
    (alt.os.linux.suse)