Saturday 5 October 2013

Crete Partitions larger than 2TB


Crete Partitions larger than 2TB


Create a partition on Linux using parted and labelling it with gpt

1.dmesage |grep sd
2.parted /dev/sdb
3.(parted) mklabel gpt
4.(parted) unit TB
5.(parted) mkpart primary 0.00 4.95TB
6.(parted) print
7.(parted) quit
8.mkfs.ext4 /dev/sdb1

9.vi /etc/fstab (add)
   /dev/sdb1 /local ext4 defaults 1 2

 

Add New Volume

1. Added physical disks
2. Created RAID 1 Volume
3. umount /local/
5. # vgdisplay
6. dmesg | grep sd

      sd 0:0:0:2: [sdb] 1172058032 512-byte logical blocks: (600 GB/558 GiB)
7. # pvcreate /dev/sdb
8. # pvdisplaycheck if it has been created
 
"/dev/sdb" is a new physical volume of "558.88 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sdb
  VG Name
  PV Size               558.88 GiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               SX1ekz-o4Aj-5yXO-QbIF-AdPw-L3Iq-kewNFQ

9. find out the existing name for the existing volume group: 
# vg_local

# vgdisplay

 10. vgcreate vg_local600 /dev/sdb

 
11. check if group has been created:
#  vgdisplay | grep 600
12. lvcreate -L 550G -n lv0_local600 vg_local600

 

13. Find the File system type:
# cat /etc/fstab | grep ext = ext4

 14. Create file system
mkfs.ext4 /dev/vg_local600/lv0_local600


15. # mount new file system
mount /dev/vg_local600/lv0_local600 /local