PARTED on SUSE Linux 12
For creating new partition on SUSE 12 Linux admin generally use "PARTED" command. Also one very important thing want to highlight here is, Linux admin can not create partition larger than 2 TB using fdisk, so in this situation "PARTED" command come in picture.
Also when Linux admin want to extend existing disk on SUSE 12 then parted command is useful, because when Linux admin try to extend existing disk and try to create 2nd or any new partition "fdisk" will not work. It will throw error on SUSE 12 as below
Error :
so solution to this issue is always use "parted" command on SUSE 12 for partitioning existing disk.
Now here i will discuss how to create partition on new disk on SUSE 12.
scenario :
Create new partition on /dev/sdb of size 100 GB
root@/root : parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted) mklabel gpt // assign "gpt" lable type to disk.
(parted) mkpart primary 1049K 100% // Create primary partition of using 100% free space.
(parted) set 1 lvm on // SET lvm flag to partition 1.
(parted) p
Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 100GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 100 GB 100 GB primary lvm
(parted) q
Information: You may need to update /etc/fstab.
root@:/root : partx -a /dev/sdb // add newly created partitions.
root@:/root : pvcreate /dev/sdb1 // create new PV
This is how we created 100 GB partition on SUSE Linux using parted. Newly created PV admin can use for expanding existing Volume group or can use to create new volume group.
Example.
1.
Add /dev/sdb1 to existing volume group vg01
#vgextend vg01 /dev/sdb1
Or
2.
Create new volume group vg02 using /dev/sdb1 PV.
#vgcreate vg02 /dev/sdb1
Thanks !!!!!
For creating new partition on SUSE 12 Linux admin generally use "PARTED" command. Also one very important thing want to highlight here is, Linux admin can not create partition larger than 2 TB using fdisk, so in this situation "PARTED" command come in picture.
Also when Linux admin want to extend existing disk on SUSE 12 then parted command is useful, because when Linux admin try to extend existing disk and try to create 2nd or any new partition "fdisk" will not work. It will throw error on SUSE 12 as below
Error :
Value out of range.
so solution to this issue is always use "parted" command on SUSE 12 for partitioning existing disk.
Now here i will discuss how to create partition on new disk on SUSE 12.
scenario :
Create new partition on /dev/sdb of size 100 GB
root@/root : parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted) mklabel gpt // assign "gpt" lable type to disk.
(parted) mkpart primary 1049K 100% // Create primary partition of using 100% free space.
(parted) set 1 lvm on // SET lvm flag to partition 1.
(parted) p
Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 100GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 100 GB 100 GB primary lvm
(parted) q
Information: You may need to update /etc/fstab.
root@:/root : partx -a /dev/sdb // add newly created partitions.
root@:/root : pvcreate /dev/sdb1 // create new PV
This is how we created 100 GB partition on SUSE Linux using parted. Newly created PV admin can use for expanding existing Volume group or can use to create new volume group.
Example.
1.
Add /dev/sdb1 to existing volume group vg01
#vgextend vg01 /dev/sdb1
Or
2.
Create new volume group vg02 using /dev/sdb1 PV.
#vgcreate vg02 /dev/sdb1
Thanks !!!!!
No comments:
Post a Comment