Original QI tianda Sheng old driver pass rescue to restore disk partition, rescue disk partition

Source: Internet
Author: User

Original QI tianda Sheng old driver pass rescue to restore disk partition, rescue disk partition

My brother Kwai Fong's class started.
This document is based on the principle of love and not watching.
Let's talk about restoring Disk Partitions In rescue today


First, let's build an environment.
(Parted) mkpart # create a partition
Partition name? []? Oldboy # Name
File system type? [Ext2]? Ext4 # type (I belong to the handsome type)
Start? 50 (start)
End? 70 (end)

Do two in this way
Number Start End Size File system Name Flags
1 17.4kB 50.0 MB 50.0 MB oldboy
2 50.3 MB 70.3 MB 19.9 MB oldboy


(Parted) rm 2 deletes the second
Number Start End Size File system Name Flags
1 17.4kB 50.0 MB 50.0 MB oldboy


Treatment


(Parted) rescue # Use rescue for treatment
Start? 50
End? 70
Searching for file systems... 54% (time left)
(Parted)

 

After checking, taosheng still
What is the problem here? Is it a partitioned table? Or is the rescue Command incorrectly used?
This is the inspiration from Xu guicong's website (formal ).

The rescue resumes accidentally deleted partitions. If you accidentally delete a partition using the parted rm command, you can use the rescue function to restore it. The start and end positions of the shard must be given during restoration. Then, parted searches for the partition within the specified range and prompts you to restore the partition.

 

I can try again with my face filter.
1. trigger three at a time.
Number Start End Size File system Name Flags
1 17.4kB 50.0 MB 50.0 MB oldboy
2 50.3 MB 59.8 MB 9437kB old
3 59.8 MB 70.3 MB 10.5 MB boy


2. Check whether the partition is correct.
[Root @ oldboyedu-39-nb ~] # Ls-l/dev/sdc *
Brw-rw ---- 1 root disk 8, 32 Aug 14 :03/dev/sdc
Brw-rw ---- 1 root disk 8, 33 Aug 14 20:02/dev/sdc1
Brw-rw ---- 1 root disk 8, 34 Aug 14 :02/dev/sdc2
Brw-rw ---- 1 root disk 8, 35 Aug 14 20:02/dev/sdc3

3. Take a wave of formatting
[Root @ oldboyedu-39-nb ~] # Mkfs. ext4/dev/sdc1
[Root @ oldboyedu-39-nb ~] # Mkfs. ext4/dev/sdc2
[Root @ oldboyedu-39-nb ~] # Mkfs. ext4/dev/sdc3
4 do not notify the disk to check for a wave
[Root @ oldboyedu-39-nb ~] # Tune2fs-c 0-I 0/dev/sdc1
[Root @ oldboyedu-39-nb ~] # Tune2fs-c 0-I 0/dev/sdc2
[Root @ oldboyedu-39-nb ~] # Tune2fs-c 0-I 0/dev/sdc3
5. One wave of mounting
[Root @ oldboyedu-39-nb ~] # Mount/dev/sdc1/mnt/
[Root @ oldboyedu-39-nb ~] # Mount/dev/sdc2/mnt/
[Root @ oldboyedu-39-nb ~] # Mount/dev/sdc3/mnt/
6. View Qigong Wave
[Root @ oldboyedu-39-nb ~] # Df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/sda3 19G 1.5G 17G 9%/
Tmpfs 491 M 0 491 M 0%/dev/shm
/Dev/sda1 190 M 35 M 146 M 19%/boot
/Dev/sdc1 8.7 M 92 K 8.1 M 2%/mnt
/Dev/sdc2 8.7 M 92 K 8.1 M 2%/mnt
/Dev/sdc3 8.7 M 92 K 8.1 M 2%/mnt


7. delete 3 partitions
[Root @ oldboyedu-39-nb ~] # Umount/dev/sdc3
(Parted) rm3
Number Start End Size File system Name Flags
1 17.4kB 50.0 MB 50.0 MB oldboy
2 50.3 MB 59.8 MB 9437kB old
8. Start with another wave of excitement
(Parted) rescue
Start? 60
End? 70
Information: A ext4 primary partition was found at 59.8 MB-> 70.3 MB. Do you want
To add it to the partition table?
Yes/No/Cancel? Yes
Warning: WARNING: the kernel failed to re-read the partition table on/dev/sdc
(Device or resource busy). As a result, it may not reflect all of your changes
Until after reboot.

9. Leave a question here
(Parted) p
Model: VMware, VMware Virtual S (scsi)
Disk/dev/sdc: 107 MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 50.0 MB 50.0 MB ext4 oldboy
2 50.3 MB 59.8 MB 9437kB ext4 old
3 59.8 MB 70.3 MB 10.5 MB ext4
Where did my 3 boy go?

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.