只是我之前遇到的一个问题,今天为了演示再次把问题还原下,来看看怎么实现恢复。
[root@xenserver-DS-TestServer04 ~]# cat /etc/fstab
UUID=6f29f0ba-a0ea-4799-bdf4-51570d8354c6 /iso_storage ext4 defaults 0 0
[root@xenserver-DS-TestServer04 ~]# df -hP
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 18G 1.8G 16G 11% /
devtmpfs 2.0G 8.0K 2.0G 1% /dev
tmpfs 2.0G 592K 2.0G 1% /dev/shm
tmpfs 2.0G 2.1M 2.0G 1% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
xenstore 2.0G 0 2.0G 0% /var/lib/xenstored
/dev/loop0 55M 55M 0 100% /var/xen/xc-install
/dev/sda5 4.0G 260M 3.5G 7% /var/log
tmpfs 394M 0 394M 0% /run/user/0
/dev/VG_XenStorage-e383cf7d-45b2-7afb-b4e0-43e4a190f55a/local_iso 20G 45M 19G 1% /iso_storage
[root@xenserver-DS-TestServer04 ~]#
先来查查sda盘的分区信息,使用blkid命令我们可以看到分区的文件系统 LABEL UUID等信息,这就足够我们恢复了
Xenserver之Xenserver 7 fatsb文件丢失恢复方法Xenserver之Xenserver 7 fatsb文件丢失恢复方法
[root@xenserver-DS-TestServer04 ~]# blkid /dev/sda*
/dev/sda: PTTYPE="gpt"
/dev/sda1: LABEL="root-qubemj" UUID="c8170070-eb33-4e3b-a816-a52e90b60a3f" TYPE="ext3" PARTUUID="cfa2d968-58a9-4358-9884-8252f6ff6155"
/dev/sda2: PARTUUID="058b5bdd-076e-42dd-afbb-9de41b1ae0c5"
/dev/sda3: UUID="iTen8p-0CVA-YoF5-Jyqd-aQMq-Yeis-7v3vnB" TYPE="LVM2_member" PARTUUID="cce85972-1476-494f-8630-eee61aef0592"
/dev/sda4: PARTUUID="2b35a223-a191-41cf-a7fd-81b5750dd507"
/dev/sda5: LABEL="logs-qubemj" UUID="c270b219-06b7-4632-b902-ae37f8a2b887" TYPE="ext3" PARTUUID="ac1b8359-69b4-4d88-a2d2-1e58fd0b60ea"
/dev/sda6: LABEL="swap-qubemj" UUID="fdd4f987-8786-4960-a171-095fa3033405" TYPE="swap" PARTUUID="c71e4c15-45f9-48ce-89b1-ad16d89516e3"
[root@xenserver-DS-TestServer04 ~]#
再来看看恢复好之后的文件内容,唉,看来Xenserver的默认自动分区方案还是非常好用的啊。
[root@xenserver-DS-TestServer04 ~]# cat /etc/fstab
#/dev/sda1: LABEL="root-qubemj" UUID="c8170070-eb33-4e3b-a816-a52e90b60a3f" TYPE="ext3" PARTUUID="cfa2d968-58a9-4358-9884-8252f6ff6155"
#/dev/sda2: PARTUUID="058b5bdd-076e-42dd-afbb-9de41b1ae0c5"
#/dev/sda3: UUID="iTen8p-0CVA-YoF5-Jyqd-aQMq-Yeis-7v3vnB" TYPE="LVM2_member" PARTUUID="cce85972-1476-494f-8630-eee61aef0592"
#/dev/sda4: PARTUUID="2b35a223-a191-41cf-a7fd-81b5750dd507"
#/dev/sda5: LABEL="logs-qubemj" UUID="c270b219-06b7-4632-b902-ae37f8a2b887" TYPE="ext3" PARTUUID="ac1b8359-69b4-4d88-a2d2-1e58fd0b60ea"
#/dev/sda6: LABEL="swap-qubemj" UUID="fdd4f987-8786-4960-a171-095fa3033405" TYPE="swap" PARTUUID="c71e4c15-45f9-48ce-89b1-ad16d89516e3"
#######上面是本机各个分区的详细信息
LABEL=root-qubemj / ext3 defaults 1 1
#LABEL=BOOT-QUBEMJ /boot/efi vfat defaults 0 2 #如果有EFI启动的还需要加这一条
LABEL=swap-qubemj swap swap defaults 0 0
LABEL=logs-qubemj /var/log ext3 defaults 0 2
/opt/xensource/packages/iso/XenCenter.iso /var/xen/xc-install iso9660 loop,ro 0 0
UUID=6f29f0ba-a0ea-4799-bdf4-51570d8354c6 /iso_storage ext4 defaults 0 0
[root@xenserver-DS-TestServer04 ~]#