Skip to content

            Lost ?  |  Need an account:
 
Home >> Knowledge Base >> Operating Systems >> Linux >> LVM Configuration - Formatting a File System
LVM Configuration - Formatting a File System PDF Print E-mail
(11 votes, average 4.27 out of 5)
Written by Tom Hirt   
Wednesday, 13 May 2009 10:24
Article Index
LVM Configuration
Physical Volume Creation
Volume Group Creation
Logical Volume Creation
Formatting a File System
Mounting a File System
All Pages

 

Formatting a File System


We are now ready to format the file system.  Linux offers many different file systems, some distributions of Linux/Unix will tend to recommend EXT3 while others might recommend XFS or ReiserFS.  There is really no wrong or right answer here, different file systems will have features and advantages/disadvantages.  The concept to understand here is that you must format the logical volume.

We are going to format our new LV's of type EXT3 with journaling enabled

  1. Format LV TCPDumpLV

    [root@Linux01 ~]# mke2fs -j /dev/TCPDumpVolGRP/TCPDumpLV
    mke2fs 1.39 (29-May-2006)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    409600 inodes, 819200 blocks
    40960 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=838860800
    25 block groups
    32768 blocks per group, 32768 fragments per group
    16384 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912

    Writing inode tables: done                           
    Creating journal (16384 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 22 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    [root@Linux01 ~]#

  2. Format LV 4GLV

    [root@Linux01 ~]# mke2fs -j /dev/TCPDumpVolGRP/4GLV
    mke2fs 1.39 (29-May-2006)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    524288 inodes, 1048576 blocks
    52428 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=1073741824
    32 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

    Writing inode tables: done                           
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 20 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    [root@Linux01 ~]#




Comments
Add New Search
Kartik Suryanarayanan  - Nice LVM artcile. |11/07/2009 04:56:00
HI,

It was a nicely written LVM configuration article. For me it was the part , where it was show how to change the PE size used for a VG.

Thanks a lot :-)

--Kartik S
thirt |15/07/2009 18:00:58
Hi Kartik,

Thanks for the feedback! Keep it coming. If you have any requests, post them in the forums area and we’ll get to them when we get sometime.

Regards,
Tom
Wojtek J |17/09/2009 08:08:30
Hello,
Same remark as my predecessor. The helpful info was PE size switch "-s".
However, the dark colour of the backgrouung is somehow painful ;-)
Wojtek
Anonymous |27/03/2011 23:20:58
plz give information about volume group and physical volumes
Ajay Sharma  - LINUX tutorial |27/03/2011 23:23:37
plz revert me through my mail
MD Shamim Akhtar  - Disk /dev/sdb doesn't contain a valid partition t |29/03/2011 01:39:35
Dear Sir,

I want to know what does it mean by this line, please make me understand.

"Disk /dev/sdb doesn't contain a valid partition table"

SAS |15/09/2011 01:47:31
It simply means that devices /dev/sdb, /dev/sdc and /dev/sdd don't have any partitions on them _yet_.
Partitions are added to the disks in steps 2 and forward.
Anonymous |02/05/2011 10:48:33
hi

Its good 8)
Anonymous |07/03/2012 01:02:11
nice but the main part is missing
nelson |31/03/2012 03:18:43
hi, love it, it rally helped me well done well done and well done man.
hi I'm chanthorn |17/05/2012 20:43:07
U can add more information in this configure .
But this configure can accept ok.
thanks,
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:D:):(:0:shock::confused:8):lol::x:P:oops::cry::evil::twisted::roll::wink::!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

Last Updated on Tuesday, 02 June 2009 10:15
 

Forum Activity

Author: Cogterrit
May.18.12
Author: Cogterrit
May.18.12
Author: Cogterrit
May.18.12
Author: Cogterrit
May.17.12

Online Stats

Guests Online: 81
Members Online: 1