Popular
Latest Articles
- How to Secure your Cisco Router
- Creating CLI Views on a Cisco Router
- Configuring TACACS+ on a Cisco Router
- How to enable SDM on your router
- Build a Samba Server on Redhat / CentOS
- How to set the Time / Date and Timezone in CentOS
- How to install SSH on Solaris 10 x86
- ESX4 - How do I turn on/off a Virtual Machine from the command line ?
Linux - Creating a new Logical Volume / Partition
Sunday, 08 February 2009 20:07
UNIX / Linux - Redhat / Fedora
How do I create a new Logical Volume / Partition ?
We will be creating a new logical volume named DATA and mounting this on a new directory called DATA.
First of we will create the logical volume, then we will create a file system on the Logical Volume. Once complete we will create a new directory called DATA.
lvcreate -L 145G -n DATA vg0
mkfs.ext3 /dev/Vg0/DATA
mkdir /DATA
/dev/vg0/DATA /DATA ext3 defaults 1 2
We can then mount /DATA,
mount -a
You can now check to make sure you changes have been successful.[root@localhost ~]# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg0-root 3.9G 588M 3.2G 16% /
/dev/mapper/vg0-var 15G 278M 14G 2% /var
/dev/mapper/vg0-usr 9.7G 623M 8.6G 7% /usr
/dev/mapper/vg0-home 1.8G 146M 1.6G 9% /home
/dev/hda1 99M 18M 77M 19% /boot
tmpfs 502M 0 502M 0% /dev/shm
/dev/mapper/vg0-DATA 143G 188M 136G 1% /DATA
Please Note : You system will pre-allocate 10% of the total size of your new Logical Volume.