1. 程式人生 > >Easy to add new disk on Centos, Ubuntu

Easy to add new disk on Centos, Ubuntu

You have experience working with system database of product, i think you encounter problems with hard driver capacity. The first buy cloud server, i added a disk with 300 GB to run and storage data of MySQL and some data, it ok at that time. After a period of operation then disk available have not enough for run stable. I need to increment available disk for server cloud. Here are the steps i have taken

Step 1 : Go to cloud management and add new disk to instance (500 GB)

disk

Step 2 : Remote to server and show all information partitions on server, run command

sudo fdisk -l

and you can see as shown below

show_all

Step 3 : Setup for new partition, run command

sudo fdisk /dev/sdd

  • Add a new partition – enter (n)
  • To setup new partition as primary type – enter (p)
  • Partition number – enter (1-4) and default is 1
  • First sector – enter default
  • Last sector, +sectors or +size{K,M,G,T,P} – enter default
  • Write table to disk and exist – enter(w)

Re-run command fdisk -l to show result

Selection_success

Step 4 : Format new partition (/dev/sdd1)

sudo mkfs.ext4 /dev/sdd1

Step 5 : Create new path to mount

sudo mkdir /u01

Step 6 : Show UUID information all partitions

sudo blkid

016

Step 7 : Add config new partition as new line to /etc/fstab to auto mount when startup

UUID=dbdc29ac-64cb-4104-b257-707017bdd734   /u01   ext4   defaults   0   0

Step 8 : Commit all config mount in file /etc/fstab, run command

sudo mount -a

Step 9 : Check result

sudo df -l

017

New partition is mounted to path /u01 , ok done!

Advertisements

Like this:

Like Loading...