How to force xfs filesystem to shutdown?

93 篇文章 1 订阅

How to force xfs filesystem to shutdown?

 SOLUTION UNVERIFIED - 已更新 2019年四月8日10:47 - 

English 

环境

  • Red Hat Enterprise Linux 7
  • XFX filesystem

问题

  • Unmounting an xfs filesystem failed with EBUSY.

Raw

# umount /mount_point
umount: /mount_path: target is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
  • Could not identify any user process accessing the filesystem:

Raw

# fuser -muv /mount_point
                     USER        PID ACCESS COMMAND
/mount_path:               root     kernel mount (root)/mount_point

# lsof | grep "/mount_point"
# 
  • Unmounted the filesystem with --lazy option to detach that from the filesystem hierarchy.

Raw

# umount -l /mount_point
# 
  • After that, deactivating the volume group still failed with below error:

Raw

# vgchange -an vg01
  Logical volume vg01/lv01 contains a filesystem in use.
  Can't deactivate volume group "vg01" with 1 open logical volume(s)
  • Looks like some unknown process stil have an access on the filesystem after that filesystem was detached from the filesystem hierarchy with --lazy umount option. How do I force an xfs filesystem to shutdown when unmounting that filesystem failed?

决议

  • Use xfs_io shutdown to shutdown the xfs filesystem forcibly.

Raw

# umount /mount_point/
umount: /mount_point: target is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

# xfs_io -x -c 'shutdown -f' /mount_point
# 

# ls /mount_point
ls: cannot access /mount_point: Input/output error

# df /mount_point
df: ‘/mount_point’: Input/output error
  • After that, please try to unmount that filesystem and deactivate the volume group:

Raw

# umount /mount_point
# 

# vgchange -an vg01
  0 logical volume(s) in volume group "vg01" now active
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值