Documente Academic
Documente Profesional
Documente Cultură
http://rhel6notes.blogspot.in/search/label/LVM
Share
More
Next Blog
Create Blog
Sign In
About ME The main purpose of this site is to dump all my notes on Redhat certification RHCSA/RHEL. If you have comments and suggestions, please do email me on mctofferatgmaildotcom
LVM commands
LVM commands: Show lvm #pvs #vgs #lvs #pvdisplay #vgdisplay #lvdisplay To add a disk #pvcreate /dev/ to create a Volume group #vgcreate /dev/ to create a Logical Volume #lvcreate -L <###> To extend #lvextend -L +### /dev/vg_name/lv_name #resize2fs /dev/vg_name/lv_name To reduce unmount the filesystems first # e2fsck -f /dev/vg_name/lvname # resize2fs /dev/vg_name/lv_name 100m # lvreduce -L -100 /dev/vg_name/lv_name Moving data # pvcreate /dev/sdc # vgextend vg_group01 /dev/sdc # lvcreate -L 100 -n lvol01 vg_group01 # pvmove /dev/sdb /dev/sdc Removing #dmsetup info -c /dev/vg_group01/lv_group01 #dmsetup remove /dev/vg_group01/lv_group01 #vgremove -f /dev/vg_group01 #pvremove /dev/sdb
Labels . (1) /info/Quick_Notes (4) /info/RHCE_Exam_Obje ctives (2) accounts (2) apache (2) Archive and Compression (1) bind (1) filesystem (7) grub (1) iptables (3) Journal (5) kickstart (1) KVM (1) Lab station (1) luks (1) LVM (2)
No comments:
1 of 3
http://rhel6notes.blogspot.in/search/label/LVM
ports (1) RAID (1) remote access (1) RHCSA/RHEL Books and Sites (1) rpm (2) runlevels (1) security (4) selinux (1) ssh (1) swap (1) system messages (1) YUM (2) Saturday, February 26, 2011
[root@rhel01 ~]# vgcreate lab_group1 /dev/sda1 Volume group lab_group1 successfully created
Ready To Play?
Quikr.com/treasure_hunt Play for Free & Win Recharge worth Rs.1 Lakh Everday. Play Now. In this sample i created 10MB of logical volume mount to /mnt [root@rhel01 ~]# lvcreate -L 10M lab_group1 -n lab01 Rounding up size to full physical extent 12.00 MiB Logical volume lab01 created [root@rhel01 ~]# mkfs.ext4 /dev/lab_group1/lab01 mke2fs 1.41.12 (17-May-2010) [root@rhel01 ~]# mount /dev/lab_group1/lab01 /mnt [root@rhel01 ~]# df -h /mnt Filesystem Size Used Avail Use% Mounted on /dev/mapper/lab_group1-lab01 12M 1.2M 10M 11% /mnt Extending Logical Volume using new disk Initialize new disk
[root@rhel01 ~]# pvcreate /dev/sdb1 Wiping software RAID md superblock on /dev/sdb1 Physical volume /dev/sdb1 successfully created
Followers
Extend lab_group1 volume group [root@rhel01 ~]# vgextend lab_group1 /dev/sdb1 Volume group lab_group1 successfully extended [root@rhel01 ~]# vgdisplay lab_group1 Volume group VG Name lab_group1 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 3 VG Access read/write
2 of 3
http://rhel6notes.blogspot.in/search/label/LVM
resizable 0 1 0 0 2 2 56.00 MiB 4.00 MiB 14 3 / 12.00 MiB 11 / 44.00 MiB o8kB09-P20F-QLFx-UmPE-5BB5-
Members (3)
RHEV Blog
Installare RPMFORGE REPO e LSHW su RHEL e CentOS
2 weeks ago
Linux Superuser
Configure YUM server to install/update packages on remote server
5 weeks ago
Extend logical volume lab01 [root@rhel01 ~]# lvextend -L +10M /dev/lab_group1/lab01 Rounding up size to full physical extent 12.00 MiB Extending logical volume lab01 to 24.00 MiB Logical volume lab01 successfully resized [root@rhel01 ~]# df -h /mnt Filesystem Size Used Avail Use% Mounted on /dev/mapper/lab_group1-lab01 12M 1.2M 10M 11% /mnt [root@rhel01 ~]# resize2fs /dev/lab_group1/lab01 resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/lab_group1/lab01 is mounted on /mnt; on-line resizing required old desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/lab_group1/lab01 to 24576 (1k) blocks. The filesystem on /dev/lab_group1/lab01 is now 24576 blocks long. [root@rhel01 ~]# df -h /mnt Filesystem Size Used Avail Use% Mounted on /dev/mapper/lab_group1-lab01 24M 1.2M 22M 5% /mnt
No comments:
Labels: LVM
Home
Subscribe to: Posts (Atom)
Older Posts
3 of 3