flycat

Disks (hw, hdparm, partition, fdisk and LVM)

Jan 21st, 2014 (edited)
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.97 KB | None | 0 0
  1. # Utils:
  2. udisks2
  3. HDDScan - Win?
  4. SMART Loan/Unload Cycle count
  5.  
  6. # Включить минимум энергосбережения, отключить автопарк головок:
  7. hdparm -B 255 /dev/hda
  8.  
  9. # Rescan
  10. echo 1 > /sys/block/sdb/device/rescan
  11.  
  12. lvcreate -n NAME -l 100%FREE vg0
  13.  
  14. Fixing the GPT after clone
  15. https://asherman.io/2018/10/02/cloning-a-gpt-ntfs.html
  16. Performing a truncated copy of the disk will corrupt the GPT. Luckily this can be fixed using gdisk. Enter gdisk and perform the following operations:
  17. gdisk /dev/sda
  18.     Delete any partitions after the data partition using d
  19.     Fit the GPT to the new disk size using expert x option e
  20.     Use the main GPT header to rebuild the backup with recovery r option d
  21.     Write the table to disk with w
  22.  
  23. # Disable green functions:
  24.  
  25. hdparm -S0 /dev/sdb
  26. /dev/sdb:
  27.  setting standby to 0 (off)
  28.  
  29. hdparm -B255 /dev/sdb
  30.  
  31. /dev/sdb:
  32.  setting Advanced Power Management level to disabled
  33.  APM_level  = off
  34.  
Add Comment
Please, Sign In to add comment