Showing posts with label disk. Show all posts
Showing posts with label disk. Show all posts

Tuesday, December 24, 2019

Tăng/mở rộng ổ cứng Ubuntu

Cách 1: Tắt máy chủ, khởi động lại server
You do not need a live CD for this to work. I’m basically summarizing the other answers given here:
  1. From Ubuntu (in VM) install gparted by executing sudo apt-get install gpartedin terminal
  2. Open sudo gpartedfrom terminal
  3. Rightclick on the swap partition, click “swapoff”
  4. Delete swap partition
  5. Extend your data partition, but leave enough space to create a new swap partition
  6. Recreate swap partition with about the same size as before, select linux-swap as file system
  7. Click that green tick in gparted to apply all operations. Then select “swapon” to enable swap again

Partitioning, Formatting, and Mounting a Hard Drive in Linux Ubuntu 18.04

I have a brand new 4-TB harddisk to add to my computer recently. So I need to mount it in Linux. To do this, I need to do the following:
A. Partitioning
B. Formatting
C. Mounting (including auto mount after reboot)
D. Checking whether the hard drive is mounted

A. Partitioning

  1. First, after connecting the harddisk to the computer by SATA and power cables, we can check the new 4-TB harddisk by:

Mount a new drive in CentOS

Like windows, we can format and make a new drive available for use by using the following simple steps
Step 1:
It is needed to verify whether the new drive is visible in the system. Using fdisk command, it can be identified.
fdisk -l
It will list all drives available in the system including mounted and unmounted drives. Here assume a new drive label is /dev/ssd
Step 2:
It is needed to create the file system ext4(in shortly say as formatting drive). So make sure drive is fresh/empty one. It a drive has already data, don’t enter this step, instead skip to next step. The following command helps to create file system
mkfs -t ext4 /dev/ssd