Created
March 3, 2022 08:50
-
-
Save arnabdas/596d072d8ef4caa51941771277a36564 to your computer and use it in GitHub Desktop.
Ubuntu Add Disk
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
ls /dev/sd* | |
fdisk /dev/sdb # check the label from above | |
# p - show current partitions | |
# d - delete current partitions | |
# n - create new partition | |
# p - select for default partition | |
# 1 - for single partition | |
# w - write partitions | |
# format with ext4 file-system | |
mkfs -t ext4 /dev/sdb1 | |
# create mount point | |
mkdir /data | |
blkid # note UUID for the new partition | |
# add following in /etc/fstab | |
# UUID="b851..." /data ext4 defaults 0 2 | |
mount -av | |
# check added disk | |
df -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment