[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: external log config [was: Million files or so on RAID 5 Partition]



>>[...] xfs_repair -l /dev/newpartition -L /dev/maindevice

> No, this will not do anything to the filesystem - might be an
> interesting way to switch the log to external though.

Oh... I was intending to use it to move an already-external log
to a *different* device, assuming the original logdev had been
trashed somehow.

If the filesystem is unmounted cleanly, and I use the above
to initialize the new log partition, will anything have been lost?
I.e. is the log empty after a clean umount?

I tried a few things, like:

   create two xfs filesystems (sda1, sda2)
   each with its own external log (hda5, hda6)

Tried mounting one fs with the other's log:
   mount -o logdev=/dev/hda6  /dev/sda1
This failed as expected.

Tried xfs_repair as:
   xfs_repair -l /dev/hda6  /dev/sda1
This complained too, reporting that the logdev and fs UUIDs
didn't match, or something.  That's good.

Then told xfs_repair to erase the log:
   xfs_repair -l /dev/hda6 -L  /dev/sda1
This succeeded.  And I could then
   mount -o logdev=/dev/hda6  /dev/sda1
without apparent error, and the filesystem *appeared*
to be intact.

> I think the argument parsing needs some work here - I suspect you can 
> specify an external log on the mount line when you do not have
> one in the filesystem.....

Would the logdev= just be ignored in that case?

> There is no way of moving the log without dump/mkfs/restore.

Doesn't the above recipe amount to moving the log?  Do I lose anything?

> Steve