Saturday, April 23, 2016

LogFile - 04232016


Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdc: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdd: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sde: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-root: 13.0 GB, 13002342400 bytes, 25395200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 4001 MB, 4001366016 bytes, 7815168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@sudhir log]# clear
[root@sudhir log]# fdisk -l | more

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009660b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      976895      487424   83  Linux
/dev/sda2          976896    34203647    16613376   8e  Linux LVM

Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdc: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdd: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sde: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-root: 13.0 GB, 13002342400 bytes, 25395200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 4001 MB, 4001366016 bytes, 7815168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@sudhir log]# echo "- - -" >/sys/
block/      bus/        class/      dev/        devices/    firmware/   fs/         hypervisor/ kernel/     module/    

power/
[root@sudhir log]# echo "- - -" >/sys/class/
ata_device/    block/         dmi/           input/         misc/          powercap/      rtc/           sound/         vc/
ata_link/      bluetooth/     graphics/      iommu/         msr/           power_supply/  scsi_device/   thermal/      

vtconsole/
ata_port/      bsg/           hidraw/        leds/          net/           ppdev/         scsi_disk/     tpm/          

watchdog/
backlight/     cpuid/         hwmon/         mdio_bus/      pci_bus/       raw/           scsi_generic/  tty/
bdi/           dma/           i2c-adapter/   mem/           pcmcia_socket/ rfkill/        scsi_host/     usbmon/
[root@sudhir log]# echo "- - -" >/sys/class/scsi_host/host
host0/ host1/ host2/ host3/ host4/ host5/ host6/
[root@sudhir log]# echo "- - -" >/sys/class/scsi_host/host0/scan
[root@sudhir log]# echo "- - -" >/sys/class/scsi_host/host1/scan
[root@sudhir log]# echo "- - -" >/sys/class/scsi_host/host[0-6]/scan
-bash: /sys/class/scsi_host/host[0-6]/scan: ambiguous redirect
[root@sudhir log]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009660b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      976895      487424   83  Linux
/dev/sda2          976896    34203647    16613376   8e  Linux LVM

Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdc: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdd: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sde: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-root: 13.0 GB, 13002342400 bytes, 25395200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 4001 MB, 4001366016 bytes, 7815168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@sudhir log]# man fdisk
[root@sudhir log]# fdisk -cu /dev/sdb
Usage:
 fdisk [options] <disk>    change partition table
 fdisk [options] -l <disk> list partition table(s)
 fdisk -s <partition>      give partition size(s) in blocks

Options:
 -b <size>             sector size (512, 1024, 2048 or 4096)
 -c[=<mode>]           compatible mode: 'dos' or 'nondos' (default)
 -h                    print this help text
 -u[=<unit>]           display units: 'cylinders' or 'sectors' (default)
 -v                    print program version
 -C <number>           specify the number of cylinders
 -H <number>           specify the number of heads
 -S <number>           specify the number of sectors per track

[root@sudhir log]# fdisk -c /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x165fd3f0.

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-4194303, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-4194303, default 4194303): +500M
Partition 1 of type Linux and of size 500 MiB is set

Command (m for help): p

Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x165fd3f0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1026047      512000   83  Linux

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p):
Using default response p
Partition number (2-4, default 2):
First sector (1026048-4194303, default 1026048): +500M
Value out of range.
First sector (1026048-4194303, default 1026048):
Using default value 1026048
Last sector, +sectors or +size{K,M,G} (1026048-4194303, default 4194303): +500M
Partition 2 of type Linux and of size 500 MiB is set

Command (m for help): p

Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x165fd3f0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1026047      512000   83  Linux
/dev/sdb2         1026048     2050047      512000   83  Linux

Command (m for help): n
Partition type:
   p   primary (2 primary, 0 extended, 2 free)
   e   extended
Select (default p):
Using default response p
Partition number (3,4, default 3):
First sector (2050048-4194303, default 2050048):
Using default value 2050048
Last sector, +sectors or +size{K,M,G} (2050048-4194303, default 4194303): +500M
Partition 3 of type Linux and of size 500 MiB is set

Command (m for help): p

Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x165fd3f0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1026047      512000   83  Linux
/dev/sdb2         1026048     2050047      512000   83  Linux
/dev/sdb3         2050048     3074047      512000   83  Linux

Command (m for help): n
Partition type:
   p   primary (3 primary, 0 extended, 1 free)
   e   extended
Select (default e): p
Selected partition 4
First sector (3074048-4194303, default 3074048):
Using default value 3074048
Last sector, +sectors or +size{K,M,G} (3074048-4194303, default 4194303):
Using default value 4194303
Partition 4 of type Linux and of size 547 MiB is set

Command (m for help): p

Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x165fd3f0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1026047      512000   83  Linux
/dev/sdb2         1026048     2050047      512000   83  Linux
/dev/sdb3         2050048     3074047      512000   83  Linux
/dev/sdb4         3074048     4194303      560128   83  Linux

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@sudhir log]# fdisk -l /dev/sdb

Disk /dev/sdb: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x165fd3f0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     1026047      512000   83  Linux
/dev/sdb2         1026048     2050047      512000   83  Linux
/dev/sdb3         2050048     3074047      512000   83  Linux
/dev/sdb4         3074048     4194303      560128   83  Linux
[root@sudhir log]# mkf
mkfifo       mkfontscale  mkfs.btrfs   mkfs.ext2    mkfs.ext4    mkfs.minix   mkfs.vfat
mkfontdir    mkfs         mkfs.cramfs  mkfs.ext3    mkfs.fat     mkfs.msdos   mkfs.xfs
[root@sudhir log]# mkfs.ext4 /dev/sdb1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
128016 inodes, 512000 blocks
25600 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=34078720
63 block groups
8192 blocks per group, 8192 fragments per group
2032 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

[root@sudhir log]# blkid /dev/sdb1
/dev/sdb1: UUID="7402cab0-0779-4a86-a296-03bc11f516ec" TYPE="ext4"
[root@sudhir log]# mkfs.ext4 /dev/sdb2
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
128016 inodes, 512000 blocks
25600 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=34078720
63 block groups
8192 blocks per group, 8192 fragments per group
2032 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

[root@sudhir log]# mkfs.xfs /dev/sdb3
meta-data=/dev/sdb3              isize=256    agcount=4, agsize=32000 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=128000, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=853, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@sudhir log]# blkid /dev/sdb1
/dev/sdb1: UUID="7402cab0-0779-4a86-a296-03bc11f516ec" TYPE="ext4"
[root@sudhir log]# blkid /dev/sdb2
/dev/sdb2: UUID="a321821b-8679-482f-99bd-95065ab0f3b3" TYPE="ext4"
[root@sudhir log]# blkid /dev/sdb3
/dev/sdb3: UUID="e26bb181-1823-42b8-a860-f08bf2e93fc7" TYPE="xfs"
[root@sudhir log]# pwd
/var/log
[root@sudhir log]# mkdir /dir1 /dir2 /dir3
[root@sudhir log]# mv /dir3 /opt
[root@sudhir log]# pwd
/var/log
[root@sudhir log]# mount /dev/sdb1 /dir1
[root@sudhir log]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb1                477M  2.3M  445M   1% /dir1
[root@sudhir log]# cd /dir1
[root@sudhir dir1]# ls
lost+found
[root@sudhir dir1]# pwd
/dir1
[root@sudhir dir1]# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1       477M  2.3M  445M   1% /dir1
[root@sudhir dir1]# cd ../dir2
[root@sudhir dir2]# ls
[root@sudhir dir2]# ls -l
total 0
[root@sudhir dir2]# df -h .
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
[root@sudhir dir2]# pwd
/dir2
[root@sudhir dir2]# cd /dir1
[root@sudhir dir1]# pwd
/dir1
[root@sudhir dir1]# touch this is a file system
[root@sudhir dir1]# ls -l
total 17
-rw-r--r--. 1 root root     0 Apr 23 10:26 a
-rw-r--r--. 1 root root     0 Apr 23 10:26 file
-rw-r--r--. 1 root root     0 Apr 23 10:26 is
drwx------. 2 root root 12288 Apr 23 10:19 lost+found
-rw-r--r--. 1 root root     0 Apr 23 10:26 system
-rw-r--r--. 1 root root     0 Apr 23 10:26 this
[root@sudhir dir1]# pwd
/dir1
[root@sudhir dir1]# cd ..
[root@sudhir /]# df -h /dir1
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1       477M  2.3M  445M   1% /dir1
[root@sudhir /]# umount /dir1
[root@sudhir /]# df -h /dir1
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
[root@sudhir /]# cd dir1
[root@sudhir dir1]# ls -l
total 0
[root@sudhir dir1]# mount /dev/sdb1 /dir2
[root@sudhir dir1]# cd dir2
-bash: cd: dir2: No such file or directory
[root@sudhir dir1]# cd /dir2
[root@sudhir dir2]# ls
a  file  is  lost+found  system  this
[root@sudhir dir2]# ls -l
total 17
-rw-r--r--. 1 root root     0 Apr 23 10:26 a
-rw-r--r--. 1 root root     0 Apr 23 10:26 file
-rw-r--r--. 1 root root     0 Apr 23 10:26 is
drwx------. 2 root root 12288 Apr 23 10:19 lost+found
-rw-r--r--. 1 root root     0 Apr 23 10:26 system
-rw-r--r--. 1 root root     0 Apr 23 10:26 this
[root@sudhir dir2]# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1       477M  2.3M  445M   1% /dir2
[root@sudhir dir2]# cd /dir1
[root@sudhir dir1]# ls
[root@sudhir dir1]# ls -l /etc/fstab
-rw-r--r--. 1 root root 465 Feb  3 19:24 /etc/fstab
[root@sudhir dir1]# vi /etc/fstab
[root@sudhir dir1]# cp -p /etc/fstab /etc/fstab.04232016
[root@sudhir dir1]# vi /etc/fstab
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb1                477M  2.3M  445M   1% /dir2
[root@sudhir dir1]# ls -ld /opt/dir3
drwxr-xr-x. 2 root root 6 Apr 23 10:22 /opt/dir3
[root@sudhir dir1]# ls -l /opt/dir3
total 0
[root@sudhir dir1]# mount -a
[root@sudhir dir1]# echo $?
0
[root@sudhir dir1]# ls -l /opt/dir3
total 12
drwx------. 2 root root 12288 Apr 23 10:20 lost+found
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb1                477M  2.3M  445M   1% /dir2
/dev/sdb2                477M  2.3M  445M   1% /opt/dir3
[root@sudhir dir1]# mount /dev/sdb1 /dir1
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb1                477M  2.3M  445M   1% /dir2
/dev/sdb2                477M  2.3M  445M   1% /opt/dir3
[root@sudhir dir1]# cd /dir1
[root@sudhir dir1]# ls
a  file  is  lost+found  system  this
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb1                477M  2.3M  445M   1% /dir2
/dev/sdb2                477M  2.3M  445M   1% /opt/dir3
[root@sudhir dir1]# umount /dir2
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb2                477M  2.3M  445M   1% /opt/dir3
/dev/sdb1                477M  2.3M  445M   1% /dir1
[root@sudhir dir1]# vi /etc/fstab
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb2                477M  2.3M  445M   1% /opt/dir3
/dev/sdb1                477M  2.3M  445M   1% /dir1
[root@sudhir dir1]# mount -a
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb2                477M  2.3M  445M   1% /dir2
/dev/sdb1                477M  2.3M  445M   1% /dir1
[root@sudhir dir1]# vi /etc/fstab
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb2                477M  2.3M  445M   1% /dir2
/dev/sdb1                477M  2.3M  445M   1% /dir1
[root@sudhir dir1]# mount -a
[root@sudhir dir1]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   13G  6.5G  5.7G  54% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    921M  100K  920M   1% /dev/shm
tmpfs                    921M  8.8M  912M   1% /run
tmpfs                    921M     0  921M   0% /sys/fs/cgroup
/dev/sda1                473M  156M  318M  33% /boot
tmpfs                    185M   12K  184M   1% /run/user/1000
tmpfs                    185M     0  185M   0% /run/user/0
/dev/sdb3                497M   26M  472M   6% /opt/dir3
/dev/sdb1                477M  2.3M  445M   1% /dir1
/dev/sdb2                477M  2.3M  445M   1% /dir2
[root@sudhir dir1]# reboot

No comments:

Post a Comment