cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar









Etc


Reference














.

os:linux:disk:basic_operation.html



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)




os/linux/disk/basic_operation.html.txt ยท Last modified: 2021/03/10 by admin

Page Tools