Re: Any guide to replace a xfs logdev?

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

 



Hi,

Thanks a lot.

'xfs_repair -L' works well to replace a xfs logdev.
# kernel: 4.18.0-348 / 5.15.21

but a qestion 'cleanly unmounted' below.


> On 2/7/22 9:23 PM, Wang Yugui wrote:
> > Hi,
> > 
> > Any guide to replace a xfs logdev?
> > 
> > case 1: logdev device failed.
> > case 2: replace the logdev with a new NVDIMM-N device.
> > 
> > but I failed to find out some guide to  replace a xfs logdev.
> 
> The external log is specified at mount time on the mount command line,
> so all you should need to do is use the "-o logdev=/dev/XXX" option
> to point at the new device, which must be at least as large as the old
> device, and should be completely zeroed.
> 
> If the filesystem was cleanly unmounted, this should be all that is required.

'mount -o logdev=/dev/newlogdevice' failed,
# kernel: 4.18.0-348(centos 8.5) / 5.15.21

the message in dmesg:
Corruption warning: Metadata has LSN (1:6) ahead of current LSN (1:0).
Please unmount and run xfs_repair (>= v4.3) to resolve.

/dev/newlogdevice is with a same size, and zeroed by blkdiscard(SSD)

'umount' is not enough to get  a  ' cleanly unmounted'?


> If the log device failed during operation, the filesystem is probably
> not consistent, and you will most likely need to run an xfs_repair,
> zeroing out the log and repairing any inconsistencies, since your log
> device has failed and no longer replayable. So, something like:
> 
> # xfs_repair -L -l /dev/newlogdevice /dev/xfsdevice
> 
> where /dev/xfsdevice is your data device holding the filesystem,
> and /dev/newlogdevice is your new/replaced log device.
> 
> Before you actually do this, you might want to see if anyone corrects
> my statements or notices anything I missed. ;)


Best Regards
Wang Yugui (wangyugui@xxxxxxxxxxxx)
2022/02/09





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux