Table of Contents

How to use additional disk in Linux



Check Additional Disk

lsbsk
or
fdisk -l
or
cat /proc/partitions
Check OS Volume
df -hT    <- File Type
df -h


How to create new patition

example1

fdisk /dev/cciss/c0d0

partprobe /dev/cciss/c0d0
ls -l /dev/cciss/c0d0*


mkfs -t ext3 /dev/cciss/c0d04
or
mkfs -t ext4 /dev/cciss/c0d04   <- RHEL/CentOS 6
or
mkfs -t xfs /dev/cciss/c0d04    <- RHEL/CentOS 7

tune2fs -l /dev/cciss/c0d04 |egrep "count|interval"
tune2fs -i 0 -c 0 /dev/cciss/c0d04
tune2fs -l /dev/cciss/c0d04 |egrep "count|interval"


mkdir /mnt/test
mount /dev/cciss/c0d0p4 /mnt/test
umount /mnt/test

vi /etc/fstab
mount -a


example2

fdisk /dev/sdb

partprobe
ls -l /dev/sdb*

mkfs -t ext4 /dev/sdb1   <- RHEL/CentOS 6
or
mkfs -t xfs /dev/sdb1    <- RHEL/CentOS 7


example3 (NVME Volume, XFS Format)

df -hT
lsblk

growpart /dev/nvme0n1 1
lsblk

xfs_growfs -d /     <- If you using ext4, then 'resize2fs /dev/nvme0n1p1'
df -h



Related Pages