xfsalid process holds xfs partition after umount

S

Sagar Shedge

Guest
Currently I have an issue that after umount XFS partition , some processes hold that partition. Due to that I am not able to delete that partition or create new partition on it.
One strange thing is that , this issue can be seen only if I add mount entry in /etc/fstab while boot up. i.e. when machine boots up at that time if mount entry is present in /etc/fstab then this issue can be seen, If after boot up , I add entry to /etc/fstab and try mount -a then everything works fine.

I just call
$> umount /data

$> cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Tue Jun 9 22:12:40 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=b0f09e35-fbbc-4ab5-9cc1-0ee6f3689213 / ext3 defaults 1 1
UUID=1964bd56-9a92-4b04-8757-a8e14afe9f07 /boot ext3 defaults 1 2
UUID=24bfc94e-a45e-4f2c-a90d-1e30db479ab5 /home ext3 defaults 1 2
UUID=f8ca4cec-2dc6-4fed-902e-5a7790c3c44e /var ext3 defaults 1 2
LABEL=/data /data xfs defaults 1 0

-----
OS - Fedora 18
Kernel - 3.7.5 x86_64 bit

---
Processes holding partition after umount -

root 587 0.0 0.0 0 0 ? S< Jun08 0:00 [xfsalloc]
root 588 0.0 0.0 0 0 ? S< Jun08 0:00 [xfs_mru_cache]
root 589 0.0 0.0 0 0 ? S< Jun08 0:00 [xfslogd]
root 590 0.0 0.0 0 0 ? S< Jun08 0:00 [xfs-data/sdb1]
root 591 0.0 0.0 0 0 ? S< Jun08 0:00 [xfs-conv/sdb1]
root 592 0.0 0.0 0 0 ? S< Jun08 0:00 [xfs-cil/sdb1]
root 593 0.0 0.0 0 0 ? S Jun08 0:00 [xfsaild/sdb1]

Please let me know if you need more details.
 


xfsaild = XFS Access Item List Daemon

This link appears relevant to your issue - http://ubuntuforums.org/showthread.php?t=951844 . In summary, replace "defaults" with "rw,user,auto" on the XFS fstab entry. Also, specify the device path instead of the "LABEL".

This daemon (background service) is usually in sleep mode and has many bugs as seen in the listed links.
Since the daemon has been proven to be buggy (try googling "xfsaild"), perhaps, the daemon is not waking up to close itself down. If this is the case, then a possible sollution would be to make a script for unmount XFS. Name such a script "xfsunmount" and have the script kill some of the XFS-related daemons. Then, the script can try the "unmount" command.

In the fstab file, I see that you specify the "defaults" parameter. You may want to check these defaults and make sure that you are not implicitly declaring parameters that may be causing the issue.

I also noticed that you declare the XFS partition by "LABEL". Try the device path instead (such as /dev/sdc3, or where ever you have the XFS partition). This article may help - http://www.linux.org/threads/etc-fstab-explained.7214/

Here is my /etc/fstab
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>  <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=7c08c477-0ed4-4794-b847-982bce578592 /  ext4  errors=remount-ro 0  1
# /boot was on /dev/sda2 during installation
UUID=ba8bb222-1606-4875-a924-c2b905840e62 /boot  ext4  defaults  0  2
# /home was on /dev/sda3 during installation
UUID=7708003f-c85b-4c87-8bb9-d5c0357092bb /home  ext4  defaults  0  2
# swap was on /dev/sda10 during installation
UUID=2cf8738e-1c13-46f8-b263-5fe46f0da5ca none  swap  sw  0  0
# swap was on /dev/sda9 during installation
UUID=4236dabb-fa7d-4066-b171-91ffa7afb4f4 none  swap  sw  0  0

Notice that the comments (that came with the file on my Ubuntu system) recommend using "UUID".

This may not be the problem, but check just in case. Ensure that the mountpoint and partition allow you permission to access the mountpoint (/data/) and partition (the top-level of the XFS partition). Use the chmod command to change the permissions if needed.
sudo chmod -R ug+rwx /data/ # recursively grant the current user and group read, write, and execute permissions.
Alternately,
sudo chmod ug+rwx /data/ # grant the current user and group read, write, and execute permissions to the mountpoint

I do not know how skilled you are with Linux, so feel free to ask for details and clarification.
 
By the way, most people unmount partitions by specifying the device path - umount /dev/sdb2
 
@Sagar Shedge , why are you using XFS? Could you use some other filesystem? Why are you using "LABEL" in the FSTAB rather than the device path or UUID? As mentioned in many of those links I included, xfsaild has bugs. Perhaps, you could try updating your system (including the kernel). Also, what if you permanently disabled some of those XFS daemons (such as xfsaild and xfslogd)?
 
Thanks DevynCJohnson for reply.
I tried steps mentioned above but it won't help. I will try with UUID and let you know the result.
Something wrong with these daemons. You have mentioned that 'Also, what if you permanently disabled some of those XFS daemons (such as xfsaild and xfslogd)?'
So how can I achieve this?
 
@Sagar Shedge
Many Linux distros come with a start-up and/or boot-up manager. This is a program that allows users to control what processes and services start at boot-time (boot-up managers) or after logging into the system (start-up managers). Try installing "bum" (Boot-Up Manager) which specifically manages boot-time processes (this may be where the XFS daemons begin).
Not all services will appear in the start-up manager until a special command is run with Root-privileges to make "hidden services" visible. The command is
Code:
sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop

Here are two helpful links
Disable Daemons - https://linuxacademy.com/blog/linux/disabling-unused-daemons-to-speed-up-your-boot-sequence/
Chkconfig - http://www.tecmint.com/chkconfig-command-examples/

According to the chkconfig article, you may be able to use a command such as
Code:
chkconfig --level 0123456 xfsaild off
(with Root privileges).
 

Members online


Top