Difference between revisions of "Format"

From OnnoWiki
Jump to navigation Jump to search
Line 45: Line 45:
 
==Menggunakan badblocks==
 
==Menggunakan badblocks==
  
Before Filesystem Creation
+
Sebelum mkfs kita dapat menjalankan badblocks
  
Alternately, this can be done before filesystem creation.
+
badblocks -wsv /dev/<drive>
  
If badblocks is run without the -o option bad sectors will only be printed to stdout.
+
[...]
 +
done
 +
Pass completed, 527405 bad blocks found. (0/0/527405 errors)
  
Example output for read errors in the beginning of the disk:
+
Atau output di simpan ke sebuah file
  
  # badblocks -wsv /dev/<drive>
+
  badblocks -wsv -o /root/<badblocks.txt> /dev/<device>
  
[...]
+
Checking for bad blocks in read-write mode
Testing with pattern 0xff: done                                                
+
From block 0 to 488386583
Reading and comparing:
+
Testing with pattern 0xaa: done
[...]
+
Reading and comparing:   6.36% done, 0:51 elapsed. (0/0/14713 errors)
37584
+
[...]
37585 0.84% done, 7:31:08 elapsed. (0/0/527405 errors)
+
Testing with pattern 0x00: done
37586
+
Reading and comparing: done
[...]
+
Pass completed, 527405 bad blocks found. (0/0/527405 errors)
done
 
Testing with pattern 0x00:
 
Reading and comparing:
 
[...]
 
37584
 
37585
 
[...]
 
done
 
Pass completed, 527405 bad blocks found. (0/0/527405 errors)
 
  
For comfortably passing badblocks error output to the filesystem it has to be written to a file.
+
file tersebut digunakan saat format
 
 
# badblocks -wsv -o /root/<badblocks.txt> /dev/<device>
 
 
 
Checking for bad blocks in read-write mode
 
From block 0 to 488386583
 
Testing with pattern 0xaa: done
 
Reading and comparing:  6.36% done, 0:51 elapsed. (0/0/14713 errors)
 
[...]
 
Testing with pattern 0x00: done
 
Reading and comparing: done
 
Pass completed, 527405 bad blocks found. (0/0/527405 errors)
 
 
 
Then (re-)create the file system with the information:
 
  
 
  # mkfs.<filesystem-type> -l /root/<badblocks.txt> /dev/<device>
 
  # mkfs.<filesystem-type> -l /root/<badblocks.txt> /dev/<device>
  
Note: The meaning of 0/0/527405 errors is <number of read errors>/<number of write errors>/<number of corruption errors>.
+
Catatan: Note: 0/0/527405 errors adalah <number of read errors>/<number of write errors>/<number of corruption errors>.

Revision as of 14:18, 17 May 2015

Format USB flashdisk / USB harddisk / harddisk dapat menggunakan

mkfs

Catatan penggunaan:

Usage: mkfs [options] [-t type fs-options] device [size] 

Options:
 -t, --type=TYPE  file system type, when undefined ext2 is used
     fs-options   parameters to real file system builder
     device       path to a device
     size         number of blocks on the device
 -V, --verbose    explain what is done
                  defining -V more than once will cause a dry-run
 -V, --version    output version information and exit
                  -V as version must be only option
 -h, --help       display this help and exit 
For more information see mkfs(8).


atau

Usage: mkfs.ext3 [-c|-l filename] [-b block-size] [-C cluster-size]

[-i bytes-per-inode] [-I inode-size] [-J journal-options] [-G flex-group-size] [-N number-of-inodes] [-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory] [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]] [-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]

Yang sederhana, misalnya.

mkfs.ext3  -J size=10000 -L repo /dev/sdb1


Cek Bed Blocks

Memformat sambil cek bed blocks

mkfs -L data -c /dev/sdb1


Menggunakan badblocks

Sebelum mkfs kita dapat menjalankan badblocks

badblocks -wsv /dev/<drive>
[...]
done
Pass completed, 527405 bad blocks found. (0/0/527405 errors)

Atau output di simpan ke sebuah file

badblocks -wsv -o /root/<badblocks.txt> /dev/<device>
Checking for bad blocks in read-write mode
From block 0 to 488386583
Testing with pattern 0xaa: done
Reading and comparing:   6.36% done, 0:51 elapsed. (0/0/14713 errors)
[...]
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 527405 bad blocks found. (0/0/527405 errors)

file tersebut digunakan saat format

# mkfs.<filesystem-type> -l /root/<badblocks.txt> /dev/<device>

Catatan: Note: 0/0/527405 errors adalah <number of read errors>/<number of write errors>/<number of corruption errors>.