Format: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
Onnowpurbo (talk | contribs)
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Smartmon
apt install smartmontools
Jalankan
smartctl -a -d sat /dev/sdb
Format USB flashdisk / USB harddisk / harddisk dapat menggunakan  
Format USB flashdisk / USB harddisk / harddisk dapat menggunakan  


  mkfs
  mkfs
mkfs.ext3
mkfs.ext4


Catatan penggunaan:
Catatan penggunaan:
Line 36: Line 46:




==Cek Bed Blocks==
==Cek Bad Blocks==
 
'''WARNING: Proses ini akan memakan waktu lama sekali. Mungkin semalam-an'''


Memformat sambil cek bed blocks
Memformat sambil cek bed blocks


  mkfs -L data -c /dev/sdb1
  mkfs -L data -c /dev/sdb1


==Menggunakan badblocks==
==Menggunakan badblocks==


Before Filesystem Creation
'''WARNING: Proses ini akan memakan waktu lama sekali. Mungkin semalam-an'''
 
Alternately, this can be done before filesystem creation.
 
If badblocks is run without the -o option bad sectors will only be printed to stdout.


Example output for read errors in the beginning of the disk:
Sebelum mkfs kita dapat menjalankan badblocks


  # badblocks -wsv /dev/<drive>
  badblocks -wsv /dev/<drive>


[...]
[...]
Testing with pattern 0xff: done                                               
done
Reading and comparing:
Pass completed, 527405 bad blocks found. (0/0/527405 errors)
[...]
37584
37585 0.84% done, 7:31:08 elapsed. (0/0/527405 errors)
37586
[...]
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.
Atau output di simpan ke sebuah file


  # badblocks -wsv -o /root/<badblocks.txt> /dev/<device>
  badblocks -wsv -o /root/<badblocks.txt> /dev/<device>


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


Then (re-)create the file system with the information:
file tersebut digunakan saat format


  # 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>.

Latest revision as of 13:05, 13 January 2019

Smartmon

apt install smartmontools

Jalankan

smartctl -a -d sat /dev/sdb

Format USB flashdisk / USB harddisk / harddisk dapat menggunakan

mkfs
mkfs.ext3
mkfs.ext4

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 Bad Blocks

WARNING: Proses ini akan memakan waktu lama sekali. Mungkin semalam-an

Memformat sambil cek bed blocks

mkfs -L data -c /dev/sdb1

Menggunakan badblocks

WARNING: Proses ini akan memakan waktu lama sekali. Mungkin semalam-an

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>.