精華區beta FreeBSD 關於我們 聯絡資訊
找了很久,終於讓我找到了這可也許符合我需要的軟體 ports/sysutils/ffsrecov 我已經努力的找過許多說明了,中文的沒找到, 英文的除了MAN以外(看不大懂),其他的沒看到使用範例(我所需要的) 但是在使用前有許許多多的問題,希望有這方面經驗的先進能幫我解答 謝謝! 我盡量把我的問題用條列的方式,也許有點長,希望您能見諒 ^_^ 相信您的回答也能幫助許多遇到相同問題的人 感激不盡~ 1.我遇到的問題是一顆硬碟,不正常關機,結果FSCK後仍然無法MOUNT上 如果想要使用ffsrecov挽救資料(usr/home這個slice),應該下的指令是? 又:如果有相關的用法能對這個問題有所幫助,歡迎提供,感激不盡! ps:能盡量保留原有的目錄結構嗎?因為是一大堆人的資料~ 2.以下是pkg-descr的內容 ffsrecov is used to dump data out of the file system by specifing the raw inode(1). It can also return information on a specific inode and list the contents of the directory(2). It can also search through directories to find the inode numbers of files with a matching name.(3) 請問 (1)、(2)、(3)的參數? (1)raw inode的意思是?我找到inode的解釋於 http://freebsd.ntu.edu.tw/bsd/6/2/6/19.html 但是仍然不瞭解raw inode 3.以下是man page,我把問題直接摻雜在英文中。 SYNOPSIS ffsrecov [-adps] [-b blk] [-c inum -n name | -f inum | -i inum] [-o blk] [-r name] [-t blk] file DESCRIPTION The program ffsrecov is used to aid in the recovery of file data from a corrupt file system. The options are as follows: -a Dump all files on the filesystem that have the mode IFREG in the inode. They will be put into the local directory with their name being the inode number. mode IFREG 是指? 請問,是不是 -a代表會完整複製硬碟內的目錄及檔案架構? -b blk Find where block blk is in the file system. This will report what file if any it is in, or if it is in part of the meta data in the file system. NOTE: This is experimental and hasn't been fully tested. -b是尋找檔名包含 blk 字元的檔案? 看不懂~ 能不能稍微解釋一下-b的功用? -c inum -n name Recreate inum in the current directory with the name name. If inum is a directory, it will create the directory, and populate it with it's children. This will restore permis- sions, ownership (if root), atime and mtime. inum是inode number嗎? 意思是假如我知道我所要回復的目錄的inum,我就能使用 -c inum -n NEW 把該目錄的內容放到 NEW目錄中? -d Dump all the inodes with the mode IFDIR. The listing will contain each file name and inode number that goes with the file. Each directory is listed on a single line. mode IFDIR 是指? -d 會列出"所有inode"的詳細資料? -f inum Print out inode information for inum. -i inum Dump out the data belonging to inum to stdout. -o blk Use disk block blk as the location of the superblock. Cur- rently this only effects the parameters used, or what is printed out when displaying the superblock with -p. It does not change where it thinks the blocks within the file system are. blk是指 slice ,mount在/的那個? -p Print out the information contained in the superblock. -r name Prints out the inode and the parent inode of any file that matches name. -r 用來搜尋檔名含有name字元的檔案,並顯示他的inode跟父inode? -s Find possible superblocks in the filesystem. If there is a valid cylinder group following it, it will print out where the beging of the file system is. This may not be correct if there are stray superblock/cylinder group pairs on the disk, such as in swap. [-t blk] Offsets all read operations to blk. This is useful for accessing a filesystem in another partition through the raw disk device that covers the entire disk. The other block offsets are all relative to this. Reported blocks will also be relative to this block offset. -s -t 我單字大概都懂,但是連起來就不懂了 file Operate on the file system file. This file can either be a raw device or a regular file. You must either be able to mmap(2) or be able to seek on it. file 參數可以是 slice或者是用mmap弄下來的image檔案? 如何把slice轉換成檔案呢(mmap好像是C函數,請問有直接的 工具能使用嗎?) EXAMPLES The following is an example of a typical usage of the ffsrecov command: If you would like to recover inode 2385 named dir and all it's decendants the command: % ffsrecov -c 2385 -n dir ffs.image will create dir, populate it, setting modes, permissions, and times to the originals. % ffsrecov -s /dev/rda0c will scan the entire disk da0 and search for possible file systems. It will print out the super block offset (for use with -o) along with the start of the file system. % ffsrecov -p -o 655376 ffs.image will print out the super block at disk block location 655376. It will warn if the block doesn't appear to be a valid super block, but will still try to print out parameters from it. -- ※ Origin: 元智大學 風之塔 <bbs.yzu.edu.tw> ※ From : sw59-222-142.adsl.seed.net.tw