[[http://tmade.de|Home tmade.de]] [[http://wiki.tmade.de|Home Wiki]] ===== FILESYSTEM ===== === Repair === time badblocks -sv /dev/mmcblk0p2 -o mmcblk0p2.log #Checking for bad blocks in read-only mode and write output to "mmcblk0p2.log" badblocks -s -o /home/stream/badblocks.txt /dev/sda1 badblocks -n -v /dev/mmcblk0 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 ===nvme=== apt-get install nvme-cli nvme smart-log /dev/nvme0n1 === Useful Commands === /sbin/blkid #Show Harddisk/ Partition Information such as Label, UUID, Filesystem e2label /dev/sdxx mylabel #Change Label