All of lore.kernel.org
 help / color / mirror / Atom feed
From: "CN" <cnliou9@fastmail.fm>
To: xfs@oss.sgi.com
Subject: Re: xfs_check refuses to work on readonly fs
Date: Wed, 02 Aug 2006 22:36:00 +0800	[thread overview]
Message-ID: <1154529360.12604.267468790@webmail.messagingengine.com> (raw)
In-Reply-To: <20060801153951.GB17036@linuxathome.me>

Hi! Hedi,

> Based on the info you provided I infer that you're running Linux.

Yes. I forgot to mention this.

> | # init 1
> | # mount -o ro,remount /
> | # mount
> | /dev/hda1 on / type xfs (rw)
> | # xfs_check /dev/hda1
> | xfs_check: /dev/hda1 contains a mounted and writable filesystem
> |
> | xfs_check/xfs_repair are willing to work only when I boot from a disk
> | and check/repair the other unmounted disk.
> |
> | Why "mount" shows (rw) instead of (ro) even "mount -o ro,remount /" is
> | issued?
> 
> Because mount is relying on /etc/mtab which couldn't be updated
> precisely because / was remounted ro.
> 
> You'll need a recent xfsprogs version, at least 2.7.17 IIRC, one
> that uses that uses /proc/mounts instead of /etc/mtab to check
> filesystem status.
> 
> Or you can use a dirty and quick hack
> 
>     - prior to remounting ro, edit /etc/mtab and change the root fs entry
>     from
>     rw to ro.
>     - remount ro
>     - run your xfs_check/xfs_repair in dangerous mode.
> 
> FWIW the safe thing to do after a repair on a mounted root FS is to
> reboot.

I upgraded xfsprogs to 2.8.4 and have tried both approaches you provided
but still have no luck. Only one thing is different: "mount" now reports
"ro" if I edit /etc/mtab as you instructed.

Regards,

CN

-- 
http://www.fastmail.fm - The professional email service

      reply	other threads:[~2006-08-02 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-01 11:55 xfs_check refuses to work on readonly fs CN
2006-08-01 15:39 ` Hedi Berriche
2006-08-02 14:36   ` CN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1154529360.12604.267468790@webmail.messagingengine.com \
    --to=cnliou9@fastmail.fm \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.