Linux serverNETWORK ADMINISTRATIONS

How to Mount and Partition Disks in CentOS

#/list block devices
lsblk

fdisk -l
#list disk

fdisk -l /dev/sdb

#partitioning
fdisk /dev/sdb

1.
#new disk:
fdisk /dev/sdb

2.
#partition
p

3.
#new
n

4.
#new primary partition
p

(enter enter )

5.
#write
w

#list block devices
lsblk

df -h
#displaying free disk space, disk free
#viser også hvor mounted

#make filesystem
sudo mkfs -t ext4 /dev/sdb1

#blkid
shows id on disk + filsystem

mount on media
#sudo mount /dev/sdb1 /media

df -h
#disk free, viser nu nye disk

source

centos 7

4 thoughts on “How to Mount and Partition Disks in CentOS

Comments are closed.