Skip to content

Instantly share code, notes, and snippets.

@dungmanh88
Created October 1, 2016 15:09
Show Gist options
  • Save dungmanh88/6f58aa7164163a87899fb756c4355555 to your computer and use it in GitHub Desktop.
Save dungmanh88/6f58aa7164163a87899fb756c4355555 to your computer and use it in GitHub Desktop.
Create and use loop device
dd if=/dev/zero of=/virtual_drive bs=1G count=1
mkfs -t ext4 /virtual_drive
mkdir -p /mnt/virtual_device
mount -t ext4 -o loop /virtual_drive /mnt/virtual_device
To view loop device list:
losetup -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment