[root@hsinterface2 ~]# pvcreate /dev/sda3
Device /dev/sda3 not found (or ignored by
filtering).
[root@hsinterface2 ~]# fdisk /dev/sda
WARNING: DOS-compatible mode is deprecated. It's strongly
recommended to
switch off the mode (command
'c') and change display units to
sectors (command 'u').
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
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): p
Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 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: 0x000c1823
Device Boot
Start
End Blocks Id
System
/dev/sda1 * 1 64
512000
83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 25326 202910720 8e Linux LVM
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (25326-65270, default
25326):
Using default value 25326
Last cylinder, +cylinders or +size{K,M,G} (25326-65270,
default 65270):
Using default value 65270
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16:
Device or resource busy.
The kernel still uses the old table. The new table will be
used at
the next reboot or after you run partprobe(8) or
kpartx(8)
Syncing disks.
[root@hsinterface2 ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition
table on /dev/sda (Device or resource busy). As a
result, it may not reflect all of your changes until after
reboot.
[root@hsinterface2 ~]# fdisk -l
Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 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: 0x000c1823
Device Boot
Start
End Blocks Id
System
/dev/sda1 * 1 64
512000
83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 25326 202910720 8e Linux LVM
/dev/sda3 25326
65270
320857531 83
Linux
Disk /dev/mapper/VolGroup-lv_root: 31.5 GB, 31457280000
bytes
255 heads, 63 sectors/track, 3824 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
Disk /dev/mapper/VolGroup-lv_swap: 8388 MB, 8388608000
bytes
255 heads, 63 sectors/track, 1019 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
Disk /dev/mapper/VolGroup-lv_opt: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_var: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_home: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_tmp: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_usr: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_app: 115.5 GB, 115502743552
bytes
255 heads, 63 sectors/track, 14042 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@hsinterface2 ~]# pvcreate /dev/sda3
Device /dev/sda3 not found (or ignored by
filtering).
[root@hsinterface2 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu May 25 11:33:36 2017
#
# 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
#
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=ce69015a-8d27-4d4e-83cf-e8a91bb41f61 /boot
ext4
defaults 1 2
/dev/mapper/VolGroup-lv_home /home ext4 defaults 1 2
/dev/mapper/VolGroup-lv_opt /opt ext4
defaults 1 2
/dev/mapper/VolGroup-lv_tmp /tmp ext4
defaults 1 2
/dev/mapper/VolGroup-lv_usr /usr ext4
defaults 1 2
/dev/mapper/VolGroup-lv_var /var ext4
defaults 1 2
/dev/mapper/VolGroup-lv_usr /usr ext4
defaults 1 2
/dev/mapper/VolGroup-lv_app /app ext4
defaults 1 2
/dev/mapper/VolGroup-lv_swap 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
[root@hsinterface2 ~]# reboot
Broadcast message from root@hsinterface2
(/dev/pts/0) at 15:35 ...
The system is going down for reboot NOW!
[root@hsinterface2 ~]# Connection to 10.62.233.151 closed by
remote host.
Connection to 10.62.233.151 closed.
[root@bea02 ~]# ssh 10.62.233.15
[root@bea02 ~]# ssh 10.62.233.150
root@10.62.233.150's password:
Last login: Mon Nov 6 15:35:26 2017 from
172.18.20.82
Authorized users only.All activities will be monitored and
reported.
[root@hsinterface1 ~]# fdisk -l
Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 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: 0x000c1823
Device Boot
Start
End Blocks Id
System
/dev/sda1 * 1 64
512000
83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 25326 202910720 8e Linux LVM
/dev/sda3 25326
65270
320857531 83
Linux
Disk /dev/mapper/VolGroup-lv_root: 31.5 GB, 31457280000
bytes
255 heads, 63 sectors/track, 3824 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
Disk /dev/mapper/VolGroup-lv_swap: 8388 MB, 8388608000
bytes
255 heads, 63 sectors/track, 1019 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
Disk /dev/mapper/VolGroup-lv_opt: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_var: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_home: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_tmp: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_usr: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_app: 115.5 GB, 115502743552
bytes
255 heads, 63 sectors/track, 14042 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@hsinterface1 ~]# vgs
VG #PV #LV #SN Attr VSize
VFree
VolGroup 1
8 0 wz--n- 193.51g
0
[root@hsinterface1 ~]# vgextend VolGroup /dev/sda3
Physical volume "/dev/sda3" successfully
created
Volume group "VolGroup" successfully
extended
[root@hsinterface1 ~]# vgs
VG #PV #LV #SN Attr VSize
VFree
VolGroup 2
8 0 wz--n- 499.50g
305.99g
[root@hsinterface1 ~]# fdisk -l|more
Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 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: 0x000c1823
Device Boot
Start
End Blocks Id
System
/dev/sda1 * 1 64
512000
83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 25326 202910720 8e Linux LVM
/dev/sda3 25326
65270
320857531 83
Linux
Disk /dev/mapper/VolGroup-lv_root: 31.5 GB, 31457280000
bytes
255 heads, 63 sectors/track, 3824 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
Disk /dev/mapper/VolGroup-lv_swap: 8388 MB, 8388608000
bytes
255 heads, 63 sectors/track, 1019 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
Disk /dev/mapper/VolGroup-lv_opt: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 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
Disk /dev/mapper/VolGroup-lv_var: 10.5 GB, 10485760000
bytes
255 heads, 63 sectors/track, 1274 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[root@hsinterface1 ~]# pvremove /dev/sda3
WARNING: PV /dev/sda3 belongs to Volume
Group VolGroup (consider using vgreduce).
/dev/sda3: physical volume label not
removed.
(If you are certain you need pvremove, then
confirm by using --force twice.)
[root@hsinterface1 ~]# pvcreate /dev/sda3
Can't initialize physical volume
"/dev/sda3" of volume group "VolGroup" without -ff.
[root@hsinterface1 ~]# vgs
VG #PV #LV #SN Attr VSize
VFree
VolGroup 2
8 0 wz--n- 499.50g
305.99g
[root@hsinterface1 ~]# vgdisplay|grep PE
PE Size 4.00
MiB
Total PE 127872
Alloc PE / Size 49538 / 193.51 GiB
Free PE / Size
78334 /
305.99 GiB
[root@hsinterface1 ~]# lvextend -l +78334
/dev/VolGroup/lv_app
Size of logical volume VolGroup/lv_app
changed from 107.57 GiB (27538 extents) to 413.56 GiB (105872
extents).
Logical volume lv_app successfully
resized.
[root@hsinterface1 ~]# resize2fs /dev/VolGroup/lv_app
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/VolGroup/lv_app is mounted on /app; on-line
resizing required
old desc_blocks = 7, new_desc_blocks = 26
Performing an on-line resize of /dev/VolGroup/lv_app to
108412928 (4k) blocks.
The filesystem on /dev/VolGroup/lv_app is now 108412928 blocks
long.
[root@hsinterface1 ~]# df -h
Filesystem Size Used Avail Use% Mounted
on
/dev/mapper/VolGroup-lv_root
29G
340M 27G 2%
/
tmpfs 7.9G 72K
7.9G 1% /dev/shm
/dev/sda1 477M 41M
411M 10% /boot
/dev/mapper/VolGroup-lv_home
9.5G 23M
9.0G 1% /home
/dev/mapper/VolGroup-lv_opt
9.5G 22M
9.0G 1% /opt
/dev/mapper/VolGroup-lv_tmp
9.5G 80M
9.0G 1% /tmp
/dev/mapper/VolGroup-lv_usr
9.5G 2.8G
6.3G 31% /usr
/dev/mapper/VolGroup-lv_var
9.5G 213M
8.8G 3% /var
/dev/mapper/VolGroup-lv_app
407G 9.9G
377G 3% /app
[root@hsinterface1 ~]# pwd
/root
[root@hsinterface1 ~]# cd /
[root@hsinterface1 /]# mkdir /beahome
[root@hsinterface1 /]# df -h
Filesystem Size Used Avail Use% Mounted
on
/dev/mapper/VolGroup-lv_root
29G
340M 27G 2%
/
tmpfs 7.9G 72K
7.9G 1% /dev/shm
/dev/sda1 477M 41M
411M 10% /boot
/dev/mapper/VolGroup-lv_home
9.5G 23M
9.0G 1% /home
/dev/mapper/VolGroup-lv_opt
9.5G 22M
9.0G 1% /opt
/dev/mapper/VolGroup-lv_tmp
9.5G 80M
9.0G 1% /tmp
/dev/mapper/VolGroup-lv_usr
9.5G 2.8G
6.3G 31% /usr
/dev/mapper/VolGroup-lv_var
9.5G 213M
8.8G 3% /var
/dev/mapper/VolGroup-lv_app
407G 9.9G
377G 3% /app
[root@hsinterface1 /]# umount /app
[root@hsinterface1 /]# mount /dev/mapper/VolGroup-lv_app
/beahome
[root@hsinterface1 /]# df -h
Filesystem Size Used Avail Use% Mounted
on
/dev/mapper/VolGroup-lv_root
29G
340M 27G 2%
/
tmpfs 7.9G 72K
7.9G 1% /dev/shm
/dev/sda1 477M 41M
411M 10% /boot
/dev/mapper/VolGroup-lv_home
9.5G 23M
9.0G 1% /home
/dev/mapper/VolGroup-lv_opt
9.5G 22M
9.0G 1% /opt
/dev/mapper/VolGroup-lv_tmp
9.5G 80M
9.0G 1% /tmp
/dev/mapper/VolGroup-lv_usr
9.5G 2.8G
6.3G 31% /usr
/dev/mapper/VolGroup-lv_var
9.5G 213M
8.8G 3% /var
/dev/mapper/VolGroup-lv_app
407G 9.9G
377G 3% /beahome
[root@hsinterface1 /]# vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu May 25 11:33:36 2017
#
# 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
#
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=ce69015a-8d27-4d4e-83cf-e8a91bb41f61 /boot
ext4
defaults 1 2
/dev/mapper/VolGroup-lv_home /home ext4 defaults 1 2
/dev/mapper/VolGroup-lv_opt /opt ext4
defaults 1 2
/dev/mapper/VolGroup-lv_tmp /tmp ext4
defaults 1 2
/dev/mapper/VolGroup-lv_usr /usr ext4
defaults 1 2
/dev/mapper/VolGroup-lv_var /var ext4
defaults 1 2
/dev/mapper/VolGroup-lv_usr /usr ext4
defaults 1 2
/dev/mapper/VolGroup-lv_app /beahome ext4
defaults 1 2
/dev/mapper/VolGroup-lv_swap 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
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/fstab" 22L, 1344C written
[root@hsinterface1 /]# df -h
Filesystem Size Used Avail Use% Mounted
on
/dev/mapper/VolGroup-lv_root
29G
340M 27G 2%
/
tmpfs 7.9G 72K
7.9G 1% /dev/shm
/dev/sda1 477M 41M
411M 10% /boot
/dev/mapper/VolGroup-lv_home
9.5G 23M
9.0G 1% /home
/dev/mapper/VolGroup-lv_opt
9.5G 22M
9.0G 1% /opt
/dev/mapper/VolGroup-lv_tmp
9.5G 80M
9.0G 1% /tmp
/dev/mapper/VolGroup-lv_usr
9.5G 2.8G
6.3G 31% /usr
/dev/mapper/VolGroup-lv_var
9.5G 213M
8.8G 3% /var
/dev/mapper/VolGroup-lv_app
407G 9.9G
377G 3% /beahome
[root@hsinterface1 /]# cd /beahome
[root@hsinterface1 beahome]# ls
axis-1_4.tar jdk1.6.0_37.tar
oracle weblogic10 weblogic8.1.tar
jdk1.6.0_37 lost+found oraInventory
weblogic8.1
wls1036_generic.jar
[root@hsinterface1 beahome]# mkdir attachments
[root@hsinterface1 beahome]# pwd
/beahome
[root@hsinterface1 beahome]# ls
attachments jdk1.6.0_37 lost+found
oraInventory weblogic8.1
wls1036_generic.jar
axis-1_4.tar jdk1.6.0_37.tar
oracle weblogic10 weblogic8.1.tar
[root@hsinterface1 beahome]# pwd