On Mon, 2005-04-04 at 07:28 +0400, Andrey Chernov wrote: > BTW, the trick with kern.geom.debugflags=16 works and I put it permanently > in my sysctl.conf. Could you please make it ON by default or make a > warning at least? I actually agree with this. It's so frustrating to not be able to do what you want to do as root. Consider the following two examples: - Freshly installed machine, I want to move the root disk to be a GEOM mirror. I can't, because gmirror can't open /dev/ad0 for writing, even though I know the last sectors which it needs to write to are unused. It can't even be done in single user mode, as / is still mounted. The only way to do this seems to be to boot off a fixit CD, with all the problems that brings with it. (this issue has been discussed several times before) - I have a partition, which I would like to split into two smaller partitions. Even though it is unmounted, and it's perfectly safe to do, I'm prevented from doing it. Again, it can't be done in single user mode either. Back to the fixit CD. I fully understand why the feature exists, but when it gets in the way of legitimate system administration then perhaps it should be disabled by default (or perhaps based on securelevel). Having to flip bits clearly labelled "debug" flags doesn't seem to be a good solution. Maybe the way forward is to make it more intellegent, "hang on, you can't destroy that partition because this geom is using it". I 'm not sure how this could be implemented, I guess another geom method would have to exists to basically say "somebody wants to make this change, is it ok with you?" before the write occurs, and the caller either gets returned success, or something like EROFS if the responsible geom turned it down. Only the geom in question can ever know if a particular change is safe, so it should be up to that to authorise or deny a change. Or, allow the change, then notify all attached consumers of da0 and say "hey, something's changed". Let the consumers pass that down to the consumers it affects which either respect it (if it can be respected or if it changes nothing significant) or self-destruct. I don't know enough about geom to know the best solution, but something really should be done about it. GavinReceived on Mon Apr 04 2005 - 10:47:32 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:31 UTC