nalezeni souboru na disku podle LBA (fsdb findblk)
Miroslav Lachman
000.fbsd at quip.cz
Sun Sep 27 00:58:16 CEST 2009
> Je tahle moje uvaha spravna, nebo jsem nekde v tech prepoctech udelal
> chybu?
Moje uvaha byla bud spravna, nebo nekdo jiny uvazuje stejne jako ja. Ten
stejny postup je popsany i tady:
http://lists.freebsd.org/pipermail/freebsd-questions/2007-August/155998.html
Block to i-node to file name (was Re: uncorrectable disk error)
Jenze s fsdb mam takovy problem, ze i kdyz najdu nejaky soubor (inode),
necham si k nemu vypsat bloky a pak tyto bloky zadam zpet fsdb findblk,
tak mi zadny inode nevypise. Tudiz bud fsdb nefunguje jak ma, nebo si ja
a minimalne dalsi jeden clovek myslime, ze ma fungovat jinak, nez jak
tomu ve skutecnosti je.
Mala ukazka:
root at roxy ~/# fsdb -d -r /dev/mirror/gm0s1d
** /dev/mirror/gm0s1d (NO WRITE)
Examining file system `/dev/mirror/gm0s1d'
Last Mounted on /var
current inode: directory
I=2 MODE=40755 SIZE=512
BTIME=Dec 24 13:37:03 2007 [0 nsec]
MTIME=May 9 20:59:30 2009 [0 nsec]
CTIME=May 9 20:59:30 2009 [0 nsec]
ATIME=Sep 26 04:18:55 2009 [0 nsec]
OWNER=root GRP=wheel LINKCNT=26 FLAGS=0 BLKCNT=4 GEN=11457fc3
fsdb (inum: 2)> blocks
command `blocks
'
Blocks for inode 2:
Direct blocks:
3008 (1 frag)
fsdb (inum: 2)> ls
command `ls
'
slot 0 ino 2 reclen 12: directory, `.'
slot 1 ino 2 reclen 12: directory, `..'
slot 2 ino 3 reclen 16: directory, `.snap'
[...]
slot 22 ino 3697664 reclen 16: directory, `games'
slot 23 ino 4 reclen 24: regular, `restoresymtable'
slot 24 ino 683008 reclen 16: directory, `amavis'
slot 25 ino 3886080 reclen 20: directory, `virusmails'
slot 26 ino 3627008 reclen 112: directory, `service'
fsdb (inum: 2)> inode 4
command `inode 4
'
current inode: regular file
I=4 MODE=100600 SIZE=5082380
BTIME=Feb 12 23:42:21 2008 [0 nsec]
MTIME=Feb 12 23:42:44 2008 [0 nsec]
CTIME=Feb 12 23:42:44 2008 [0 nsec]
ATIME=Nov 27 00:58:21 2008 [0 nsec]
OWNER=root GRP=wheel LINKCNT=1 FLAGS=0 BLKCNT=2700 GEN=4532c274
fsdb (inum: 4)> blocks
command `blocks
'
Blocks for inode 4:
Direct blocks:
5560, 5568, 5576, 5584, 5592, 5600, 5608, 5616, 5672, 5680, 5688, 5696
Indirect blocks:
5704, 5712, 5720, 5728, 5736, 5744, 5752, 5760, 5768, 5776, 5784, 5792,
5800, 5808, 5816,
5824, 5832, 5840, 5848, 5856, 5864, 5872, 5880, 5888, 5896, 5904, 5912,
5920, 5928, 5936,
[...dale nasledoval vypis nekolika radek cisel indirect blocks...]
fsdb (inum: 4)> findblk 5704
command `findblk 5704
'
fsdb (inum: 4)> findblk 5560 5568 5576 5712 5720
command `findblk 5560 5568 5576 5712 5720
'
fsdb (inum: 4)>
Zkratka pokud prikazu 'findblk' predhodim cisla bloku, ktere nejaky
soubor skutecne pouziva (at uz direct, nebo inderect bloky), tak findblk
se tvari, ze nic nenasel.
Tusite nekdo, kde by mohla bych chyba? Muzete nekdo zkusit aspon
kouknout do manualu fsdb a rict mi, jestli to chapu spravne / spatne?
Mirek
More information about the Users-l
mailing list