centostricks

Just another WordPress.com site

Monthly Archives: August 2012

Replace a faulty disk from Volume Group


This commands are run on CentOS EL 6.0

Replace a faulty disk from Volume Group

Here /dev/sdb has an hardware issue and its been found to be a faulty Disk.

Step 1: Let us scan to find any data available on the faulty disk, Here we find that 120MB is consumed and data is available

[root@localhost ~]# pvscan
PV /dev/sdc    VG VG_01           lvm2 [1020.00 MiB / 1020.00 MiB free]
PV /dev/sdb    VG VG_00           lvm2 [1020.00 MiB / 120.00 MiB free]
PV /dev/sda2   VG VolGroup        lvm2 [12.51 GiB / 0    free]
PV /dev/sdd                       lvm2 [1.00 GiB]
Total: 4 [15.50 GiB] / in use: 3 [14.50 GiB] / in no VG: 1 [1.00 GiB]

Step 2 : Check the LV and PV mapping  :  /dev/VG_00/song is mapped to /dev/sdb

[root@localhost ~]# pvdisplay -m /dev/sdb
— Physical volume —
PV Name               /dev/sdb
VG Name               VG_00
PV Size               1.00 GiB / not usable 4.00 MiB
Allocatable           yes
PE Size               4.00 MiB
Total PE              255
Free PE               30
Allocated PE          225
PV UUID               9oE3Rn-8obQ-8wwn-Samq-tM1N-VVaM-o1qf5W

— Physical Segments —
Physical extent 0 to 224:
Logical volume    /dev/VG_00/song
Logical extents    0 to 224
Physical extent 225 to 254:
FREE

[root@localhost ~]# lvdisplay -m /dev/VG_00/song
— Logical volume —
LV Name                /dev/VG_00/song
VG Name                VG_00
LV UUID                09CVS7-y162-Y8pp-IUXH-v67C-Pw7a-auFCKj
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                900.00 MiB
Current LE             225
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:2

— Segments —
Logical extent 0 to 224:
Type        linear
Physical volume    /dev/sdb
Physical extents    0 to 224

Step 3: Check the status of current LV

[root@localhost ~]# lvscan
ACTIVE            ‘/dev/VG_00/song’ [900.00 MiB] inherit
ACTIVE            ‘/dev/VolGroup/lv_root’ [10.54 GiB] inherit
ACTIVE            ‘/dev/VolGroup/lv_swap’ [1.97 GiB] inherit

Step 4 : Adding a New PV to VG to move the data from faulty PV to this NEW PV( IN our case /dev/sdb is found faulty)

[root@localhost ~]# vgextend VG_00 /dev/sd
sda   sda1  sda2  sdb   sdc   sdd
[root@localhost ~]# vgextend VG_00 /dev/sdd
Volume group “VG_00” successfully extended

Step 5 : Moving all its extents from /dev/sdb to free extents in VG_00, in our case we have only one pv /dev/sdd which is newly added. So all the extents are moved to /dev/sdd

[root@localhost ~]# pvmove /dev/sdb
/dev/sdb: Moved: 12.9%
/dev/sdb: Moved: 100.0%
[root@localhost ~]#
[root@localhost ~]#

Step 6 : Check for the changes, All the extents from /dev/sdb is moved to /dev/sdd..

[root@localhost ~]# pvscan
PV /dev/sdc    VG VG_01      lvm2 [1020.00 MiB / 1020.00 MiB free]
PV /dev/sdb    VG VG_00      lvm2 [1020.00 MiB / 1020.00 MiB free]
PV /dev/sdd    VG VG_00      lvm2 [1020.00 MiB / 120.00 MiB free]
PV /dev/sda2   VG VolGroup   lvm2 [12.51 GiB / 0    free]
Total: 4 [15.50 GiB] / in use: 4 [15.50 GiB] / in no VG: 0 [0   ]

Step 7: Still our LV is active and all data is intact. nothing is lost 🙂

[root@localhost ~]# lvscan
ACTIVE            ‘/dev/VG_00/song’ [900.00 MiB] inherit
ACTIVE            ‘/dev/VolGroup/lv_root’ [10.54 GiB] inherit
ACTIVE            ‘/dev/VolGroup/lv_swap’ [1.97 GiB] inherit
[root@localhost ~]# cd /striped/
[root@localhost striped]# ls
aa  lost+found  test
[root@localhost striped]# cat aa
dnandsandlandtesteinggg
[root@localhost striped]# cd

Step 8 : Now we are removing the faulty DISK (PV) /dev/sdb from Volume group VG_00

[root@localhost ~]# vgreduce VG_00 /dev/sdb
Removed “/dev/sdb” from volume group “VG_00”

Step 9: OUR Faulty Disk /dev/sdb is free from all VG and ready to be removed from System

[root@localhost ~]# pvscan
PV /dev/sdd    VG VG_00           lvm2 [1020.00 MiB / 120.00 MiB free]
PV /dev/sdc    VG VG_01           lvm2 [1020.00 MiB / 1020.00 MiB free]
PV /dev/sda2   VG VolGroup        lvm2 [12.51 GiB / 0    free]
PV /dev/sdb                       lvm2 [1.00 GiB]
Total: 4 [15.50 GiB] / in use: 3 [14.50 GiB] / in no VG: 1 [1.00 GiB]
[root@localhost ~]# cd /striped/
[root@localhost striped]# ls
aa  lost+found  test
[root@localhost striped]# cat aa
dnandsandlandtesteinggg

Now Our LV /dev/VG_00/song is using the extents from /dev/sdd.

[root@localhost ~]# lvdisplay -m /dev/VG_00/song
— Logical volume —
LV Name                /dev/VG_00/song
VG Name                VG_00
LV UUID                09CVS7-y162-Y8pp-IUXH-v67C-Pw7a-auFCKj
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                900.00 MiB
Current LE             225
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:2

— Segments —
Logical extent 0 to 224:
Type        linear
Physical volume    /dev/sdd
Physical extents    0 to 224

ALL THE BEST !!! . We did all this steps. without unmounting the filesystem or taking the system Down !!! Good Luck !!

Advertisements

resize logical Volume (LV) with Risk


This blog shows how to reduce the LV and split the VG to create a VG with unused Space

Warning !!! Reducing LV is like playing with DATA !!!

This steps are done on CentOS 6.x OS EL

[root@localhost ~]# lvreduce -L 900M /dev/VG_00/song
WARNING: Reducing active and open logical volume to 900.00 MiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce song? [y/n]: y
Reducing logical volume song to 900.00 MiB
Logical volume song successfully resized
[root@localhost ~]# resize2fs /dev/VG_00/song
resize2fs 1.41.10 (10-Feb-2009)
Filesystem at /dev/VG_00/song is mounted on /striped; on-line resizing required
On-line shrinking from 393216 to 230400 not supported.
[root@localhost ~]# umount /striped/
[root@localhost ~]# resize2fs /dev/VG_00/song
resize2fs 1.41.10 (10-Feb-2009)
Please run ‘e2fsck -f /dev/VG_00/song’ first.

[root@localhost ~]# e2fsck -f /dev/VG_00/song
e2fsck 1.41.10 (10-Feb-2009)
The filesystem size (according to the superblock) is 393216 blocks
The physical size of the device is 230400 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes

[root@localhost ~]# resize2fs /dev/VG_00/song
resize2fs 1.41.10 (10-Feb-2009)
Please run ‘e2fsck -f /dev/VG_00/song’ first.

[root@localhost ~]# man re
[root@localhost ~]# man resize2fs
[root@localhost ~]# resize2fs -f /dev/VG_00/song
resize2fs 1.41.10 (10-Feb-2009)
Resizing the filesystem on /dev/VG_00/song to 230400 (4k) blocks.
The filesystem on /dev/VG_00/song is now 230400 blocks long.

[root@localhost ~]# e2fsck -f /dev/VG_00/song
e2fsck 1.41.10 (10-Feb-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/VG_00/song: 13/65536 files (7.7% non-contiguous), 23039/230400 blocks
[root@localhost ~]# mount /dev/VG_00/song /striped/
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
11G  4.5G  5.4G  46% /
tmpfs                 499M  524K  499M   1% /dev/shm
/dev/sda1             485M   33M  428M   7% /boot
/dev/sr0              4.1G  4.1G     0 100% /media/RHEL_6.0 x86_64 Disc 1
/dev/mapper/VG_00-song
884M   74M  766M   9% /striped
[root@localhost ~]# cd /striped/
[root@localhost striped]# ll
total 40992
-rw-r–r–. 1 root root       24 Aug 10 08:38 aa
drwx——. 2 root root    16384 Aug 10 08:35 lost+found
-rw-r–r–. 1 root root 41955328 Aug 10 08:36 test
[root@localhost striped]# cat aa
dnandsandlandtesteinggg

[root@localhost striped]#
[root@localhost striped]#
[root@localhost striped]# pvscan
PV /dev/sdb    VG VG_00           lvm2 [1020.00 MiB / 120.00 MiB free]
PV /dev/sdc    VG VG_00           lvm2 [1020.00 MiB / 1020.00 MiB free]
PV /dev/sda2   VG VolGroup        lvm2 [12.51 GiB / 0    free]
PV /dev/sdd                       lvm2 [1.00 GiB]
Total: 4 [15.50 GiB] / in use: 3 [14.50 GiB] / in no VG: 1 [1.00 GiB]
[root@localhost striped]# pvmove /dev/sdc /dev/sdb
No data to move for VG_00
[root@localhost striped]#
[root@localhost striped]# vgsplit VG_00 VG_01 /dev/sdc
Volume group VG_00 is not resizeable.
[root@localhost striped]# vgchange -x y VG_00
Volume group “VG_00” successfully changed
[root@localhost striped]# vgsplit VG_00 VG_01 /dev/sdc
New volume group “VG_01” successfully split from “VG_00”
[root@localhost striped]# vgscan
Reading all physical volumes.  This may take a while…
Found volume group “VG_01” using metadata type lvm2
Found volume group “VG_00” using metadata type lvm2
Found volume group “VolGroup” using metadata type lvm2
[root@localhost striped]# pvscan
PV /dev/sdc    VG VG_01           lvm2 [1020.00 MiB / 1020.00 MiB free]
PV /dev/sdb    VG VG_00           lvm2 [1020.00 MiB / 120.00 MiB free]
PV /dev/sda2   VG VolGroup        lvm2 [12.51 GiB / 0    free]
PV /dev/sdd                       lvm2 [1.00 GiB]
Total: 4 [15.50 GiB] / in use: 3 [14.50 GiB] / in no VG: 1 [1.00 GiB]
[root@localhost striped]# ls
aa  lost+found  test
[root@localhost striped]# cat aa
dnandsandlandtesteinggg

Hot remove scsi Disk in Centos 6.x without reboot of OS


Hot remove SCSI disk without rebooting CentOS 5.x/6.x

Error message shown once the Disk is removed from Virtual Machine at VM Level….

[root@localhost ~]# tailf /var/log/messages
Aug 10 07:32:52 localhost kernel: end_request: I/O error, dev sde, sector 8
Aug 10 07:32:52 localhost kernel: sd 2:0:4:0: [sde] Unhandled error code
Aug 10 07:32:52 localhost kernel: sd 2:0:4:0: [sde] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Aug 10 07:32:52 localhost kernel: sd 2:0:4:0: [sde] CDB: Read(10): 28 00 00 00 00 08 00 00 08 00
Aug 10 07:32:52 localhost kernel: end_request: I/O error, dev sde, sector 8
Aug 10 07:32:52 localhost kernel: sd 2:0:4:0: [sde] Unhandled error code
Aug 10 07:32:52 localhost kernel: sd 2:0:4:0: [sde] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Aug 10 07:32:52 localhost kernel: sd 2:0:4:0: [sde] CDB: Read(10): 28 00 00 00 00 08 00 00 08 00
Aug 10 07:32:52 localhost kernel: end_request: I/O error, dev sde, sector 8

Parted is still showing information of /dev/sde, even after its removed from the Virtual Machine (VM)

[root@localhost ~]# parted -l
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 14.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  525MB   524MB   primary  ext4         boot
 2      525MB   14.0GB  13.4GB  primary               lvm

Error: /dev/sdb: unrecognised disk label                                  

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdc: 1074MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

Error: /dev/sdd: unrecognised disk label                                  

Error: /dev/sde: unrecognised disk label                    

/proc/partitions is still showing information of /dev/sde, even after its removed from the Virtual Machine (VM)

[root@localhost ~]# cat /proc/partitions
major minor  #blocks  name

   8        0   13631488 sda
   8        1     512000 sda1
   8        2   13118464 sda2
 253        0   11051008 dm-0
 253        1    2064384 dm-1
   8       32    1048576 sdc
   8       48    1048576 sdd
   8       16    1048576 sdb
   8       64    1048576 sde

/proc/scsi/scsi is still showing information of /dev/sde, even after its removed from the Virtual Machine (VM)

[root@localhost ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 02 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 03 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 04 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02

REMOVING THE  /DEV/SDE FROM OPERATING SYSTEM WITH BELOW COMMAND !!!

[root@localhost ~]# echo “scsi remove-single-device 2 0 4 0” > /proc/scsi/scsi
[root@localhost ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 02 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02
Host: scsi2 Channel: 00 Id: 03 Lun: 00
  Vendor: VMware,  Model: VMware Virtual S Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 02

the above output no more shows info about “Host: scsi2 Channel: 00 Id: 04 Lun: 00”

/dev/sde is no more shown now

[root@localhost ~]# cat /proc/partitions
major minor  #blocks  name

   8        0   13631488 sda
   8        1     512000 sda1
   8        2   13118464 sda2
 253        0   11051008 dm-0
 253        1    2064384 dm-1
   8       32    1048576 sdc
   8       48    1048576 sdd
   8       16    1048576 sdb
[root@localhost ~]#

/dev/sde is no more shown now

[root@localhost ~]# parted -l | grep “dev/sd*”
Disk /dev/sda: 14.0GB
Error: /dev/sdb: unrecognised disk label                                  
Disk /dev/sdc: 1074MB
Error: /dev/sdd: unrecognised disk label                                  
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
Error: /dev/sr0: unrecognised disk label

Good Luck !!!!

Hot add scsci Disk in Centos 6.x/5.x without reboot of OS


Steps to Identify a newly added scsi disk in Centos 6.0 without rebooting OS

[root@localhost ~]# ls /sys/class/scsi_host/host
host0/ host1/ host2/
[root@localhost ~]#

This command will identify and hot add the disk running on host 2 , below we can see then as scsi2..

[root@localhost ~]# echo “- – -” > /sys/class/scsi_host/host2/scan

Now displaying the identified disks /dev/sdc, /dev/sdd, /dev/sdb

[root@localhost ~]# fdisk -l |grep sd
Disk /dev/dm-0 doesn’t contain a valid partition table
Disk /dev/dm-1 doesn’t contain a valid partition table
Disk /dev/sdc doesn’t contain a valid partition table
Disk /dev/sdd doesn’t contain a valid partition table
Disk /dev/sdb doesn’t contain a valid partition table
Disk /dev/sda: 14.0 GB, 13958643712 bytes
/dev/sda1 * 1 64 512000 83 Linux
/dev/sda2 64 1698 13118464 8e Linux LVM
Disk /dev/sdc: 1073 MB, 1073741824 bytes
Disk /dev/sdd: 1073 MB, 1073741824 bytes
Disk /dev/sdb: 1073 MB, 1073741824 bytes

[root@localhost ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 02 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 03 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02

current status : there are 2 scsi drives with 1 scsi drive (CDROM) on scsi 1 is the harddrive. Now i have added 1 more scsi drive. We will see what happens

Adding one more disk, but identifying with a different command

Another method used to identify the newly added disk : this command will not alter/overwrite any existing configurations

[root@localhost ~]# echo “scsi add-single-device 2 0 4 0” > /proc/scsi/scsi

When we run with a wrong values, below will be the output. there is no changes or damage. i have not encountered any issues. but not recommended to do so !

[root@localhost ~]# echo “scsi add-single-device 0 0 4 0” > /proc/scsi/scsi
-bash: echo: write error: Invalid argument
[root@localhost ~]# echo “scsi add-single-device 0 4 4 0” > /proc/scsi/scsi
-bash: echo: write error: Invalid argument
[root@localhost ~]# echo “scsi add-single-device 0 3 4 0” > /proc/scsi/scsi
-bash: echo: write error: Invalid argument
[root@localhost ~]# echo “scsi add-single-device 0 2 4 0” > /proc/scsi/scsi
-bash: echo: write error: Invalid argument
[root@localhost ~]# echo “scsi add-single-device 0 1 4 0” > /proc/scsi/scsi
-bash: echo: write error: Invalid argument
[root@localhost ~]# echo “scsi add-single-device 1 0 4 0” > /proc/scsi/scsi
-bash: echo: write error: Invalid argument
[root@localhost ~]# echo “scsi add-single-device 4 0 4 0” > /proc/scsi/scsi
-bash: echo: write error: No such device or address
[root@localhost ~]# echo “scsi add-single-device 3 0 4 0” > /proc/scsi/scsi
-bash: echo: write error: No such device or address

The effect of echo “scsi add-single-device 2 0 4 0” > /proc/scsi/scsi is shown below :

[root@localhost ~]# echo “scsi add-single-device 2 0 4 0” > /proc/scsi/scsi
[root@localhost ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 02 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 03 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 04 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02

We can see that there is a newly identified disk, Please use fdisk or parted to create required partitions ….

Initializing the Newly added disk before creating partitions

Better to use fdisk to create partitions with fdisk(Initializes the Disk) , as this disks are not initialized yet, and will give below errors, if parted is used

[root@localhost ~]# parted -l |grep sd*
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 14.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
Error: /dev/sdb: unrecognised disk label
Error: /dev/sdc: unrecognised disk label
Error: /dev/sdd: unrecognised disk label
Error: /dev/sde: unrecognised disk label

See the below results, parted is not even allowing to create partitions :

[root@localhost ~]# parted /dev/sdc
GNU Parted 2.1
Using /dev/sdc
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Error: /dev/sdc: unrecognised disk label
(parted) u s
(parted) mkpart primary 64 -1s
Error: /dev/sdc: unrecognised disk label
(parted) p
Error: /dev/sdc: unrecognised disk label
(parted)

See the below output. “Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)”

If you are flexible with fdisk, you can go ahead and create partitions and save it.

If you are not flexible with fdisk and good with parted, just use the below steps , don’t create any partitions. just access the device and type ‘w’ later use parted to create partitions

[root@localhost ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xfa03eeaf.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
switch off the mode (command ‘c’) and change display units to
sectors (command ‘u’).

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Now use parted and create partitions. see the below output, no more errors or warning. you are good to proceed with next steps of creating partitions. Good Luck !!!

[root@localhost ~]# parted /dev/sdc
GNU Parted 2.1
Using /dev/sdc
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdc: 1074MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags

(parted)

***** END****