Wednesday, December 17, 2014

Creating apps filesystem

[root@localhost RHEL_6.5 x86_64 Disc 1]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000589e1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          39      307200   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              39         549     4096000   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             549        6528    48024576   83  Linux

Disk /dev/sdb: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@localhost RHEL_6.5 x86_64 Disc 1]# cfdisk

[root@localhost RHEL_6.5 x86_64 Disc 1]# cfdisk /dev/sdb
Disk has been changed.

WARNING: If you have created or modified any
DOS 6.x partitions, please see the cfdisk manual
page for additional information.

[root@localhost RHEL_6.5 x86_64 Disc 1]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000589e1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          39      307200   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              39         549     4096000   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             549        6528    48024576   83  Linux

Disk /dev/sdb: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        6528    52428768+  83  Linux
[root@localhost RHEL_6.5 x86_64 Disc 1]# pvcreate /dev/sdb1
  Physical volume "/dev/sdb1" successfully created
[root@localhost RHEL_6.5 x86_64 Disc 1]# vgcreate apps_vg /dev/sdb1
  Volume group "apps_vg" successfully created
[root@localhost RHEL_6.5 x86_64 Disc 1]# lvcreate -L 30G -n apps01 apps_vg
  Logical volume "apps01" created
[root@localhost RHEL_6.5 x86_64 Disc 1]# mkfs.ext3 -m 0 /dev/apps_vg/apps01
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1966080 inodes, 7864320 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
240 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000

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

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@localhost RHEL_6.5 x86_64 Disc 1]# vi /etc/fstab
[root@localhost RHEL_6.5 x86_64 Disc 1]# mkdir /apps
[root@localhost RHEL_6.5 x86_64 Disc 1]# mount -a
[root@localhost RHEL_6.5 x86_64 Disc 1]# df -k
Filesystem                 1K-blocks    Used Available Use% Mounted on
/dev/sda3                   47269816 2593300  42275288   6% /
tmpfs                         957244     224    957020   1% /dev/shm
/dev/sda1                     297485   39142    242983  14% /boot
/dev/sr0                       51126   51126         0 100% /media/CDROM
/dev/sr1                     3762278 3762278         0 100% /media/RHEL_6.5 x86_64 Disc 1
/dev/mapper/apps_vg-apps01  30963708  176196  30787512   1% /apps
[root@localhost RHEL_6.5 x86_64 Disc 1]#

1 comment:

  1. #
    # /etc/fstab
    # Created by anaconda on Thu Dec 18 01:33:49 2014
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    UUID=d9b9a980-07d1-443a-85dc-c608a1652104 / ext4 defaults 1 1
    UUID=89d55f1a-b23d-4d14-bcf6-44d77740f265 /boot ext4 defaults 1 2
    UUID=d07b0781-3889-4bca-91de-2b08cff31e6b swap swap defaults 0 0
    tmpfs /dev/shm tmpfs defaults 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    sysfs /sys sysfs defaults 0 0
    proc /proc proc defaults 0 0
    /dev/mapper/apps_vg-apps01 /apps ext3 defaults 1 1

    ReplyDelete