see more details in
https://www.tecmint.com/add-disk-larger-than-2tb-to-an-existing-linux/
# list current partitions
[lee@hwang29 ~]$ sudo fdisk -l
# move to disk
[lee@hwang29 ~]$ sudo fdisk /dev/sda
d : delete a partition # deletes the partition. It will delete the data on the disk
w : write table to disk and exit
# write partition with parted
[lee@hwang29 ~]$ sudo parted /dev/sda
(parted) mklabel gpt # set partition table format to GPT (GUID Partition Table)
(parted) mkpart primary 0GB 3000GB # create primary partition, assaing disk capacity
(parted) quit
# Creating an ext4 File System
[lee@hwang29 ~]$ sudo mkfs.ext4 /dev/sda
# mount disk
[lee@hwang29 ~]$ sudo mount /dev/sda /data_1
# add entry to /etc/fstab for permanent mounting
[lee@hwang29 ~]$ vim /etc/fstab
/dev/sda /data_1 ext4 defaults 0 0
tip for naming the disk
- /dev/disk/by-id/scsi-SATA_ModelName_partion1 instead of /dev/disk/sda
- if you are using multiple disk/partition and one of them is failed, it is easy to identify which disk and partition goes wrong
- if you change, add, move disk, it might cause problems because other disk already use name sda, sdb
No comments:
Post a Comment