Hi, I have a dual-ported raid controller which allows two computers to connect to the same ext3 filesystem. I never mount both systems read-write at the same time. What I would like to do is use one normally, and mount the second system read-only to perform backups and to rsync the filesystem to another filesystem. When it's mounted read-write from another system, will mounting the same filesystem read-only cause the journal to be committed at the time it's mounted? If so, is that a bad thing, that is, will it corrupt the filesystem? Are journal events handled similar to databases, with regard to transaction processing of journal events, or could playing "partial" journal events (if there is such a thing) cause corruption? Is mounting the read-only instance as a ext2 filesystem the best solution, or does it matter if it's mounted ext2 or ext3 as long as it's read-only? -- Jeff Garlough
On Oct 16, 2006 12:04 -0500, Jeff Garlough wrote:> What I would like to do is use one > normally, and mount the second system read-only to perform backups and > to rsync the filesystem to another filesystem. When it's mounted > read-write from another system, will mounting the same filesystem > read-only cause the journal to be committed at the time it's mounted?Yes, that is very bad.> If so, is that a bad thing, that is, will it corrupt the filesystem?Yes, it can corrupt the filesystem.> Are journal events handled similar to databases, with regard to transaction > processing of journal events, or could playing "partial" journal events > (if there is such a thing) cause corruption? Is mounting the read-only > instance as a ext2 filesystem the best solution, or does it matter if > it's mounted ext2 or ext3 as long as it's read-only?You can't mount it as ext2. I would instead use a block-device level backup, like "dump" if you really need to do it this way. You are probably better off just doing the backup from the primary node. Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.
Jeff Garlough <jeffg at ahpcrc.org> writes:> I have a dual-ported raid controller which allows two computers to > connect to the same ext3 filesystem. I never mount both systems > read-write at the same time. What I would like to do is use one > normally, and mount the second system read-only to perform backups and > to rsync the filesystem to another filesystem.That will not work, full stop, ever, with ext3. Find another solution. If you did do this, envision: On the master node, where read/write activities are going on, we have a bunch of on-disk data and a bunch of meta-data in memory. Things like inode allocation tables, etc. These get written out to disk every now and then, through the journal and for other reasons, on whatever schedule the master node feels is worthwhile. Meanwhile, over on the slave node you mount the file system. It reads some meta-data into memory and keeps it there, for convenience. You start working on data -- and, meanwhile, over on the master we update some of the meta-data that the slave has in memory. Now, the slave doesn't know that was updated, so it keeps using that in-memory data happily. Except, then it needs to load some fresh data from disk and, pow, huge inconsistency in the file system. ext3 alone cannot do what you want. You might get away with it if you can take a snapshot of the (consistent) state on the master, then mount that on the slave, but that probably isn't a great plan either. I strongly suggest you investigate some other solution like, say, simply running your backups on the master. You will have the same resource use in both cases, pretty much, unless your rsync process is very checksum intensive... Regards, Daniel -- Digital Infrastructure Solutions -- making IT simple, stable and secure Phone: 0401 155 707 email: contact at digital-infrastructure.com.au http://digital-infrastructure.com.au/