There are two Linux, one of which is broken, and then I'm going to hang the hard drive of this machine on another machine, and I want to see the file in the/tmp directory of this machine broken.
The whole process is as follows:
Ogin As:root
[email protected] ' s password:
Last Login:fri Dec 5 14:47:42 from Chengmanyu.asiapacific.cpqcorp.net
[Email protected] ~]# fdisk-l
disk/dev/sda:21.5 GB, 21474836480 bytes
Heads, Sectors/track, 20480 cylinders
Units = Cylinders of 2048 * 1048576 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x0003008c
Device Boot Start End Blocks Id System
/DEV/SDA1 * 2 501 512000 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 502 20480 20458496 8e Linux LVM
Partition 2 does not end on cylinder boundary.
disk/dev/mapper/volgroup-lv_root:18.8 GB, 18832424960 bytes
255 heads, Sectors/track, 2289 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
disk/dev/mapper/volgroup-lv_swap:2113 MB, 2113929216 bytes
255 heads, Sectors/track, 257 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
disk/dev/sdb:21.5 GB, 21474836480 bytes
Heads, Sectors/track, 20480 cylinders
Units = Cylinders of 2048 * 1048576 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00042f63
Device Boot Start End Blocks Id System
/DEV/SDB1 * 2 501 512000 Linux
Partition 1 does not end on cylinder boundary.
/DEV/SDB2 502 20480 20458496 8e Linux LVM
Partition 2 does not end on cylinder boundary.
[Email protected] ~]# Vgdisplay
Warning:duplicate VG name Volgroup:existing 4ZNT0Y-RPZO-TEXT-E1IO-VTT8-BUPA-H23BR6 (created here) takes precedence over Y5536q-kcui-bjhl-s6oz-dauq-f5of-jam3r9
Warning:duplicate VG name Volgroup:existing 4ZNT0Y-RPZO-TEXT-E1IO-VTT8-BUPA-H23BR6 (created here) takes precedence over Y5536q-kcui-bjhl-s6oz-dauq-f5of-jam3r9
Warning:duplicate VG name Volgroup:existing Y5536Q-KCUI-BJHL-S6OZ-DAUQ-F5OF-JAM3R9 (created here) takes precedence over 4znt0y-rpzo-text-e1io-vtt8-bupa-h23br6
---Volume Group---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
ACT PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc pe/size 4994/19.51 GiB
Free Pe/size 0/0
VG UUID Y5536Q-KCUI-BJHL-S6OZ-DAUQ-F5OF-JAM3R9
Warning:duplicate VG name Volgroup:existing 4ZNT0Y-RPZO-TEXT-E1IO-VTT8-BUPA-H23BR6 (created here) takes precedence over Y5536q-kcui-bjhl-s6oz-dauq-f5of-jam3r9
---Volume Group---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
ACT PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc pe/size 4994/19.51 GiB
Free Pe/size 0/0
VG UUID 4ZNT0Y-RPZO-TEXT-E1IO-VTT8-BUPA-H23BR6
[Email protected] ~]# vgrename y5536q-kcui-bjhl-s6oz-dauq-f5of-jam3r9 VolGroup1
Warning:duplicate VG name Volgroup:existing 4ZNT0Y-RPZO-TEXT-E1IO-VTT8-BUPA-H23BR6 (created here) takes precedence over Y5536q-kcui-bjhl-s6oz-dauq-f5of-jam3r9
Warning:duplicate VG name Volgroup:existing 4ZNT0Y-RPZO-TEXT-E1IO-VTT8-BUPA-H23BR6 (created here) takes precedence over Y5536q-kcui-bjhl-s6oz-dauq-f5of-jam3r9
Warning:duplicate VG name Volgroup:existing Y5536Q-KCUI-BJHL-S6OZ-DAUQ-F5OF-JAM3R9 (created here) takes precedence over 4znt0y-rpzo-text-e1io-vtt8-bupa-h23br6
Volume Group "VolGroup" successfully renamed to "VolGroup1"
[Email protected] ~]# Lvscan
Inactive '/dev/volgroup1/lv_root ' [17.54 GiB] Inherit
Inactive '/dev/volgroup1/lv_swap ' [1.97 GiB] Inherit
ACTIVE '/dev/volgroup/lv_root ' [17.54 GiB] Inherit
ACTIVE '/dev/volgroup/lv_swap ' [1.97 GiB] Inherit
[Email protected] ~]# Vgdisplay
---Volume Group---
VG Name VolGroup1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
ACT PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc pe/size 4994/19.51 GiB
Free Pe/size 0/0
VG UUID Y5536Q-KCUI-BJHL-S6OZ-DAUQ-F5OF-JAM3R9
---Volume Group---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
ACT PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc pe/size 4994/19.51 GiB
Free Pe/size 0/0
VG UUID 4ZNT0Y-RPZO-TEXT-E1IO-VTT8-BUPA-H23BR6
[Email protected] ~]# vgchange-a y/dev/volgroup1
2 Logical Volume (s) in volume group ' VolGroup1 ' now active
[Email protected] ~]# Lvscan
ACTIVE '/dev/volgroup1/lv_root ' [17.54 GiB] Inherit
ACTIVE '/dev/volgroup1/lv_swap ' [1.97 GiB] Inherit
ACTIVE '/dev/volgroup/lv_root ' [17.54 GiB] Inherit
ACTIVE '/dev/volgroup/lv_swap ' [1.97 GiB] Inherit
[Email protected] ~]# mount/dev/volgroup1/lv_root/mnt
[Email protected] ~]# cd/mnt
[[email protected] mnt]# ls
AdminTools Cgroup Home lost+found net root SRV user
Bin Dev Lib media opt sbin sys usr
Boot etc lib64 Misc proc SELinux tmp var
[[Email protected] mnt]# CD./tmp/
[[email protected] tmp]# ls
CIM_SCHEMA.EITNW PULSE-RPPUNJTCVDM1 Vmware-root
ORBIT-GDM sendmail.cf vmwaretools-8.3.12-493255.tar.gz
passwd SENDMAIL.CF.1 Vmware-tools-distrib
Passwd.tmp Test.txt Yum.log
PASSWD.TMP.1 Virtual-root. Vyrczd
PULSE-MSFYK93SGAX9 vmware-config0
[Email protected] tmp]#
This article is from the "Full Fish" blog, please be sure to keep this source http://chengmanyu.blog.51cto.com/7198694/1587517
Linux-mounted hard drive process with LVM