<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FSCK vxfs returning code ... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610008#M234352</link>
    <description>Found in google:&lt;BR /&gt;&lt;BR /&gt;man pages-&amp;gt;HP-UX 11i man pages -&amp;gt; fsck_vxfs (1m)  &lt;BR /&gt;&lt;BR /&gt;RETURN VALUES    [Toc]    [Back]&lt;BR /&gt;      Structural errors discovered during a full check are displayed on&lt;BR /&gt;      standard output.  Responses required during a full check are read from&lt;BR /&gt;      standard input.&lt;BR /&gt;&lt;BR /&gt;      The following return codes are used for the -m option for all devices&lt;BR /&gt;      other than the one used by the root file system:&lt;BR /&gt;&lt;BR /&gt;            0   The file system is unmounted and clean.&lt;BR /&gt;&lt;BR /&gt;           32   The file system is unmounted and needs checking.&lt;BR /&gt;&lt;BR /&gt;           33   The file system is mounted.&lt;BR /&gt;&lt;BR /&gt;           34   The stat of the device failed.&lt;BR /&gt;&lt;BR /&gt;           Other&lt;BR /&gt;                The state could not be determined because of an error.&lt;BR /&gt;&lt;BR /&gt;      The following return codes are used for the -m option for the device&lt;BR /&gt;      used by the root file system:&lt;BR /&gt;&lt;BR /&gt;            0   The root file system is mounted read-only and is clean, or&lt;BR /&gt;                the root file system is mounted read/write and therefore is&lt;BR /&gt;                clean.&lt;BR /&gt;&lt;BR /&gt;           32   The root file system is mounted read-only and needs&lt;BR /&gt;                checking.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Alex.</description>
    <pubDate>Tue, 23 Aug 2005 14:51:22 GMT</pubDate>
    <dc:creator>Alex Lavrov.</dc:creator>
    <dc:date>2005-08-23T14:51:22Z</dc:date>
    <item>
      <title>FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610005#M234349</link>
      <description>Hi folks,&lt;BR /&gt;&lt;BR /&gt;I have to make a backup script that works on a BCV, and I must do a fsck on the volumes before mounting them on our Media Server (of course... :-). The situation I want to handle is if a "regular" fsck doesn't work, I'd try the full  one. I cannot performa a full one on all of the volumes due to time restrictions.&lt;BR /&gt;&lt;BR /&gt;But when checking fsck_vxfs man page, I found the information confusing about returning codes. There are several for the "-m" option, but no returning code if it ends asking for a full FSCK. Instead, it describes outputs. Below is a excerpt from the refered man page.&lt;BR /&gt;&lt;BR /&gt;What should I do? Plenty of points to assign.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;Filipe.&lt;BR /&gt;&lt;BR /&gt;"&lt;BR /&gt;      In most cases, fsck prints the following messages:&lt;BR /&gt;&lt;BR /&gt;           log replay in progress&lt;BR /&gt;           replay complete - marking super-block as CLEAN&lt;BR /&gt;&lt;BR /&gt;      If the file system is already clean, fsck prints the following message&lt;BR /&gt;      instead:&lt;BR /&gt;&lt;BR /&gt;           file system is clean - log replay is not required&lt;BR /&gt;&lt;BR /&gt;      If fsck prints any other messages, a full structural check is needed.&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Aug 2005 14:32:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610005#M234349</guid>
      <dc:creator>Filipe_1</dc:creator>
      <dc:date>2005-08-23T14:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610006#M234350</link>
      <description>Hi Filipe ,&lt;BR /&gt;&lt;BR /&gt;"replay complete - marking super-block as CLEAN"&lt;BR /&gt;&lt;BR /&gt;Is a normal message ,when it checks in  phase 1 - Check Blocks and Sizes&lt;BR /&gt;&lt;BR /&gt;and running full fsck ,  i.e # fsck -F vxfs -o full /dev/vgxx/lvolxy&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Aug 2005 14:43:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610006#M234350</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2005-08-23T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610007#M234351</link>
      <description>First thought in my head:&lt;BR /&gt;&lt;BR /&gt;Get the output of fsck to some variable and then just grep for the known words, like "CLEAN" or "full", this how you can know how fcks ended ...&lt;BR /&gt;&lt;BR /&gt;Alex.&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Aug 2005 14:44:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610007#M234351</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-08-23T14:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610008#M234352</link>
      <description>Found in google:&lt;BR /&gt;&lt;BR /&gt;man pages-&amp;gt;HP-UX 11i man pages -&amp;gt; fsck_vxfs (1m)  &lt;BR /&gt;&lt;BR /&gt;RETURN VALUES    [Toc]    [Back]&lt;BR /&gt;      Structural errors discovered during a full check are displayed on&lt;BR /&gt;      standard output.  Responses required during a full check are read from&lt;BR /&gt;      standard input.&lt;BR /&gt;&lt;BR /&gt;      The following return codes are used for the -m option for all devices&lt;BR /&gt;      other than the one used by the root file system:&lt;BR /&gt;&lt;BR /&gt;            0   The file system is unmounted and clean.&lt;BR /&gt;&lt;BR /&gt;           32   The file system is unmounted and needs checking.&lt;BR /&gt;&lt;BR /&gt;           33   The file system is mounted.&lt;BR /&gt;&lt;BR /&gt;           34   The stat of the device failed.&lt;BR /&gt;&lt;BR /&gt;           Other&lt;BR /&gt;                The state could not be determined because of an error.&lt;BR /&gt;&lt;BR /&gt;      The following return codes are used for the -m option for the device&lt;BR /&gt;      used by the root file system:&lt;BR /&gt;&lt;BR /&gt;            0   The root file system is mounted read-only and is clean, or&lt;BR /&gt;                the root file system is mounted read/write and therefore is&lt;BR /&gt;                clean.&lt;BR /&gt;&lt;BR /&gt;           32   The root file system is mounted read-only and needs&lt;BR /&gt;                checking.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Alex.</description>
      <pubDate>Tue, 23 Aug 2005 14:51:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610008#M234352</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-08-23T14:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610009#M234353</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;From the man page it is seen that&lt;BR /&gt;&lt;BR /&gt;"fsck will return 0 if the file system is suitable for mounting. If the file system needs additional checking, the return code is 32. If the file system is mounted, the return code is 33. Error codes larger than 33 indicate that the file system is badly damaged."&lt;BR /&gt;&lt;BR /&gt;So write a script and get the return codes. I think $? gives the return code in shell script.&lt;BR /&gt;&lt;BR /&gt;if error code is 0 proceed with mounting.&lt;BR /&gt;If error code is 32 proceed with full FS fsck&lt;BR /&gt;and if error code is greater than 33 echo FS problem..&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;CS</description>
      <pubDate>Tue, 23 Aug 2005 14:57:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610009#M234353</guid>
      <dc:creator>saju_2</dc:creator>
      <dc:date>2005-08-23T14:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610010#M234354</link>
      <description>Hi Filipe ,&lt;BR /&gt;&lt;BR /&gt;In short ,here are the error codes returns by fsck:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;0   Either no errors were detected or all errors were corrected.&lt;BR /&gt;&lt;BR /&gt;32   The file system needs additional checking.&lt;BR /&gt;&lt;BR /&gt;33   The file system is mounted.&lt;BR /&gt;&lt;BR /&gt;Return values greater that 33 indicate that file system is badly corrupted. &lt;BR /&gt;&lt;BR /&gt;You can catch  these in a shell script with "echo $? ".&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Aug 2005 15:05:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610010#M234354</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2005-08-23T15:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610011#M234355</link>
      <description>assuming your filesystems to be checked are being read from /etc/fstab&lt;BR /&gt;&lt;BR /&gt;cat /etc/fstab | grep -v "..." | while read line&lt;BR /&gt;do&lt;BR /&gt;&lt;BR /&gt;lv=`echo $line | awk {'print $1'}`&lt;BR /&gt;fs=`echo $line | awk {'print $2'}`&lt;BR /&gt;&lt;BR /&gt;fsck $lv # &amp;gt; /dev/null (if you do not want clutter on screen)&lt;BR /&gt;r=${?}&lt;BR /&gt;&lt;BR /&gt;case $r in &lt;BR /&gt;&lt;BR /&gt;0) echo "Volume $lv is fine. Mounting."&lt;BR /&gt;mount $fs&lt;BR /&gt;;;&lt;BR /&gt;32) echo "Volume $lv needs full fsck. Proceeding"&lt;BR /&gt;fsck -o full $lv ; r2=${?}&lt;BR /&gt;if [ $r2 -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo "Volume $lv has been repaired. Mounting."&lt;BR /&gt;mount $fs&lt;BR /&gt;else&lt;BR /&gt;echo "Volume $lv could not be repaired. Please investigate. Skipping..."&lt;BR /&gt;fi&lt;BR /&gt;;;&lt;BR /&gt;33) echo "filesystem is already mounted."&lt;BR /&gt;;;&lt;BR /&gt;*) echo "Volume $lv has problems fsck can not handle. Please investigate."&lt;BR /&gt;;;&lt;BR /&gt;esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Aug 2005 15:27:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610011#M234355</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-08-23T15:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610012#M234356</link>
      <description>Filipe -&lt;BR /&gt; We have commonly done this for 4+ years on our BC disks (120) using /usr/sbin/fsck -F vxfs&lt;BR /&gt;on each.&lt;BR /&gt;The time was minimal and this was performed each night prior to mounting the BC voumes for backup.&lt;BR /&gt;We use a simple for loop, reading a file of all the disks and output the results to a file for review if necessary. Of course the return code was checked after each command issuance as well.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Tue, 23 Aug 2005 17:46:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610012#M234356</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2005-08-23T17:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610013#M234357</link>
      <description>Filipe,&lt;BR /&gt;&lt;BR /&gt;Fsck is the key to your success. Try to do a man on it.&lt;BR /&gt;&lt;BR /&gt;John E. Ophious&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Aug 2005 19:01:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610013#M234357</guid>
      <dc:creator>John E.Ophious</dc:creator>
      <dc:date>2005-08-23T19:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610014#M234358</link>
      <description>dear people, &lt;BR /&gt;&lt;BR /&gt;I'd just like to throw my usual reminder in that a 'full' fsck is still comfortably  fast, because it's still using the vxfs log.&lt;BR /&gt;&lt;BR /&gt;To do a *full* fsck of the filesystem structure, You need to run fsck -Fvxfs -o full,nolog &lt;BR /&gt;&lt;BR /&gt;to verify both log and fs are consistent I usally run both of them. :)&lt;BR /&gt;&lt;BR /&gt;Also, I'm a bit surprised You're not only running a fsck -n [options] when handling BCV volumes. It's of course ok as long as the messages from fsck are really monitored, but if not, You might have consistent backups of inconsistent production filesystems ;)</description>
      <pubDate>Tue, 23 Aug 2005 23:57:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610014#M234358</guid>
      <dc:creator>Florian Heigl (new acc)</dc:creator>
      <dc:date>2005-08-23T23:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: FSCK vxfs returning code ...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610015#M234359</link>
      <description>Folks,&lt;BR /&gt;&lt;BR /&gt;Yes, I am aware of the 0, 32 and 33 thing, regarding the -m option. The issue here is that it is not clear in the man page that it is the same when fsck is doing the real thing. &lt;BR /&gt;&lt;BR /&gt;Due to the responses here, I will assume those returning codes as a fact in both cases. Anyway, I cannot test it, at least in time to do these scripts...&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Filipe.</description>
      <pubDate>Wed, 24 Aug 2005 12:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fsck-vxfs-returning-code/m-p/3610015#M234359</guid>
      <dc:creator>Filipe_1</dc:creator>
      <dc:date>2005-08-24T12:25:43Z</dc:date>
    </item>
  </channel>
</rss>

