Last active
November 13, 2020 17:51
-
-
Save amcginlay/1b7736aec224a372b9b74f9b59d7dbe3 to your computer and use it in GitHub Desktop.
Mounting A Linux Disk Device (EBS)
This file contains hidden or 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
sudo su - # operation requires root privileges | |
lsblk # to see devices and mounts, MOUNTPOINT is empty for the new device | |
NEW_DEVICE=xvdf # change as appropriate | |
# to mount a new device | |
file -s /dev/${NEW_DEVICE} # will display "data" if no file system is present | |
mkfs -t ext4 /dev/${NEW_DEVICE} # will install ext4 on device | |
mkdir /filesystem | |
mount /dev/${NEW_DEVICE} /filesystem | |
# to unmount the device | |
umount -d /dev/${NEW_DEVICE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment