login as: ravi
ravi@192.168.10.13's password:
Last login: Sat May 14 05:57:38 2016 from 192.168.10.2
[ravi@ravi ~]$ su -
Password:
Last login: Sat May 14 07:15:05 PDT 2016 on pts/1
[root@ravi ~]# 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: 0x000b272e
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 83 Linux
/dev/sda2 616448 4810751 2097152 82 Linux swap / Solaris
/dev/sda3 4810752 41943039 18566144 83 Linux
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: 0x99a46fec
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1050623 524288 83 Linux
/dev/sdb2 1050624 2099199 524288 83 Linux
/dev/sdb3 2099200 3147775 524288 83 Linux
/dev/sdb4 3147776 4194303 523264 5 Extended
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
[root@ravi ~]# echo "- - -" > /sys/class/
ata_device/ cpuid/ input/ pci_bus/ scsi_device/ usbmon/
ata_link/ dma/ iommu/ pcmcia_socket/ scsi_disk/ vc/
ata_port/ dmi/ leds/ powercap/ scsi_host/ vtconsole/
backlight/ drm/ mdio_bus/ power_supply/ sound/ watchdog/
bdi/ graphics/ mem/ ppdev/ spi_host/
block/ hidraw/ misc/ raw/ spi_transport/
bluetooth/ hwmon/ msr/ rfkill/ thermal/
bsg/ i2c-adapter/ net/ rtc/ tty/
[root@ravi ~]# echo "- - -" > /sys/class/s
scsi_device/ scsi_disk/ scsi_host/ sound/ spi_host/ spi_transport/
[root@ravi ~]# echo "- - -" > /sys/class/scsi_host/host
host0/ host1/ host2/
[root@ravi ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@ravi ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@ravi ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
[root@ravi ~]# 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: 0x000b272e
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 83 Linux
/dev/sda2 616448 4810751 2097152 82 Linux swap / Solaris
/dev/sda3 4810752 41943039 18566144 83 Linux
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: 0x99a46fec
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1050623 524288 83 Linux
/dev/sdb2 1050624 2099199 524288 83 Linux
/dev/sdb3 2099200 3147775 524288 83 Linux
/dev/sdb4 3147776 4194303 523264 5 Extended
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/sdf: 10.7 GB, 10737418240 bytes, 20971520 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@ravi ~]# fdisk /dev/sdf
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 0xcc95710b.
Command (m for help): p
Disk /dev/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): +2G
Partition 1 of type Linux and of size 2 GiB is set
Command (m for help): p
Disk /dev/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
/dev/sdf1 2048 4196351 2097152 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@ravi ~]# fdisk -l /dev/sdf
Disk /dev/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
/dev/sdf1 2048 4196351 2097152 83 Linux
[root@ravi ~]# partprobe /dev/sdf
[root@ravi ~]# mkfs
mkfs mkfs.cramfs mkfs.ext3 mkfs.fat mkfs.msdos mkfs.xfs
mkfs.btrfs mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.vfat
[root@ravi ~]# mkfs.ext4 /dev/sdf1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
[root@ravi ~]# blkid /dev/sdf1
/dev/sdf1: UUID="1e237efb-f3ed-4e73-b56b-a504543020b6" TYPE="ext4"
[root@ravi ~]# vi /etc/fstab
[root@ravi ~]# mkdir /opt/dir1
[root@ravi ~]# mount -a
[root@ravi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 18G 4.5G 14G 26% /
devtmpfs 482M 0 482M 0% /dev
tmpfs 490M 184K 490M 1% /dev/shm
tmpfs 490M 7.1M 483M 2% /run
tmpfs 490M 0 490M 0% /sys/fs/cgroup
/dev/sda1 297M 111M 187M 38% /boot
192.168.10.8:/opt/myshare 20G 16G 4.8G 77% /opt/share
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
[root@ravi ~]# cd /opt/dir1
[root@ravi dir1]# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
[root@ravi dir1]# mkdir /opt/dir2
[root@ravi dir1]# df -h /opt/dir2
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 18G 4.5G 14G 26% /
[root@ravi dir1]# df -h /opt/dir1 /opt/dir2
Filesystem Size Used Avail Use% Mounted on
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
/dev/sda3 18G 4.5G 14G 26% /
[root@ravi dir1]# df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
[root@ravi dir1]# mkdir /opt/oracle
[root@ravi dir1]# pwd
/opt/dir1
[root@ravi dir1]# fdisk /dev/sdf
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.
Command (m for help): p
Disk /dev/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
/dev/sdf1 2048 4196351 2097152 83 Linux
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): 1
Invalid partition type `1'
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2):
First sector (4196352-20971519, default 4196352):
Using default value 4196352
Last sector, +sectors or +size{K,M,G} (4196352-20971519, default 20971519): +2G
Partition 2 of type Linux and of size 2 GiB is set
Command (m for help): p
Disk /dev/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
/dev/sdf1 2048 4196351 2097152 83 Linux
/dev/sdf2 4196352 8390655 2097152 83 Linux
Command (m for help): t
Partition number (1,2, default 2):
Hex code (type L to list all codes): L
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
1e Hidden W95 FAT1 80 Old Minix
Hex code (type L to list all codes): 83
Changed type of partition 'Linux' to 'Linux'
Command (m for help): p
Disk /dev/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
/dev/sdf1 2048 4196351 2097152 83 Linux
/dev/sdf2 4196352 8390655 2097152 83 Linux
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@ravi dir1]# mkfs.xfs /dev/sdf2
/dev/sdf2: No such file or directory
Usage: mkfs.xfs
/* blocksize */ [-b log=n|size=num]
/* metadata */ [-m crc=0|1,finobt=0|1]
/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,
(sunit=value,swidth=value|su=num,sw=num|noalign),
sectlog=n|sectsize=num
/* force overwrite */ [-f]
/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2,
projid32bit=0|1]
/* no discard */ [-K]
/* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n
sunit=value|su=num,sectlog=n|sectsize=num,
lazy-count=0|1]
/* label */ [-L label (maximum 12 characters)]
/* naming */ [-n log=n|size=num,version=2|ci,ftype=0|1]
/* no-op info only */ [-N]
/* prototype file */ [-p fname]
/* quiet */ [-q]
/* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx]
/* sectorsize */ [-s log=n|size=num]
/* version */ [-V]
devicename
<devicename> is required unless -d name=xxx is given.
<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
<value> is xxx (512 byte blocks).
[root@ravi dir1]# partprobe /dev/sdf
[root@ravi dir1]# mkfs.xfs /dev/sdf2
meta-data=/dev/sdf2 isize=256 agcount=4, agsize=131072 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=524288, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@ravi dir1]# blkid /dev/sdf2
/dev/sdf2: UUID="0147d214-11f9-4090-929e-38cada157a03" TYPE="xfs"
[root@ravi dir1]# vi /etc/fstab
[root@ravi dir1]# mount -a
[root@ravi dir1]# df -h
^C
[root@ravi dir1]# df -h
^C
[root@ravi dir1]# ^C
[root@ravi dir1]# ^C
[root@ravi dir1]# ^C
[root@ravi dir1]# df -h /opt/oracle
Filesystem Size Used Avail Use% Mounted on
/dev/sdf2 2.0G 33M 2.0G 2% /opt/oracle
[root@ravi dir1]#
[root@ravi dir1]#
[root@ravi dir1]#
[root@ravi dir1]#
[root@ravi dir1]#
[root@ravi dir1]#
[root@ravi dir1]#
[root@ravi dir1]# pwd
/opt/dir1
[root@ravi dir1]# pwd
/opt/dir1
[root@ravi dir1]# 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: 0x000b272e
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 83 Linux
/dev/sda2 616448 4810751 2097152 82 Linux swap / Solaris
/dev/sda3 4810752 41943039 18566144 83 Linux
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: 0x99a46fec
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1050623 524288 83 Linux
/dev/sdb2 1050624 2099199 524288 83 Linux
/dev/sdb3 2099200 3147775 524288 83 Linux
/dev/sdb4 3147776 4194303 523264 5 Extended
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/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
/dev/sdf1 2048 4196351 2097152 83 Linux
/dev/sdf2 4196352 8390655 2097152 83 Linux
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 8390658 1+ 83 Linux
/dev/sdg4 8392704 12587007 2097152 5 Extended
[root@ravi dir1]# pwd
/opt/dir1
[root@ravi dir1]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 18G 4.5G 14G 26% /
devtmpfs 482M 0 482M 0% /dev
tmpfs 490M 184K 490M 1% /dev/shm
tmpfs 490M 7.2M 483M 2% /run
tmpfs 490M 0 490M 0% /sys/fs/cgroup
/dev/sda1 297M 111M 187M 38% /boot
192.168.10.8:/opt/myshare 20G 16G 4.8G 77% /opt/share
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
/dev/sdf2 2.0G 33M 2.0G 2% /opt/oracle
/dev/sdg1 2.0G 6.0M 1.8G 1% /opt/agrima
/dev/sdg2 2.0G 6.0M 1.8G 1% /opt/swostika
[root@ravi dir1]# 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: 0x000b272e
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 83 Linux
/dev/sda2 616448 4810751 2097152 82 Linux swap / Solaris
/dev/sda3 4810752 41943039 18566144 83 Linux
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: 0x99a46fec
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1050623 524288 83 Linux
/dev/sdb2 1050624 2099199 524288 83 Linux
/dev/sdb3 2099200 3147775 524288 83 Linux
/dev/sdb4 3147776 4194303 523264 5 Extended
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/sdf: 10.7 GB, 10737418240 bytes, 20971520 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: 0xcc95710b
Device Boot Start End Blocks Id System
/dev/sdf1 2048 4196351 2097152 83 Linux
/dev/sdf2 4196352 8390655 2097152 83 Linux
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 83 Linux
/dev/sdg4 12584960 16779263 2097152 5 Extended
[root@ravi dir1]# fdisk -l /dev/sdg
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 83 Linux
/dev/sdg4 12584960 16779263 2097152 5 Extended
[root@ravi dir1]# fidsk /dev/sdg
bash: fidsk: command not found...
Similar command is: 'fdisk'
[root@ravi dir1]# fdisk /dev/sdg
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.
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 83 Linux
/dev/sdg4 12584960 16779263 2097152 5 Extended
Command (m for help): d
Partition number (1-4, default 4):
Partition 4 is deleted
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 83 Linux
Command (m for help): n
Partition type:
p primary (3 primary, 0 extended, 1 free)
e extended
Select (default e):
Using default response e
Selected partition 4
First sector (12584960-20971519, default 12584960):
Using default value 12584960
Last sector, +sectors or +size{K,M,G} (12584960-20971519, default 20971519):
Using default value 20971519
Partition 4 of type Extended and of size 4 GiB is set
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 83 Linux
/dev/sdg4 12584960 20971519 4193280 5 Extended
Command (m for help): n
All primary partitions are in use
Adding logical partition 5
First sector (12587008-20971519, default 12587008):
Using default value 12587008
Last sector, +sectors or +size{K,M,G} (12587008-20971519, default 20971519): +2G
Partition 5 of type Linux and of size 2 GiB is set
Command (m for help): n
All primary partitions are in use
Adding logical partition 6
First sector (16783360-20971519, default 16783360):
Using default value 16783360
Last sector, +sectors or +size{K,M,G} (16783360-20971519, default 20971519):
Using default value 20971519
Partition 6 of type Linux and of size 2 GiB is set
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 83 Linux
/dev/sdg4 12584960 20971519 4193280 5 Extended
/dev/sdg5 12587008 16781311 2097152 83 Linux
/dev/sdg6 16783360 20971519 2094080 83 Linux
Command (m for help): t
Partition number (1-6, default 6): 3
Hex code (type L to list all codes): L
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
1e Hidden W95 FAT1 80 Old Minix
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 8e Linux LVM
/dev/sdg4 12584960 20971519 4193280 5 Extended
/dev/sdg5 12587008 16781311 2097152 83 Linux
/dev/sdg6 16783360 20971519 2094080 83 Linux
Command (m for help): t
Partition number (1-6, default 6): 5
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): t
Partition number (1-6, default 6):
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 8e Linux LVM
/dev/sdg4 12584960 20971519 4193280 5 Extended
/dev/sdg5 12587008 16781311 2097152 8e Linux LVM
/dev/sdg6 16783360 20971519 2094080 8e Linux LVM
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@ravi dir1]# partprobe /dev/sdg
[root@ravi dir1]# fdisk /dev/sdg
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.
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 8e Linux LVM
/dev/sdg4 12584960 20971519 4193280 5 Extended
/dev/sdg5 12587008 16781311 2097152 8e Linux LVM
/dev/sdg6 16783360 20971519 2094080 8e Linux LVM
Command (m for help): t
Partition number (1-6, default 6): 3
Hex code (type L to list all codes): L
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
1e Hidden W95 FAT1 80 Old Minix
Hex code (type L to list all codes): 82
Changed type of partition 'Linux LVM' to 'Linux swap / Solaris'
Command (m for help): p
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 82 Linux swap / Solaris
/dev/sdg4 12584960 20971519 4193280 5 Extended
/dev/sdg5 12587008 16781311 2097152 8e Linux LVM
/dev/sdg6 16783360 20971519 2094080 8e Linux LVM
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@ravi dir1]# partprobe /dev/sdg
[root@ravi dir1]# fdisk -l /dev/sdg
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 82 Linux swap / Solaris
/dev/sdg4 12584960 20971519 4193280 5 Extended
/dev/sdg5 12587008 16781311 2097152 8e Linux LVM
/dev/sdg6 16783360 20971519 2094080 8e Linux LVM
[root@ravi dir1]# mk
mkafmmap mkfifo mkfs.ext2 mkfs.vfat mklost+found
mkdict mkfontdir mkfs.ext3 mkfs.xfs mkmanifest
mkdir mkfontscale mkfs.ext4 mkhomedir_helper mknod
mkdosfs mkfs mkfs.fat mkhybrid mkrfc2734
mkdumprd mkfs.btrfs mkfs.minix mkinitrd mkswap
mke2fs mkfs.cramfs mkfs.msdos mkisofs mktemp
[root@ravi dir1]# mkswap /dev/sdg3
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=0359be0e-efa5-4483-8f53-05a57f2eb574
[root@ravi dir1]# vi blkid ^C
[root@ravi dir1]# blkid /dev/sdg3
/dev/sdg3: UUID="0359be0e-efa5-4483-8f53-05a57f2eb574" TYPE="swap"
[root@ravi dir1]# vi /etc/fstab
[root@ravi dir1]# vi /etc/fstab
[root@ravi dir1]# free
total used free shared buff/cache available
Mem: 1003160 761072 79028 3044 163060 75040
Swap: 2097148 157892 1939256
[root@ravi dir1]# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 2097148 157892 -1
[root@ravi dir1]# free -m
total used free shared buff/cache available
Mem: 979 743 77 2 159 73
Swap: 2047 154 1893
[root@ravi dir1]# free -g
total used free shared buff/cache available
Mem: 0 0 0 0 0 0
Swap: 1 0 1
[root@ravi dir1]# swapon -a /dev/sdg3
swapon: /dev/sdg3: swapon failed: Device or resource busy
[root@ravi dir1]# mount -a
[root@ravi dir1]# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 2097148 157832 -1
/dev/sdg3 partition 2097148 0 -2
[root@ravi dir1]# free -m
total used free shared buff/cache available
Mem: 979 744 74 2 160 71
Swap: 4095 154 3941
[root@ravi dir1]# swapoff /dev/sdg3
[root@ravi dir1]# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 2097148 157824 -1
[root@ravi dir1]# swapon /dev/sdg3
[root@ravi dir1]# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 2097148 157800 -1
/dev/sdg3 partition 2097148 0 -2
[root@ravi dir1]# fdisk -l /dev/sdg
Disk /dev/sdg: 10.7 GB, 10737418240 bytes, 20971520 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: 0xc909817c
Device Boot Start End Blocks Id System
/dev/sdg1 2048 4196351 2097152 83 Linux
/dev/sdg2 4196352 8390655 2097152 83 Linux
/dev/sdg3 8390656 12584959 2097152 82 Linux swap / Solaris
/dev/sdg4 12584960 20971519 4193280 5 Extended
/dev/sdg5 12587008 16781311 2097152 8e Linux LVM
/dev/sdg6 16783360 20971519 2094080 8e Linux LVM
[root@ravi dir1]# pvcreate /dev/sdg5 /dev/sdg6
Physical volume "/dev/sdg5" successfully created
Physical volume "/dev/sdg6" successfully created
[root@ravi dir1]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdg5 lvm2 --- 2.00g 2.00g
/dev/sdg6 lvm2 --- 2.00g 2.00g
[root@ravi dir1]# vgcreate datavg /dev/sdg5 /dev/sdg6
Volume group "datavg" successfully created
[root@ravi dir1]# vgs
VG #PV #LV #SN Attr VSize VFree
datavg 2 0 0 wz--n- 3.99g 3.99g
[root@ravi dir1]# lvcreate -L 3G -n datalv datavg
Logical volume "datalv" created.
[root@ravi dir1]# vgs
VG #PV #LV #SN Attr VSize VFree
datavg 2 1 0 wz--n- 3.99g 1016.00m
[root@ravi dir1]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
datalv datavg -wi-a----- 3.00g
[root@ravi dir1]# lvscan
ACTIVE '/dev/datavg/datalv' [3.00 GiB] inherit
[root@ravi dir1]# vgdisplay
--- Volume group ---
VG Name datavg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 3.99 GiB
PE Size 4.00 MiB
Total PE 1022
Alloc PE / Size 768 / 3.00 GiB
Free PE / Size 254 / 1016.00 MiB
VG UUID NbgPTf-ro5p-O6zC-b97G-TSso-B22A-3fHY4p
[root@ravi dir1]# lvcreate -l 150 -n 150pe datavg
Logical volume "150pe" created.
[root@ravi dir1]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
150pe datavg -wi-a----- 600.00m
datalv datavg -wi-a----- 3.00g
[root@ravi dir1]# vgdisplay
--- Volume group ---
VG Name datavg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 3.99 GiB
PE Size 4.00 MiB
Total PE 1022
Alloc PE / Size 918 / 3.59 GiB
Free PE / Size 104 / 416.00 MiB
VG UUID NbgPTf-ro5p-O6zC-b97G-TSso-B22A-3fHY4p
[root@ravi dir1]# lvscan
ACTIVE '/dev/datavg/datalv' [3.00 GiB] inherit
ACTIVE '/dev/datavg/150pe' [600.00 MiB] inherit
[root@ravi dir1]# mkfs.xfs /dev/datavg/datalv
meta-data=/dev/datavg/datalv isize=256 agcount=4, agsize=196608 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=786432, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@ravi dir1]# mkfs.ext4 /dev/datavg/150pe
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
38400 inodes, 153600 blocks
7680 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=157286400
5 block groups
32768 blocks per group, 32768 fragments per group
7680 inodes per group
Superblock backups stored on blocks:
32768, 98304
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
[root@ravi dir1]# lvscan
ACTIVE '/dev/datavg/datalv' [3.00 GiB] inherit
ACTIVE '/dev/datavg/150pe' [600.00 MiB] inherit
[root@ravi dir1]# vi /etc/fstab
[root@ravi dir1]# blkid /dev/datavg/150pe
/dev/datavg/150pe: UUID="74e93c18-1ff4-4428-99ab-d06769f70129" TYPE="ext4"
[root@ravi dir1]# vi /etc/fstab
[root@ravi dir1]# cat /etc/fstab
#
# /etc/fstab
#
# 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=fde35b35-5e2e-4a4a-b5ac-c482d939ae7e / xfs defaults 0 0
UUID=938a60d0-04fc-4b31-b485-30cdc3c76483 /boot xfs defaults 0 0
UUID=6ba14cc4-4351-46d1-9410-9d1708d1c359 swap swap defaults 0 0
UUID="1e237efb-f3ed-4e73-b56b-a504543020b6" /opt/dir1 ext4 defaults 0 0
UUID="0147d214-11f9-4090-929e-38cada157a03" /opt/oracle xfs defaults 0 0
UUID="fcb172ef-1e2e-454d-9335-e29327812875" /opt/agrima ext4 defaults 0 0
UUID="997c851c-190c-4c57-95b3-f5f9aba98e79" /opt/swostika ext4 defaults 0 0
UUID=0359be0e-efa5-4483-8f53-05a57f2eb574 swap swap defaults 0 0
#
/dev/datavg/datalv /opt/myxfs xfs defaults 0 0
UUID="74e93c18-1ff4-4428-99ab-d06769f70129" /opt/myext4 ext4 defaults 0 0
[root@ravi dir1]# mount -a
mount: mount point /opt/myxfs does not exist
mount: mount point /opt/myext4 does not exist
[root@ravi dir1]# mkdir /opt/myxfs /opt/myext4
[root@ravi dir1]# mount -a
[root@ravi dir1]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 18G 4.5G 14G 26% /
devtmpfs 482M 0 482M 0% /dev
tmpfs 490M 184K 490M 1% /dev/shm
tmpfs 490M 7.2M 483M 2% /run
tmpfs 490M 0 490M 0% /sys/fs/cgroup
/dev/sda1 297M 111M 187M 38% /boot
192.168.10.8:/opt/myshare 20G 16G 4.8G 77% /opt/share
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
/dev/sdf2 2.0G 33M 2.0G 2% /opt/oracle
/dev/sdg1 2.0G 6.0M 1.8G 1% /opt/agrima
/dev/sdg2 2.0G 6.0M 1.8G 1% /opt/swostika
/dev/mapper/datavg-datalv 3.0G 33M 3.0G 2% /opt/myxfs
/dev/mapper/datavg-150pe 575M 912K 532M 1% /opt/myext4
[root@ravi dir1]# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 2097148 162656 -1
/dev/sdg3 partition 2097148 0 -2
[root@ravi dir1]# umount /opt/myext4
[root@ravi dir1]# df -h /opt/myext4
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 18G 4.5G 14G 26% /
[root@ravi dir1]# vi /etc/fstab
[root@ravi dir1]# lvremove /dev/mapper/datavg-150pe^C
[root@ravi dir1]# lvscan
ACTIVE '/dev/datavg/datalv' [3.00 GiB] inherit
ACTIVE '/dev/datavg/150pe' [600.00 MiB] inherit
[root@ravi dir1]# lvremove /dev/datavg/150pe
Do you really want to remove active logical volume 150pe? [y/n]: y
Logical volume "150pe" successfully removed
[root@ravi dir1]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
datalv datavg -wi-ao---- 3.00g
[root@ravi dir1]# vgremove datavg ^C
[root@ravi dir1]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdg5 datavg lvm2 a-- 2.00g 0
/dev/sdg6 datavg lvm2 a-- 2.00g 1016.00m
[root@ravi dir1]# pvremove df -h
pvremove: Remove LVM label(s) from physical volume(s)
pvremove
[--commandprofile ProfileName]
[-d|--debug]
[-f[f]|--force [--force]]
[-h|-?|--help]
[-t|--test]
[-v|--verbose]
[--version]
[-y|--yes]
PhysicalVolume [PhysicalVolume...]
[root@ravi dir1]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 18G 4.7G 14G 27% /
devtmpfs 482M 0 482M 0% /dev
tmpfs 490M 184K 490M 1% /dev/shm
tmpfs 490M 7.2M 483M 2% /run
tmpfs 490M 0 490M 0% /sys/fs/cgroup
/dev/sda1 297M 111M 187M 38% /boot
192.168.10.8:/opt/myshare 20G 16G 4.8G 77% /opt/share
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
/dev/sdf2 2.0G 33M 2.0G 2% /opt/oracle
/dev/sdg1 2.0G 6.0M 1.8G 1% /opt/agrima
/dev/sdg2 2.0G 6.0M 1.8G 1% /opt/swostika
/dev/mapper/datavg-datalv 3.0G 33M 3.0G 2% /opt/myxfs
[root@ravi dir1]# vgdisplay datavg
--- Volume group ---
VG Name datavg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 3.99 GiB
PE Size 4.00 MiB
Total PE 1022
Alloc PE / Size 768 / 3.00 GiB
Free PE / Size 254 / 1016.00 MiB
VG UUID NbgPTf-ro5p-O6zC-b97G-TSso-B22A-3fHY4p
[root@ravi dir1]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 18G 4.7G 14G 27% /
devtmpfs 482M 0 482M 0% /dev
tmpfs 490M 184K 490M 1% /dev/shm
tmpfs 490M 7.2M 483M 2% /run
tmpfs 490M 0 490M 0% /sys/fs/cgroup
/dev/sda1 297M 111M 187M 38% /boot
192.168.10.8:/opt/myshare 20G 16G 4.8G 77% /opt/share
/dev/sdf1 2.0G 6.0M 1.8G 1% /opt/dir1
/dev/sdf2 2.0G 33M 2.0G 2% /opt/oracle
/dev/sdg1 2.0G 6.0M 1.8G 1% /opt/agrima
/dev/sdg2 2.0G 6.0M 1.8G 1% /opt/swostika
/dev/mapper/datavg-datalv 3.0G 33M 3.0G 2% /opt/myxfs
[root@ravi dir1]# lvextend -l +50%Free /dev/mapper/datavg-datalv
Size of logical volume datavg/datalv changed from 3.00 GiB (768 extents) to 3.50 GiB (895 extents).
Logical volume datalv successfully resized
[root@ravi dir1]# df -h /opt/myxfs
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/datavg-datalv 3.0G 33M 3.0G 2% /opt/myxfs
[root@ravi dir1]# lvscan
ACTIVE '/dev/datavg/datalv' [3.50 GiB] inherit
[root@ravi dir1]# grep datalv /etc/fstab
/dev/datavg/datalv /opt/myxfs xfs defaults 0 0
[root@ravi dir1]# xfs_growfs /opt/myxfs^C
[root@ravi dir1]# df -h /opt/myxfs
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/datavg-datalv 3.0G 33M 3.0G 2% /opt/myxfs
[root@ravi dir1]# xfs_growfs /opt/myxfs
meta-data=/dev/mapper/datavg-datalv isize=256 agcount=4, agsize=196608 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=786432, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 786432 to 916480
[root@ravi dir1]# df -h /opt/myxfs
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/datavg-datalv 3.5G 33M 3.5G 1% /opt/myxfs
[root@ravi dir1]# mkfs.
mkfs.btrfs mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.vfat
mkfs.cramfs mkfs.ext3 mkfs.fat mkfs.msdos mkfs.xfs
[root@ravi dir1]# mkfs.