Julien Vehent on 27 Jan 2011 19:39:09 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Ninja repair of a XFS volume |
On 01/27/2011 09:45 PM, Rich Freeman wrote:
On Thu, Jan 27, 2011 at 6:54 PM, Julien Vehent<julien@linuxwall.info> wrote:The normal move would be to restart the system in single user, or using a live cd, and run a xfs_repair on /dev/sda.Well, the key is to not have sda mounted. If that is your root partition, then a liveCD/etc may be your only option. Or, if you can get your virtual hosting provider to send you a disk image and take a fixed one back you can easily fix it with a loopback device/etc.
I don't get that kind of service for a 15euros/months hosting service (dedibox by online.net if you're curious).
So, question is: does anyone know a way to repair/fix that XFS filesystem by hand ? Any low-level XFS manipulation tool that could help ?I would think that any approach would not work safely if the device is mounted. The OS caches critical control structures in RAM, so once you fix what is on disk they could be overwritten by inconsistent metadata the next time there is a flush. If the device isn't mounted then the usual xfs repair tools will fix the problem. If the device is mounted then there isn't much you can do, unless you build some kind of a kernel module with your own custom xfs code that allows online fixing (I'm sure a patch for that would make everybody happy).
That's not happening, I can't write xfs code.However, somebody on serverfault proposed that I migrate / in a tmpfs on the fly, the migrate the root and unmount my volume. That's crazy enough (on a production system), I might try it. Note that when I say production, It's just websites of friends and related and a few other services.
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug