Contents
-
Concatenate two disk to one large disk
- Prepare the disks
- Verify the creation of the Physical Volumes
- Create the VolumeGroup
- Verify the creation of the Volume Group
- Create the Logical Volume inside the Volume Group
- Verify the creation of the Logical Volume
- Scan for changes (this probably create /dev/pool_snd)
- Create the File System
- Create the mount-point in /etc/fstab
Concatenate two disk to one large disk
Prepare the disks
[root@moloch mnt]# pvcreate /dev/hdg1 Physical volume "/dev/hdg1" successfully created [root@moloch mnt]# pvcreate /dev/hdh1 Physical volume "/dev/hdh1" successfully created [root@moloch mnt]#
Verify the creation of the Physical Volumes
[root@moloch ~]# pvdisplay --- NEW Physical volume --- PV Name /dev/hdg1 VG Name PV Size 279.46 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID KnJHSq-tQaX-VN22-ThLJ-D7Fc-Zhsq-qUQc72 --- NEW Physical volume --- PV Name /dev/hdh1 VG Name PV Size 279.46 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID tbhxQF-JGNE-JDtP-LHUl-Qkmx-azOn-XspVS5 [root@moloch ~]# $
Create the VolumeGroup
[root@moloch ~]# vgcreate pool_snd /dev/hdg1 /dev/hdh1 Volume group "pool_snd" successfully created [root@moloch ~]#
Verify the creation of the Volume Group
[root@moloch ~]# pvdisplay --- Physical volume --- PV Name /dev/hdg1 VG Name pool_snd PV Size 279.46 GB / not usable 1.63 MB Allocatable yes PE Size (KByte) 4096 Total PE 71541 Free PE 71541 Allocated PE 0 PV UUID KnJHSq-tQaX-VN22-ThLJ-D7Fc-Zhsq-qUQc72 --- Physical volume --- PV Name /dev/hdh1 VG Name pool_snd PV Size 279.46 GB / not usable 1.63 MB Allocatable yes PE Size (KByte) 4096 Total PE 71541 Free PE 71541 Allocated PE 0 PV UUID tbhxQF-JGNE-JDtP-LHUl-Qkmx-azOn-XspVS5 [root@moloch ~]# vgdisplay --- Volume group --- VG Name pool_snd System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 558.91 GB PE Size 4.00 MB Total PE 143082 Alloc PE / Size 0 / 0 Free PE / Size 143082 / 558.91 GB VG UUID eMK8Xy-r3N4-eeOb-XZTj-A2js-7hHo-AOjbkS [root@moloch ~]#
Create the Logical Volume inside the Volume Group
[root@moloch ~]# lvcreate -L 558.91G -n snd pool_snd Rounding up size to full physical extent 558.91 GB Logical volume "snd" created [root@moloch ~]#
Note: The “-L 558.91G” you will find with vgdisplay
Verify the creation of the Logical Volume
[root@moloch ~]# lvscan ACTIVE '/dev/pool_mov/mov' [701.20 GB] normal ACTIVE '/dev/pool_snd/snd' [558.91 GB] inherit [root@moloch ~]#
Scan for changes (this probably create /dev/pool_snd)
[root@moloch ~]# vgscan Reading all physical volumes. This may take a while... Found volume group "pool_mov" using metadata type lvm1 Found volume group "pool_snd" using metadata type lvm2 [root@moloch ~]#
Create the File System
[root@moloch ~]# mke2fs -j /dev/pool_snd/snd mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 73269248 inodes, 146514944 blocks 7325747 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 4472 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 25 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@moloch ~]#
Create the mount-point in /etc/fstab
##### DATA-POOL's ################################### ## POOL_SND [ hdg1 300GB - hdh1 300GB ] 600GB /dev/pool_snd/snd /mnt/pool_snd ext3 defaults 1 0 ################################################