xfs
[Top] [All Lists]

migrating from internal to external logs

To: linux-xfs@xxxxxxxxxxx
Subject: migrating from internal to external logs
From: Steve Lord <lord@xxxxxxx>
Date: Fri, 13 Jul 2001 11:19:56 -0500
Sender: owner-linux-xfs@xxxxxxxxxxx
I just came up with this sequence for moving a filesystem with a small
internal log to one with a larger external log. I have not tested it, and you
should not test it without using a dummy partition.

Steve

------- Forwarded Message

Date:    Fri, 13 Jul 2001 11:15:25 -0500
From:    Steve Lord <lord@xxxxxxx>
To:      utz lehmann <xfs@xxxxxxxxxx>
cc:      Steve Lord <lord@xxxxxxx>
Subject: Re: benchmarks 

> Hi Steve
> 
> Steve Lord [lord@xxxxxxx] wrote:
> > An external log is growable, an internal one unfortunately is not, and
> > we keep kicking SGI support people who build multi-terabyte filesystems
> > without reading the man page.
> 
> Is it possible to switch an existing filesystem from internal to external
> log? And maybe back?
> 
> 
> utz

You would need to format another partition with the correct log information,
probably by using dd to get the original log out of the filesystem. Then
take mount the filesystem with the mount option for the external log,
then grow the log with xfs_growfs. In order to find the log on an existing
filesystem do this:

 xfs_db /dev/hdc4
xfs_db: sb 0
xfs_db: print
magicnum = 0x58465342
blocksize = 4096
dblocks = 1892898
rblocks = 0
rextents = 0
uuid = 0cf3fdce-8924-40c1-8fb5-6a8a0f137caa
logstart = 1048580
rootino = 128
rbmino = 129
rsumino = 130
rextsize = 16
agblocks = 236613
agcount = 8
rbmblocks = 0
logblocks = 4096
versionnum = 0x2084
sectsize = 512
inodesize = 256
inopblock = 16
fname = "\000\000\000\000\000\000\000\000\000\000\000\000"
blocklog = 12
sectlog = 9
inodelog = 8
inopblog = 4
agblklog = 18
rextslog = 0
inprogress = 0
imax_pct = 25
icount = 46080
ifree = 231
fdblocks = 1334163
frextents = 0
uquotino = 0
gquotino = 0
qflags = 0
flags = 0
shared_vn = 0
inoalignmt = 2
unit = 0
width = 0
dirblklog = 0

There is a logstart field in there and a logblocks, both are in filesystem
block size units. You will need to modify the logstart field to zero before
mounting the external log, for this you need the -x option on xfs_db to
enable write mode. After printing out the superblock like this you would
use this command:

        write logstart 0

To reset it.

I have not tested any of this, you should definitely not do it on a
filesystem you really want to keep.

Going backwards would be possible, but you need to remember the original
value for logstart and logblocks and reset them.

Steve

p.s. clean unmounts only, do not attempt this after a crash!


------- End of Forwarded Message


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