This is an old revision of the document!


Home tmade.de

Home Wiki

FILESYSTEM

Repair

badblocks -s -o /home/stream/badblocks.txt /dev/sda1 
fsck /dev/hda2
fsck.ext3 -a -CO /dev/sdx
fsck.ext4 -v -f -c /dev/sda1                                                      #Checking for bad blocks
e2fsck -f -y -v /dev/hda1	
e2fsck -f /dev/sdb1

Force run “fsck” at reboot:

shutdown -F -r now

superblock backups are shown with (replace “xxx” with partion and id):

mke2fs -n /dev/sdx

Output:

Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Replacing block_number with the first backup superblock.

e2fsck -b block_number /dev/xxx

smartmontools

apt-get install smartmontools                    #Install smartmontools                    
smartctl -a /dev/sda                             #Status
smartctl -A /dev/sda                             #Status/ Attributes - check "Current_Pending_Sector". 

Note: Check “Current_Pending_Sector”. Value 0 means all sectors ok, so the disk is healthy!

smartctl -t long /dev/sda                        #Status
smartctl -t long /dev/sda                        #Check Status disk /dev/sda

Useful Commands

/sbin/blkid                                      #Show Harddisk/ Partition Information such as Label, UUID, Filesystem
e2label /dev/sdxx mylabel                        #Change Label            
linux/filesystem.1516397634.txt.gz · Last modified: 2018/01/19 22:33 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki