[Bug 119224] Re: xfs_admin gives "fatal error" when trying to label mounted device

A S M K De Alwis 119224 at bugs.launchpad.net
Thu Sep 19 17:59:15 UTC 2019


[root at localhost ~]# xfs_repair /dev/VG1/PV1
xfs_repair: /dev/VG1/PV1 contains a mounted filesystem
xfs_repair: /dev/VG1/PV1 contains a mounted and writable filesystem

fatal error -- couldn't initialize XFS library

[root at localhost ~]# umount -a

[root at localhost ~]# xfs_repair /dev/VG1/PV1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done
[root at localhost ~]# xfs_admin -L HD1 /dev/VG1/PV1
writing all SBs
new label = "HD1"

Unmount the physical volume and run the command. It worked for my issue.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to xfsprogs in Ubuntu.
https://bugs.launchpad.net/bugs/119224

Title:
  xfs_admin gives "fatal error" when trying to label mounted device

Status in xfsprogs package in Ubuntu:
  Won't Fix

Bug description:
  Binary package hint: xfsprogs

  I'm runnig Ubuntu Feisty (amd64) and have formatted my sw-raid5 device
  with XFS, but I forgot to label it.

  When I later run...
  # xfs_admin -L "my_new_label" /dev/md0
  ... I got the following errormessage:
  "xfs_admin: /dev/md0 contains a mounted filesystem

  fatal error -- couldn't initialize XFS library".

  Okey, I know that I can't label the filesystem when it is mounted (at
  least now, after the error message), but my point is that the "fatal
  error" shouldn't appear, even if the filesystem is mounted. xfs_admin
  shouldn't try to label if it find the drive mounted (if that is why
  the message appear), and therefor shouldn't give errormessages. Just a
  notify, like the first line in the error-message, and that only, in my
  opinion.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/119224/+subscriptions



More information about the foundations-bugs mailing list