[note email sent to linux-fsdevel, as it's OT for l-k]
Kjetil Torgrim Homme writes:
> Linus Torvalds wrote:
> > If you are fdisk'ing your disks while you have processes with open
> > descriptors to the partitions, you're asking for trouble, and you
> > deserve whatever you get. Don't be ridiculous - this is not
> > something we should even TRY to fix.
>
> On Solaris, I routinely resize partitions and grow file systems while
> running with the file systems mounted. Whatever decreases downtime is
> useful in my book.
With my kernel patch and LVM, you can also resize ext2 filesystems while they
are mounted. This doesn't have anything to do with e2fsck, however, which
is what Linus is talking about. The big difference is that the ext2online
user-space code is only modifying parts of the disk that are not in use
by the filesystem, and then the kernel code holds a filesystem lock for
a short time while updating the superblock/group descriptors in memory and
on the disk in a consistent way.
The e2fsck program, on the other hand, runs with the expectation that
it is the sole user of the disk (hence the warning when it starts if it
thinks the filesystem is mounted). Any writes it does have a good chance
to corrupt the filesystem, since the kernel will have a different opinion
of what is on the disk, and will also be writing to the disk at the same
time. There should never be a need to run e2fsck on a mounted filesystem.
On the other hand, it shouldn't be any problem to have a user-space tool
to check that the backup superblock/GD copies are consistent with the primary
In fact, the ext2online user-space does a copy of the primary superblock/GD
to all of the backups after the the kernel resize code is finished. These
backup superblocks and group descriptors are never in use while the
filesystem is mounted, so it is safe to write into them.
Maybe e2fsck can check that the first 2 superblocks match at boot time,
and leave the rest to user-space code, or until the filesystem is unmounted
or e2fsck is run that modifies the filesystem.
Cheers, Andreas
-- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:17 EST