寻觅生命中的那一片浅草......

Create Logical Volume

是RHCE里面的内容,今天在rhel5上试过,修改了下
The Logical Volume Manager (LVM) enables you to set up one filesystem on
multiple partitions. For example, assume you’re adding more users and are running
out of room in your /home directory. You don’t have any unpartitioned space available
on your current hard disk.
With the LVM, all you need to do is add another hard disk, configure some
partitions, back up /home, and use the LVM tools to combine the new partition and
the one used by /home into a volume set. You may need to install the LVMrpm. Once it
is installed, the steps are fairly straightforward:


1. Add a new hard disk.
2. Create new partitions. Assign the Linux LVM filesystem to one or more
of these partitions. This can be easily done with the Linux fdisk utility.
3. Back up /home. Assign the LVM filesystem to that partition.
4. Scan for Linux LVM filesystems with the /sbin/vgscan utility, to create
a database for other LVM commands.
5. Create volumes for the set with the /sbin/pvcreate /dev/partition command.
6. Add the desired volumes to a specific volume group with the /sbin/vgcreate
groupname /dev/partition1 /dev/partition2 … command.
7. Finally, you can create a logical volume. Use the /sbin/lvcreate -L xyM -n
volname groupname command, where xy is the size of the volume in MB,
and the groupname is the volume group name from the previous step.
8. Now you can format the logical volume with the mkfs command for the
desired filesystem (usually ext2 or ext3), using the device name returned
by the lvcreate command.
($sudo mkfs.ext3 /dev/VolGroup01/vol1)
dev后的名字根据vgcreate命令中的groupname和vgcreate中的volname相应作修改。
创建好后,可以mount了!

尚无评论

发表评论

2024年四月
« 5月    
1234567
891011121314
15161718192021
22232425262728
2930