Connecting to ****
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Last login: Fri Jul 6 14:41:53 2018 from 10.5.57.14
[root@localhost ~]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
32757552 31072488 0 100% /
/dev/sda1 101086 12576 83291 14% /boot
tmpfs 8218532 0 8218532 0% /dev/shm
[root@localhost ~]# cd /dev/sd
sda sda1 sda2 sdb
[root@localhost dev]# fdisk -l
Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 6527 52323705 8e Linux LVM
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[root@localhost dev]# cd
[root@localhost ~]# mkdir /mnt/sdb
[root@localhost ~]# mount /dev/sdb /mnt/sdb
mount: you must specify the filesystem type
[root@localhost ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 39162.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
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): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-39162, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-39162, default 39162):
Using default value 39162
Command (m for help): p
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 39162 314568733+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# fdisk -l
Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 6527 52323705 8e Linux LVM
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 39162 314568733+ 83 Linux
[root@localhost ~]# ls
anaconda-ks.cfg Desktop install.log install.log.syslog
[root@localhost ~]# fdisk -l
Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 6527 52323705 8e Linux LVM
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 39162 314568733+ 83 Linux
[root@localhost ~]# fdisk -l
Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 6527 52323705 8e Linux LVM
Disk /dev/sdb: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 39162 314568733+ 83 Linux
[root@localhost ~]# cat /proc/partitions
major minor #blocks name
8 0 52428800 sda
8 1 104391 sda1
8 2 52323705 sda2
8 16 314572800 sdb
8 17 314568733 sdb1
253 0 33816576 dm-0
253 1 18481152 dm-1
[root@localhost ~]# mkfs -t ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
39321600 inodes, 78642183 blocks
3932109 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2400 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, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# df -k
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
32757552 31072516 0 100% /
/dev/sda1 101086 12576 83291 14% /boot
tmpfs 8218532 0 8218532 0% /dev/shm
[root@localhost ~]# mount /dev/sdb1 /mnt/sdb
[root@localhost ~]# cd /mnt/sdb/
[root@localhost sdb]# ls
lost+found
[root@localhost sdb]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
32757552 31072520 0 100% /
/dev/sda1 101086 12576 83291 14% /boot
tmpfs 8218532 0 8218532 0% /dev/shm
/dev/sdb1 309633052 195552 293709064 1% /mnt/sdb
[root@localhost mnt]# umount /mnt/sdb
[root@localhost mnt]# lvm
lvm> pvcreate /dev/sdb
Device /dev/sdb not found (or ignored by filtering).
lvm> pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
lvm> vgextend VolGroup00 /dev/sdb1
Volume group "VolGroup00" successfully extended
lvm> lvextend -L +280G /dev/mapper/VolGroup00-LogVo100
Logical volume LogVo100 not found in volume group VolGroup00
lvm> lvextend -L +280G /dev/mapper/VolGroup00-LogVol00
Extending logical volume LogVol00 to 312.25 GB
Logical volume LogVol00 successfully resized
lvm> pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 49.90 GB / not usable 25.37 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 1596
Free PE 0
Allocated PE 1596
PV UUID c8uAbf-QFfM-9S9n-V8cC-kuly-SLo8-DDGIv5
--- Physical volume ---
PV Name /dev/sdb1
VG Name VolGroup00
PV Size 300.00 GB / not usable 28.03 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 9599
Free PE 639
Allocated PE 8960
PV UUID bIB2EL-5uZ7-PBN8-Mlym-k2pk-QkcR-4ItEfk
lvm> quit
Exiting.
[root@localhost mnt]# resize2fs /dev/mapper/VolGroup00-LogVol00;
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/VolGroup00-LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/mapper/VolGroup00-LogVol00 to 81854464 (4k) blocks.
[root@localhost mnt]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
317757552 31072548 28757552 11% /
/dev/sda1 101086 12576 83291 14% /boot
tmpfs 8218532 0 8218532 0% /dev/shm