On 2/28/14, 7:54 AM, Zdenek Kabelac wrote:
> Dne 28.2.2014 14:37, Chris Murphy napsal(a):
>>
>> On Feb 28, 2014, at 1:33 AM, Zdenek Kabelac <zkabe...@redhat.com> wrote:
>>
>>
>>>>>      fsadm failed: 3
>>>
>>
>>> man fsadm
>>>
>>> DIAGNOSTICS
>>>        On  successful completion, the status code is 0.  A status code of 2 
>>> indicates the operation was interrupted by the user.  A
>>>        status code of 3 indicates the requested check operation could not 
>>> be performed because the filesystem is mounted  and  does
>>>        not support an online fsck(8).  A status code of 1 is used for other 
>>> failures.

Ok, granted, I should have read the fsadm manpage.  :)

>> Yeah but did fsadm fail? No, as a whole its operation succeeded.
>> Can we say fsadm failed to run fsck? I guess that's one way to look
>> at it, but then it failed to understand it shouldn't request a
>> check operation on XFS in the first place.
>>
>> Chris Murphy
>>
> 
> Current logic of lvm is to call fsadm  to check blockdevice  (lvm2 knows 
> nothing about about filesystems).
> 
> fsadm translate this to check xfs - which is not supported by xfs

Well, it failed to check it because it is *mounted*, right?  It said this:

>> fsadm: Skipping filesystem check for device "/dev/mapper/VG-LV" as the 
>> filesystem is mounted on /mnt
>>    fsadm failed: 3

extN does the same thing:

# e2fsck /dev/sdb3 
e2fsck 1.41.12 (17-May-2010)
/dev/sdb3 is mounted.
e2fsck: Cannot continue, aborting.

# xfs_repair /dev/sdc4
xfs_repair: /dev/sdc4 contains a mounted filesystem

fatal error -- couldn't initialize XFS library

> (I've no idea if there ever be support for this operation) - so fsadm
> reports it has failed to do any check.

xfs certainly does have check and repair tools - man xfs_repair.
You can run it with "-n" if you want check-only.

However, I see that (at leat my copy of) fsadm reqiures xfs_check,
which has been deprecated upstream in favor of xfs_repair -n.
xfs_check doesn't scale, and xfs_repair -n performs the same
tasks.

> XFS_CHECK=xfs_check

so I guess I should file a bug on that.

> lvm2 detects through error code 3 that requested operation is not
> supported, but considered safe to be ignore and continues.
> 
> Of course fsadm could return 0 - but then it wouldn't be able to
> recognize if check really was made or just skipped.
> 
> This message is only shown in verbose mode - and it's mainly for
> developer to know what has happened (or actually not happened)

Ok, that's fair enough.

Thanks,
-Eric

> 
> Zdenek
> 

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Reply via email to