xfs
[Top] [All Lists]

Re: It just begs the question everywhere: how to move a journaling log t

To: Steve Lord <lord@xxxxxxx>
Subject: Re: It just begs the question everywhere: how to move a journaling log to a new device?
From: Eric Sandeen <sandeen@xxxxxxx>
Date: Wed, 19 Nov 2003 21:55:23 -0600 (CST)
Cc: Laurent Imbaud <laurent@xxxxxxxxx>, <linux-xfs@xxxxxxxxxxx>
In-reply-to: <1069297762.11773.22.camel@fubar>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Wed, 19 Nov 2003, Steve Lord wrote:

> Next you need to update the superblock with the new length
> and offset for the log.
> 
> xfs_db -x /dev/xxx
> sb 0
> p
> write logstart XXX
> write logblocks YYY
> 
> The -x gives you write access.
> 
> Now exit xfs_db and run this:
> 
> xfs_repair -L -l /dev/logdev /dev/xxx
> 
> This will assume /dev/logdev is where the log lives and initialize
> it, issuing a stern warning that you are trashing log data.

You probably will need to use xfs_db to modify more of the
superblocks, or the xfs_repair step will probably revert
logstart back to an internal log.  The algorithm
for which secondary sb's are checked is tricky, so just
modify all superblocks by repeating:

sb X
write logstart 0
write logblocks YYY

for all superblocks ("p agcount") will tell you how many to do.

Also, I think that steve's suggestion of writing multiple
logs to one partition may not work; if logstart!=0 it's assumed
to be external, and the logdev option will be rejected.

-Eric


<Prev in Thread] Current Thread [Next in Thread>