标签:reboot mount 疑惑 ble umount partition time 方法 ant
老葵花哥哥课堂开课了
本文档秉承爱看不看的原则 一不要钱 二服务大众的高尚情操
咱们今天讲一讲rescue恢复磁盘分区
首先咱们搭建环境搞起来
(parted) mkpart #创建分区
Partition name? []? oldboy #名字
File system type? [ext2]? ext4 #类型 (本人属于帅的类型)
Start? 50 (开始)
End? 70 (结束)
按这个方法 做两个
Number Start End Size File system Name Flags
1 17.4kB 50.0MB 50.0MB oldboy
2 50.3MB 70.3MB 19.9MB oldboy
(parted) rm 2 删了第二个
Number Start End Size File system Name Flags
1 17.4kB 50.0MB 50.0MB oldboy
进行治疗
(parted) rescue #使用rescue治疗
Start? 50
End? 70
searching for file systems... 54% (time left 00:00)
(parted)
经过查看 涛声依旧
在这里我们到底是什么出现问题 是分区表吗?还是rescue命令的错误使用
这是徐贵聪哥的网站(正规的)给我灵感 就这下面这句
rescue 恢复不小心删除的分区。如果不小心用parted的rm命令删除了一个分区,那么可以通过rescue功能进行恢复。恢复时需要给出分区的起始和结束的位置。然后parted就会在给定的范围内去寻找,并提示恢复分区。
凭借我的颜值再来试试 不信搞不定
1 这次一次搞三个
Number Start End Size File system Name Flags
1 17.4kB 50.0MB 50.0MB oldboy
2 50.3MB 59.8MB 9437kB old
3 59.8MB 70.3MB 10.5MB boy
2查看 是否分区了
[root@oldboyedu-39-nb ~]# ls -l /dev/sdc*
brw-rw---- 1 root disk 8, 32 Aug 14 20: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 20:02 /dev/sdc2
brw-rw---- 1 root disk 8, 35 Aug 14 20:02 /dev/sdc3
3 格式化走一波
[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 不通知磁盘检查走一波
[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 挂载来一波
[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 查看 龟派气功波
[root@oldboyedu-39-nb ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G 1.5G 17G 9% /
tmpfs 491M 0 491M 0% /dev/shm
/dev/sda1 190M 35M 146M 19% /boot
/dev/sdc1 8.7M 92K 8.1M 2% /mnt
/dev/sdc2 8.7M 92K 8.1M 2% /mnt
/dev/sdc3 8.7M 92K 8.1M 2% /mnt
7 删除3分区
[root@oldboyedu-39-nb ~]# umount /dev/sdc3
(parted) rm3
Number Start End Size File system Name Flags
1 17.4kB 50.0MB 50.0MB oldboy
2 50.3MB 59.8MB 9437kB old
8 怀着激动的心情开始再来一波
(parted) rescue
Start? 60
End? 70
Information: A ext4 primary partition was found at 59.8MB -> 70.3MB. 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 在这里留个疑惑
(parted) p
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdc: 107MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 50.0MB 50.0MB ext4 oldboy
2 50.3MB 59.8MB 9437kB ext4 old
3 59.8MB 70.3MB 10.5MB ext4
请问我的 3 的boy去了哪里?
标签:reboot mount 疑惑 ble umount partition time 方法 ant
原文地址:http://www.cnblogs.com/dsab/p/7375577.html