Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo lsblk # Lists all and confirm if the disk is attached to the vm
- # Format the disk
- # Assuming new disk is detected and named as /dev/sdb
- # Uncomment if you want to format
- # sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb
- # Going the mount the disk on blackhole
- sudo mkdir -p /blackhole
- sudo mount -o discard,defaults /dev/sdb /blackhole
- # Set permissions
- sudo chmod a+w /blackhole
- # Update fstab + backup the old one
- sudo cp /etc/fstab /etc/fstab.backup
- 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