To show how can we recover the partition with no data loss in my example “ /dev/sdb1” partition mounted on “/opt” directory which have bellow information.

 

clip_image002[4]

 

To remove the partition first we need to unmount this.

I use “parted” command to remove the partition

clip_image004[4]

After deleting the partition now try to recover it with “parted” partition utility with “rescue” command.

 

 

clip_image006[4]

 

After recover the partition now again try to mount this.

 

clip_image008[4]

After mounting we can see our all data are safe. J

 

 

Parted copy partition  ( /dev/sdb1 to /dev/sdb2 )

clip_image010[4]

 

1st unmount the partition /dev/sdb1

clip_image012[4]

 

 

Copy partition 1 to 2

clip_image014[5]

Leave a Reply