Created
July 5, 2015 15:24
-
-
Save dvapelnik/e1a087a8f37e1d57eb36 to your computer and use it in GitHub Desktop.
make file container with some filesystem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make file container with 100Gb size | |
dd if=/dev/zero of=container.ext4 bs=1M count=102400 | |
# Format with ext4 fs | |
mkfs ext4 -F container.ext4 | |
# Make mount-directory | |
sudo mkdir -p /mnt/container_dir | |
# Mount container | |
sudo mount -o loop,rw,sync container.ext4 /mnt/container_dir | |
# Unmount container | |
sudo umount /mnt/container_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment