Change XFS logdev
by MensaWater from LinuxQuestions.org on (#59W6H)
We have some XFS filesystems which use logdev devices. The filesystems themselves are on LVM logical volumes but the logdev devices are on /dev/sd* SCSI devices. After a recent issue the filesystems wouldn't mount and we realized the issue was the /dev/sd* devices had changed (e.g. originally it was /dev/sdk but it became /dev/sdm). Updating fstab to use /dev/sdm instead of /dev/sdk resolved the mount and got us going.
What we want to do is quit using /dev/sd* device for logdev and instead put that into LVM so we use an LV. That way it will find the correct device via LVM.
I found examples online of using LVs for the logdev but can't find a clear answer to the question:
How do we change the logdev from what it is to what we want it to be?
That is to say can we just change the name in fstab to specify the LV we create after unmount then remount or is there more involved? Man pages show the -l flag specifies the logdev at creation and also with xfs_admin but doesn't explicitly say it can be used to change the device. Do we have to preserve anything from the existing logdev after a clean unmount before trying to use the new logdev?


What we want to do is quit using /dev/sd* device for logdev and instead put that into LVM so we use an LV. That way it will find the correct device via LVM.
I found examples online of using LVs for the logdev but can't find a clear answer to the question:
How do we change the logdev from what it is to what we want it to be?
That is to say can we just change the name in fstab to specify the LV we create after unmount then remount or is there more involved? Man pages show the -l flag specifies the logdev at creation and also with xfs_admin but doesn't explicitly say it can be used to change the device. Do we have to preserve anything from the existing logdev after a clean unmount before trying to use the new logdev?