Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 102400 7 hpfs/ntfs//100m,win7 reserved Partition
Partition 1 does not end on cylinder boundary.
/dev/sda2 7600 60943360 7 hpfs/ntfs//60g,ntfs format, Win7 C-Drive
/dev/sda3 7601 59948 420484904 f W95 Ext ' d (LBA)//Extended partition: 420G, 500g-60g=420g, all as extended partition
Partition 3 does not end on cylinder boundary.
/dev/sda5 7601 22800 122093968+ b W95 FAT32//120g,fat32,win7 in D-Disk
/dev/sda6 22801 37999 122085936 b W95 FAT32//120g,fat32,win7 in E-drive
/dev/sda7 38000 40693 21639523+ b W95 FAT32//20g,fat32,win7 G-plate
/dev/sda8 45532 58858 107049096 in Linux//107g,ext3,linux/
/DEV/SDA9 58859 59948 8753152 The swap of Linux Swap/solaris//8g,swap,linux
/DEV/SDA10 40694 45531 38861203+ 8e Linux LVM//SDA10,37G,LVM
On is my computer partition design scheme:
#partx-a/dev/sda10//Let just partition operation take effect, RHEL 6.0 under Partprobe can not use, only with partx-a
#partprobe forcing the kernel to re-locate the partition table
[Email protected] ~]# pvcreate/dev/sda10
[Email protected] ~]# PVs
PV VG Fmt Attr PSize pfree
/DEV/SDA10 lvm2 a--37.06g 37.06g
[Email protected] ~]# vgcreate vg0/dev/sda10
[Email protected] ~]# VGS
VG #PV #LV #SN Attr vsize vfree
Vg0 1 0 0 wz--n-37.06g 37.06g
[Email protected] ~]# lvcreate-l 10g-n basenode vg0
Logical volume "Basenode" created
[[email protected] ~]# LVS
LV VG Attr lsize Pool Origin data% Move Log copy% Convert
Basenode vg0-wi-a---10.00g
Create a snapshot: (Before you do this, install the virtual machine on Basenode.)
[Email protected] desktop]# lvcreate-s-L 2g-n Node5/dev/vg0/basenode
Logical volume "Node5" created
[Email protected] desktop]# lvcreate-s-L 2g-n Node6/dev/vg0/basenode
Logical volume "Node6" created
[Email protected] desktop]# lvcreate-s-L 2g-n Node7/dev/vg0/basenode
Logical volume "Node7" created
OK, stop, don't continue to create the file system (why?). Because of the need for file system selection in the steps to install the virtual machine)
Open Virt-manager, first install a virtual machine on the/dev/vg0/basenode
Next step: Create a file system
Create a file system for Sda10,sda11,sda12,sda13, respectively ext3
#mkfs-T ext3/dev/sda10 or #mke2fs-j-L "mah"-B 2028-i 8192/dev/sda10 both of them are for SDA10 file system creation, perhaps you will ask: Ext3 not create mke2fs file System? Yes, EXT2 does not have journal log function, add-j option, will automatically upgrade to Ext3, so, to create ext2, you can, as long as not add-j option on the line, add is equal to the creation of EXT3
Next: fsck disk Check: The file system has a problem when used Oh, normal use will damage the system, and when using fsck, do not mount, be sure to uninstall
#fsck-T ext3-c-f/dev/sda10//-c is the display progress bar,-f Force Check,-a automatically fix the problematic sector,-a based on the contents of the/etc/fstab, scan the device once
Lost+found directory: When fsck checks the file system, if there is a problem, the problematic data will be placed in this directory, so, under normal circumstances, this directory is empty, if not empty, it is estimated that your file system has a problem
Fsck actually called the E2FSCK software.
#badblocks-sv/dev/sda10//fsck is to check the file system there is no problem, badblocks is to check the hard disk sector has no bad track command,-s list progress bar,-V on the screen can see the progress bar
Since #mke2fs-c/DEV/SDA10 has processed the read test of the disk's surface at the time of formatting, badblocks This command is generally not used.
Next: Mount
#mount Show All Mounted
#mount-L Displays all mounted and displays the label
#mount-A based on/etc/fstab will not mount on full mount
#mount-T ext3-l Mah mounts based on the file system's volume label
#mount-T iso9660-l mah-o other options/dev/dsa10/mnt
The actual mount of the #mount-N default mount is written to the/etc/mtab file in real time, and this-n means no write
We're going to create a virtual machine without performing a mount operation
This article from "8176010" blog, declined reprint!
The virtual machine build (snapshot method) in my dual-system Linux