You are on page 1of 6

login as: root

root@192.168.0.222's password:
Last login: Wed Jun 7 15:08:35 2017 from mcel_lfernandes.headquarter.tmm
[root@localhost ~]# fdisk -l

Disk /dev/sda: 299.4 GB, 299439751168 bytes


255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 1251 10008495 8e Linux LVM
/dev/sda3 * 1252 1276 200812+ 83 Linux
/dev/sda4 1277 36404 282165660 5 Extended
/dev/sda5 1277 36404 282165628+ 8e Linux LVM

Disk /dev/sdb: 898.3 GB, 898319253504 bytes


255 heads, 63 sectors/track, 109214 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Disk /dev/sdc: 751.6 GB, 751692677120 bytes


255 heads, 63 sectors/track, 91388 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table


[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup_ID_2185-LogVol1
3.9G 1.2G 2.5G 33% /
/dev/mapper/VolGroup_ID_2185-LogVol2
3.9G 137M 3.6G 4% /tmp
/dev/mapper/VolGroup_ID_2185-LogVol4
3.9G 784M 3.0G 21% /var
/dev/mapper/VolGroup_ID_2185-LogVol5
96G 3.7G 88G 5% /usr
/dev/sda3 190M 16M 166M 9% /boot
tmpfs 7.9G 0 7.9G 0% /dev/shm
/dev/mapper/VolGroup_ID_2185-LogVolHome
49G 26G 21G 56% /home
/dev/mapper/VolGroup_ID_2185-data1
115G 59G 50G 54% /data1
/dev/mapper/Data-data2
207G 149G 48G 76% /data2
/dev/mapper/Data-data3
207G 167G 30G 85% /data3
/dev/mapper/Data-data4
411G 361G 29G 93% /data4
[root@localhost ~]# clear
[root@localhost ~]# fdisk -l

Disk /dev/sda: 299.4 GB, 299439751168 bytes


255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 1251 10008495 8e Linux LVM
/dev/sda3 * 1252 1276 200812+ 83 Linux
/dev/sda4 1277 36404 282165660 5 Extended
/dev/sda5 1277 36404 282165628+ 8e Linux LVM

Disk /dev/sdb: 898.3 GB, 898319253504 bytes


255 heads, 63 sectors/track, 109214 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Disk /dev/sdc: 751.6 GB, 751692677120 bytes


255 heads, 63 sectors/track, 91388 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table


[root@localhost ~]# fdisk /dev/sdc
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 91388.


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): n


Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):
Value out of range.
Partition number (1-4): 1
First cylinder (1-91388, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-91388, default 91388):
Using default value 91388

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: 299.4 GB, 299439751168 bytes


255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 1251 10008495 8e Linux LVM
/dev/sda3 * 1252 1276 200812+ 83 Linux
/dev/sda4 1277 36404 282165660 5 Extended
/dev/sda5 1277 36404 282165628+ 8e Linux LVM

Disk /dev/sdb: 898.3 GB, 898319253504 bytes


255 heads, 63 sectors/track, 109214 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Disk /dev/sdc: 751.6 GB, 751692677120 bytes


255 heads, 63 sectors/track, 91388 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sdc1 1 91388 734074078+ 83 Linux
[root@localhost ~]# /sbin/mkfs -t ext3 /dev/sdc1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
91766784 inodes, 183518519 blocks
9175925 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
5601 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, 78675968,
102400000

Writing inode tables: done


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

This filesystem will be automatically checked every 28 mounts or


180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# /sbin/e2label /dev/sdc1 /data5
[root@localhost ~]# /sbin/tune2fs -l /dev/sdc1 | grep volume
Filesystem volume name: /data5
[root@localhost ~]# vi /etc/fstab
[root@localhost ~]# pwd
/root
[root@localhost ~]# cd /
[root@localhost /]# mkdir data5
[root@localhost /]# mount /dev/sdc1 /data5
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup_ID_2185-LogVol1
3.9G 1.2G 2.5G 33% /
/dev/mapper/VolGroup_ID_2185-LogVol2
3.9G 137M 3.6G 4% /tmp
/dev/mapper/VolGroup_ID_2185-LogVol4
3.9G 784M 3.0G 21% /var
/dev/mapper/VolGroup_ID_2185-LogVol5
96G 3.7G 88G 5% /usr
/dev/sda3 190M 16M 166M 9% /boot
tmpfs 7.9G 0 7.9G 0% /dev/shm
/dev/mapper/VolGroup_ID_2185-LogVolHome
49G 26G 21G 56% /home
/dev/mapper/VolGroup_ID_2185-data1
115G 59G 50G 54% /data1
/dev/mapper/Data-data2
207G 149G 48G 76% /data2
/dev/mapper/Data-data3
207G 167G 30G 85% /data3
/dev/mapper/Data-data4
411G 361G 29G 93% /data4
/dev/sdc1 690G 198M 654G 1% /data5
[root@localhost /]# ls -ld /data4
drwxrwxrwx 8 root root 4096 Mar 29 2010 /data4
[root@localhost /]# ls -ld /data3
drwxrwxrwx 5 root root 4096 Jun 9 2013 /data3
[root@localhost /]# ls -ld /data5
drwxr-xr-x 3 root root 4096 Jun 8 13:46 /data5
[root@localhost /]# chmod 775 /data5
[root@localhost /]# ls -ld /data5
drwxrwxr-x 3 root root 4096 Jun 8 13:46 /data5
[root@localhost /]# fdisk -l

Disk /dev/sda: 299.4 GB, 299439751168 bytes


255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 1251 10008495 8e Linux LVM
/dev/sda3 * 1252 1276 200812+ 83 Linux
/dev/sda4 1277 36404 282165660 5 Extended
/dev/sda5 1277 36404 282165628+ 8e Linux LVM

Disk /dev/sdb: 898.3 GB, 898319253504 bytes


255 heads, 63 sectors/track, 109214 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Disk /dev/sdc: 751.6 GB, 751692677120 bytes


255 heads, 63 sectors/track, 91388 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sdc1 1 91388 734074078+ 83 Linux
[root@localhost /]#

...................................................................................
..........

[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 109214.


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): n


Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-109214, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-109214, default 109214):
Using default value 109214

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: 299.4 GB, 299439751168 bytes


255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 6 1251 10008495 8e Linux LVM
/dev/sda3 * 1252 1276 200812+ 83 Linux
/dev/sda4 1277 36404 282165660 5 Extended
/dev/sda5 1277 36404 282165628+ 8e Linux LVM

Disk /dev/sdb: 898.3 GB, 898319253504 bytes


255 heads, 63 sectors/track, 109214 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sdb1 1 109214 877261423+ 83 Linux

Disk /dev/sdc: 751.6 GB, 751692677120 bytes


255 heads, 63 sectors/track, 91388 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sdc1 1 91388 734074078+ 83 Linux
[root@localhost /]# /sbin/mkfs -t ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
[root@localhost /]#

You might also like