Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. sudo lsblk # Lists all and confirm if the disk is attached to the vm
  2.  
  3. # Format the disk
  4. # Assuming new disk is detected and named as /dev/sdb
  5. # Uncomment if you want to format
  6. # sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb
  7.  
  8. # Going the mount the disk on blackhole
  9. sudo mkdir -p /blackhole
  10. sudo mount -o discard,defaults /dev/sdb /blackhole
  11.  
  12. # Set permissions
  13. sudo chmod a+w /blackhole
  14.  
  15. # Update fstab + backup the old one
  16. sudo cp /etc/fstab /etc/fstab.backup
  17. echo UUID=`sudo blkid -s UUID -o value /dev/sdb` /blackhole ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement