LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-24-2016, 08:25 AM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Rep: Reputation: 26
How can I trace|debug|show step each part of command


Hello,
How can I trace|debug|show step each part of command #fsck.reiser4
Thanks
--Glenn

-I tried
# mount /dev/sdb /media/disk2
mount: mount(2) failed: No such file or directory
#
# which fsck.reiser4
/usr/sbin/fsck.reiser4

rpms installed

# rpm -qa | grep reiser4 |sort
kernel-reiser4-4.1.6-7.1.gd2bbe7f.x86_64
libreiser4-1_0-5-1.0.5-45.1.x86_64
libreiser4-minimal-1_0-5-1.0.5-45.1.x86_64
reiser4progs-1.0.5-45.1.x86_64
reiser4progs-debuginfo-1.0.5-45.1.x86_64
reiser4progs-debugsource-1.0.5-45.1.x86_64
reiser4progs-devel-1.0.5-45.1.x86_64

# fsck.reiser4 -V
fsck.reiser4 1.0.5
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

# fsck.reiser4 -p /dev/sdb
Default profiles:
format: "format40" (id:0x0 type:0x8)
journal: "journal40" (id:0x0 type:0xf)
oid: "oid40" (id:0x0 type:0x9)
alloc: "alloc40" (id:0x0 type:0xe)
key: "key_large" (id:0x1 type:0x10)
node: "node40" (id:0x0 type:0x2)
statdata: "stat40" (id:0x0 type:0x1)
nodeptr: "nodeptr40" (id:0x3 type:0x1)
direntry: "cde40" (id:0x2 type:0x1)
tail: "plain40" (id:0x6 type:0x1)
extent: "extent40" (id:0x5 type:0x1)
acl: "absent (id:0x4 type:0x1)"
permission: "absent (id:0x0 type:0x6)"
regular: "reg40" (id:0x0 type:0x0)
directory: "dir40" (id:0x1 type:0x0)
symlink: "sym40" (id:0x2 type:0x0)
special: "spl40" (id:0x3 type:0x0)
hash: "r5_hash" (id:0x1 type:0x3)
fibration: "ext_1_fibre" (id:0x2 type:0x4)
formatting: "smart" (id:0x2 type:0x5)

-kernel built with reiser4 filesystem enabled
# cat /proc/filesystems | awk '{print $NF}' | sed '/^$/d' |grep -i reiser
reiserfs
reiser4

- mount point exists
# ll /media/disk
total 0

# which fsck.reiser4
/usr/sbin/fsck.reiser4

# ll /media/disk
total 0

# fdisk -l

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


# fsck.reiser4
Usage: fsck.reiser4 [ options ] FILE
Fsck options:
--check checks the consistency (default)
--fix fixes minor corruptions
--build-sb rebuilds the super block
--build-fs rebuilds the filesystem

-L, --logfile file complains into the file
-n, --no-log makes fsck to not complain
-a, --auto automatically checks the consistency
without any questions.
-q, --quiet supresses gauges
-r ignored
Plugins options:
-p, --print-profile prints the plugin profile.
-l, --print-plugins prints all known plugins.
-o, --override TYPE=PLUGIN overrides the default plugin of the type
"TYPE" by the plugin "PLUGIN" in the
profile.
Common options:
-?, -h, --help prints program usage.
-V, --version prints current version.
-y, --yes assumes an answer 'yes' to all questions.
-f, --force makes fsck to use whole disk, not block
device or mounted partition.
-c, --cache N number of nodes in tree buffer cach

- volume details and super block on /dev/sdb

Master super block (16):
magic: ReIsEr4
blksize: 4096
format: 0x0 (format40)
uuid: 3006ced1-7490-4ea8-a9b8-d82143c6bede
label: <none>

Format super block (17):
plugin: format40
description: Disk-format plugin.
version: 0
magic: ReIsEr40FoRmAt
mkfs id: 0x1ddaf754
flushes: 0
blocks: 488378640
free blocks: 217146980
root block: 37017218
tail policy: 0x2 (smart)
next oid: 0xedade
file count: 188313
tree height: 6
key policy: LARGE

# uname -a
Linux tst.site 4.1.6-7.gd2bbe7f-vanilla #1 SMP Sun Sep 13 07:58:18 UTC 2015 (31d60fb) x86_64 x86_64 x86_64 GNU/Linux
 
Old 04-24-2016, 01:14 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Quote:
# mount /dev/sdb /media/disk2
mount: mount(2) failed: No such file or directory
Quote:
- mount point exists
# ll /media/disk
total 0
/media/disk2 and /media/disk are not the same name, please check...
 
Old 04-24-2016, 09:30 PM   #3
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
Hello,
mount points were/are empty
# ll /media/disk*
/media/disk:
total 0

/media/disk2:
total 0

So back to original question [see 1st post]
How can I trace|debug|show step each part of command #fsck.reiser4
Thanks
--Glenn
 
Old 04-25-2016, 07:32 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
/dev/sdb is the whole disk, you want to mount or fs check a partition, no?

Like: mount /dev/sdb1 /media/disk2 or fsck.reiser4 /dev/sdb1
 
Old 04-26-2016, 11:10 AM   #5
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Original Poster
Rep: Reputation: 26
/dev/sdb is the whole disk, Whole disk is r4 -entire volume.

Question
========
-Does anyone know of any tools to help diagnose and disassemble reiser4 meta-data items ?

# seems to have meta-data problem that needs fixing.
I have a copy of the meta-data.
It looks like a binary format.
need tools to view it.

# fdisk -l

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

# dmesg
[131219.805053] usb 1-2: USB disconnect, device number 3
[131250.954632] usb 1-1: new high-speed USB device number 4 using ehci-pci
[131251.090722] usb 1-1: New USB device found, idVendor=04fc, idProduct=0c25
[131251.090734] usb 1-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[131251.090741] usb 1-1: Product: USB to Serial-ATA bridge
[131251.090747] usb 1-1: Manufacturer: Sunplus Technology Inc.
[131251.090752] usb 1-1: SerialNumber: ST32000542 5XW1ZMG4
[131251.093705] usb-storage 1-1:1.0: USB Mass Storage device detected
[131251.093971] scsi host5: usb-storage 1-1:1.0
[131252.096359] scsi 5:0:0:0: Direct-Access ST320005 42AS PQ: 0 ANSI: 2
[131252.097781] sd 5:0:0:0: Attached scsi generic sg2 type 0
[131252.102057] sd 5:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[131252.104792] sd 5:0:0:0: [sdb] Write Protect is off
[131252.104802] sd 5:0:0:0: [sdb] Mode Sense: 38 00 00 00
[131252.107452] sd 5:0:0:0: [sdb] No Caching mode page found
[131252.107475] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[131252.142351] sd 5:0:0:0: [sdb] Attached SCSI disk

-version
# debugfs.reiser4 -V
debugfs.reiser4 1.0.5
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by
reiser4progs/COPYING.

# cat /proc/filesystems | awk '{print $NF}' | sed '/^$/d' |grep -i reiser | sort
reiser4
reiserfs

# mount /dev/sdb /media/disk
mount: mount(2) failed: No such file or directory

# dmesg
[132593.222658] Loading Reiser4 (format release: 4.0.1) See www.namesys.com for a description of Reiser4.
[132593.228234] reiser4: sdb: found disk format 4.0.1.

# which fsck.reiser4
/usr/sbin/fsck.reiser4

# fsck.reiser4 --check /dev/sdb
*******************************************************************
This is an EXPERIMENTAL version of fsck.reiser4. Read README first.
*******************************************************************

Fscking the /dev/sdb block device.


Will check the consistency of the Reiser4 SuperBlock.


Will check the consistency of the Reiser4 FileSystem.


Continue?


(Yes/No): yes
***** fsck.reiser4 started at Fri Feb 27 02:58:06 2015
Reiser4 fs was detected on /dev/sdb.


Master super block (16):
magic: ReIsEr4
blksize: 4096
format: 0x0 (format40)
uuid: 3006ced1-7490-4ea8-a9b8-d82143c6bede
label: <none>

Format super block (17):
plugin: format40
description: Disk-format plugin.
version: 0
magic: ReIsEr40FoRmAt
mkfs id: 0x1ddaf754
flushes: 0
blocks: 488378640
free blocks: 217146980
root block: 37017218
tail policy: 0x2 (smart)
next oid: 0xedade
file count: 188313
tree height: 6
key policy: LARGE

CHECKING THE STORAGE TREE


Read nodes 197008413


Nodes left in the tree 197008413
Leaves of them 194764277, Twigs of them 2217790
Time interval: Fri Feb 27 03:00:05 2015 - Fri Feb 27 11:07:45 2015

CHECKING EXTENT REGIONS.


Read twigs 2217790


Time interval: Fri Feb 27 11:07:45 2015 - Fri Feb 27 13:18:06 2015

CHECKING THE SEMANTIC TREE


FSCK: semantic.c: 573: repair_semantic_dir_open: Failed to recognize the
plugin for the directory [29:0:2a].

FSCK: semantic.c: 651: repair_semantic_root_prepare: No root directory
opened.
Time interval: Fri Feb 27 13:18:06 2015 - Fri Feb 27 13:18:06 2015


FSCK: repair.c: 550: repair_sem_fini: On-disk used block bitmap and really
used block bitmap differ.

***** fsck.reiser4 finished at Fri Feb 27 13:18:07 2015
Closing fs...done

2 fatal corruptions were detected in FileSystem. Run with --build-fs
option to fix them.


# ll
total 5066022
2,098,194,393 Nov 27 14:33 r4meta-sdb.bz2


# metadata -part of [binary format]

# more r4meta-sdb
VRSN1.1.0
����������������������������������������


Any help greatly appreciated.
Thanks
--Glenn
 
Old 04-26-2016, 11:34 AM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Quote:
Originally Posted by Glenn D. View Post
/dev/sdb is the whole disk, Whole disk is r4 -entire volume.
You are sure sdb was formated as a whole, without any partition (damn 2TB via usb, dunno how much time that can take!)

If yes, maybe try the check with --rebuild-fs as suggested in output
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot analyse normalised routing load as RTR packets show as dropped in trace file Cataj Linux - Networking 13 06-01-2015 10:48 AM
[SOLVED] How to debug awk command? massy Programming 3 05-09-2014 08:22 AM
cmake or make: debug output, show command Ephracis Programming 4 03-01-2008 04:28 AM
Part of files to show in the bash. pittopitto Linux - Newbie 3 10-19-2005 11:12 PM
[Question]kernel debug/ trace shogun1234 Linux - Newbie 0 09-21-2004 10:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration