{"id":1354,"date":"2012-09-06T11:13:23","date_gmt":"2012-09-06T03:13:23","guid":{"rendered":"http:\/\/rmohan.com\/?p=1354"},"modified":"2012-09-06T11:13:23","modified_gmt":"2012-09-06T03:13:23","slug":"converting-a-non-root-filesystem-to-ext4","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=1354","title":{"rendered":"Converting a non-root filesystem to ext4"},"content":{"rendered":"<p>Before the Addition of new disk to the Linux Server :<br \/> =============================================================================<br \/> ======&gt;&gt; The total number of disks on the system can be seen through fdisk -l<\/p>\n<p> [root@servername ~]# fdisk -l | more<\/p>\n<p> Disk \/dev\/sda: 21.4 GB, 21474836480 bytes<br \/> 255 heads, 63 sectors\/track, 2610 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sda1 \u00a0 * \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a029 \u00a0 \u00a0 \u00a0232911 \u00a0 83 \u00a0Linux<br \/> \/dev\/sda2 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a030 \u00a0 \u00a0 \u00a0 \u00a02610 \u00a0 \u00a020731882+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdb: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdb1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdc: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdc1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdd: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdd1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sde: 107.3 GB, 107374182400 bytes<br \/> 255 heads, 63 sectors\/track, 13054 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sde1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 13054 \u00a0 104856223+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdf: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdf1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdg: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdg1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a083 \u00a0Linux<\/p>\n<p> Disk \/dev\/sdh: 32.2 GB, 32212254720 bytes<br \/> 255 heads, 63 sectors\/track, 3916 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdh1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 \u00a03916 \u00a0 \u00a031455238+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdi: 644.2 GB, 644245094400 bytes<br \/> 255 heads, 63 sectors\/track, 78325 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdi1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 78325 \u00a0 629145562 \u00a0 8e \u00a0Linux LVM<\/p>\n<p> Filesystem sizes on the server before the addition :<br \/> =====================================================<\/p>\n<p> [root@servername ~]# df -h<br \/> Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/> \/dev\/mapper\/vg0-root \u00a0992M \u00a0483M \u00a0458M \u00a052% \/<br \/> \/dev\/mapper\/vg0-var \u00a0 2.0G \u00a0744M \u00a01.2G \u00a040% \/var<br \/> \/dev\/mapper\/vg0-tmp \u00a0 992M \u00a0130M \u00a0812M \u00a014% \/tmp<br \/> \/dev\/mapper\/vg0-usr \u00a0 7.8G \u00a01.3G \u00a06.2G \u00a017% \/usr<br \/> \/dev\/mapper\/vg0-opt \u00a0 2.3G \u00a0982M \u00a01.2G \u00a046% \/opt<br \/> \/dev\/mapper\/vg0-home \u00a0992M \u00a0 88M \u00a0853M \u00a010% \/home<br \/> \/dev\/sda1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 221M \u00a0 26M \u00a0183M \u00a013% \/boot<br \/> tmpfs \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01006M \u00a0 \u00a0 0 1006M \u00a0 0% \/dev\/shm<br \/> \/dev\/mapper\/vg1-lv0 \u00a0 2.0T \u00a01.7T \u00a0277G \u00a086% \/data<br \/> \/dev\/mapper\/vg3-media1<br \/> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 589G \u00a0553G \u00a06.5G \u00a099% \/media<\/p>\n<p> We are going to increase the size of the \/media FS by adding disk to the vg3 volume group.<\/p>\n<p> After adding the disk from the storage , you can check the new disk availability through the fdisk -l :<br \/> ========================================================================================================<br \/> =====&gt;&gt; New disk added will be shown as \/dev\/sdj in the below output<\/p>\n<p> [root@servername ~]# fdisk -l<\/p>\n<p> Disk \/dev\/sda: 21.4 GB, 21474836480 bytes<br \/> 255 heads, 63 sectors\/track, 2610 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sda1 \u00a0 * \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a029 \u00a0 \u00a0 \u00a0232911 \u00a0 83 \u00a0Linux<br \/> \/dev\/sda2 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a030 \u00a0 \u00a0 \u00a0 \u00a02610 \u00a0 \u00a020731882+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdb: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdb1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdc: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdc1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdd: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdd1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sde: 107.3 GB, 107374182400 bytes<br \/> 255 heads, 63 sectors\/track, 13054 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sde1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 13054 \u00a0 104856223+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdf: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdf1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdg: 536.8 GB, 536870912000 bytes<br \/> 255 heads, 63 sectors\/track, 65270 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdg1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 65270 \u00a0 524281243+ \u00a083 \u00a0Linux<\/p>\n<p> Disk \/dev\/sdh: 32.2 GB, 32212254720 bytes<br \/> 255 heads, 63 sectors\/track, 3916 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdh1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 \u00a03916 \u00a0 \u00a031455238+ \u00a08e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdi: 644.2 GB, 644245094400 bytes<br \/> 255 heads, 63 sectors\/track, 78325 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdi1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 78325 \u00a0 629145562 \u00a0 8e \u00a0Linux LVM<\/p>\n<p> Disk \/dev\/sdj: 107.3 GB, 107374182400 bytes<br \/> 255 heads, 63 sectors\/track, 13054 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> Disk \/dev\/sdj doesn&#8217;t contain a valid partition table<\/p>\n<p> Now You are going to create a new partition to the allocated disk \/dev\/sdj as shown below with the commands :<br \/> =============================================================================================================<\/p>\n<p> [root@servername ~]# fdisk \/dev\/sdj<br \/> Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab<br \/> Building a new DOS disklabel. Changes will remain in memory only,<br \/> until you decide to write them. After that, of course, the previous<br \/> content won&#8217;t be recoverable.<\/p>\n<p> The number of cylinders for this disk is set to 13054.<br \/> There is nothing wrong with that, but this is larger than 1024,<br \/> and could in certain setups cause problems with:<br \/> 1) software that runs at boot time (e.g., old versions of LILO)<br \/> 2) booting and partitioning software from other OSs<br \/> \u00a0 \u00a0(e.g., DOS FDISK, OS\/2 FDISK)<br \/> Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)<\/p>\n<p> Command (m for help): p<\/p>\n<p> Disk \/dev\/sdj: 107.3 GB, 107374182400 bytes<br \/> 255 heads, 63 sectors\/track, 13054 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<\/p>\n<p> Command (m for help): n<br \/> Command action<br \/> \u00a0 \u00a0e \u00a0 extended<br \/> \u00a0 \u00a0p \u00a0 primary partition (1-4)<br \/> p<br \/> Partition number (1-4): 1<br \/> First cylinder (1-13054, default 1):<br \/> Using default value 1<br \/> Last cylinder or +size or +sizeM or +sizeK (1-13054, default 13054):<br \/> Using default value 13054<\/p>\n<p> Command (m for help): p<\/p>\n<p> Disk \/dev\/sdj: 107.3 GB, 107374182400 bytes<br \/> 255 heads, 63 sectors\/track, 13054 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdj1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 13054 \u00a0 104856223+ \u00a083 \u00a0Linux<\/p>\n<p> Command (m for help): t<br \/> Selected partition 1<br \/> Hex code (type L to list codes): L<\/p>\n<p> \u00a00 \u00a0Empty \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1e \u00a0Hidden W95 FAT1 80 \u00a0Old Minix \u00a0 \u00a0 \u00a0 bf \u00a0Solaris<br \/> \u00a01 \u00a0FAT12 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 24 \u00a0NEC DOS \u00a0 \u00a0 \u00a0 \u00a0 81 \u00a0Minix \/ old Lin c1 \u00a0DRDOS\/sec (FAT-<br \/> \u00a02 \u00a0XENIX root \u00a0 \u00a0 \u00a039 \u00a0Plan 9 \u00a0 \u00a0 \u00a0 \u00a0 \u00a082 \u00a0Linux swap \/ So c4 \u00a0DRDOS\/sec (FAT-<br \/> \u00a03 \u00a0XENIX usr \u00a0 \u00a0 \u00a0 3c \u00a0PartitionMagic \u00a083 \u00a0Linux \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 c6 \u00a0DRDOS\/sec (FAT-<br \/> \u00a04 \u00a0FAT16 &lt;32M \u00a0 \u00a0 \u00a040 \u00a0Venix 80286 \u00a0 \u00a0 84 \u00a0OS\/2 hidden C: \u00a0c7 \u00a0Syrinx<br \/> \u00a05 \u00a0Extended \u00a0 \u00a0 \u00a0 \u00a041 \u00a0PPC PReP Boot \u00a0 85 \u00a0Linux extended \u00a0da \u00a0Non-FS data<br \/> \u00a06 \u00a0FAT16 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 42 \u00a0SFS \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 86 \u00a0NTFS volume set db \u00a0CP\/M \/ CTOS \/ .<br \/> \u00a07 \u00a0HPFS\/NTFS \u00a0 \u00a0 \u00a0 4d \u00a0QNX4.x \u00a0 \u00a0 \u00a0 \u00a0 \u00a087 \u00a0NTFS volume set de \u00a0Dell Utility<br \/> \u00a08 \u00a0AIX \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4e \u00a0QNX4.x 2nd part 88 \u00a0Linux plaintext df \u00a0BootIt<br \/> \u00a09 \u00a0AIX bootable \u00a0 \u00a04f \u00a0QNX4.x 3rd part 8e \u00a0Linux LVM \u00a0 \u00a0 \u00a0 e1 \u00a0DOS access<br \/> \u00a0a \u00a0OS\/2 Boot Manag 50 \u00a0OnTrack DM \u00a0 \u00a0 \u00a093 \u00a0Amoeba \u00a0 \u00a0 \u00a0 \u00a0 \u00a0e3 \u00a0DOS R\/O<br \/> \u00a0b \u00a0W95 FAT32 \u00a0 \u00a0 \u00a0 51 \u00a0OnTrack DM6 Aux 94 \u00a0Amoeba BBT \u00a0 \u00a0 \u00a0e4 \u00a0SpeedStor<br \/> \u00a0c \u00a0W95 FAT32 (LBA) 52 \u00a0CP\/M \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a09f \u00a0BSD\/OS \u00a0 \u00a0 \u00a0 \u00a0 \u00a0eb \u00a0BeOS fs<br \/> \u00a0e \u00a0W95 FAT16 (LBA) 53 \u00a0OnTrack DM6 Aux a0 \u00a0IBM Thinkpad hi ee \u00a0EFI GPT<br \/> \u00a0f \u00a0W95 Ext&#8217;d (LBA) 54 \u00a0OnTrackDM6 \u00a0 \u00a0 \u00a0a5 \u00a0FreeBSD \u00a0 \u00a0 \u00a0 \u00a0 ef \u00a0EFI (FAT-12\/16\/<br \/> 10 \u00a0OPUS \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a055 \u00a0EZ-Drive \u00a0 \u00a0 \u00a0 \u00a0a6 \u00a0OpenBSD \u00a0 \u00a0 \u00a0 \u00a0 f0 \u00a0Linux\/PA-RISC b<br \/> 11 \u00a0Hidden FAT12 \u00a0 \u00a056 \u00a0Golden Bow \u00a0 \u00a0 \u00a0a7 \u00a0NeXTSTEP \u00a0 \u00a0 \u00a0 \u00a0f1 \u00a0SpeedStor<br \/> 12 \u00a0Compaq diagnost 5c \u00a0Priam Edisk \u00a0 \u00a0 a8 \u00a0Darwin UFS \u00a0 \u00a0 \u00a0f4 \u00a0SpeedStor<br \/> 14 \u00a0Hidden FAT16 &lt;3 61 \u00a0SpeedStor \u00a0 \u00a0 \u00a0 a9 \u00a0NetBSD \u00a0 \u00a0 \u00a0 \u00a0 \u00a0f2 \u00a0DOS secondary<br \/> 16 \u00a0Hidden FAT16 \u00a0 \u00a063 \u00a0GNU HURD or Sys ab \u00a0Darwin boot \u00a0 \u00a0 fb \u00a0VMware VMFS<br \/> 17 \u00a0Hidden HPFS\/NTF 64 \u00a0Novell Netware \u00a0b7 \u00a0BSDI fs \u00a0 \u00a0 \u00a0 \u00a0 fc \u00a0VMware VMKCORE<br \/> 18 \u00a0AST SmartSleep \u00a065 \u00a0Novell Netware \u00a0b8 \u00a0BSDI swap \u00a0 \u00a0 \u00a0 fd \u00a0Linux raid auto<br \/> 1b \u00a0Hidden W95 FAT3 70 \u00a0DiskSecure Mult bb \u00a0Boot Wizard hid fe \u00a0LANstep<br \/> 1c \u00a0Hidden W95 FAT3 75 \u00a0PC\/IX \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 be \u00a0Solaris boot \u00a0 \u00a0ff \u00a0BBT<br \/> Hex code (type L to list codes): 8e<br \/> Changed system type of partition 1 to 8e (Linux LVM)<\/p>\n<p> Command (m for help): w<br \/> The partition table has been altered!<\/p>\n<p> Calling ioctl() to re-read partition table.<br \/> Syncing disks.<\/p>\n<p> =======&gt;&gt; Change the partition type from linux state to the linux LVM state by the command code 8e as shown above.<\/p>\n<p> After the Patition done by the above process now you can able to see the partition as shown below with the Output :<\/p>\n<p> Disk \/dev\/sdj: 107.3 GB, 107374182400 bytes<br \/> 255 heads, 63 sectors\/track, 13054 cylinders<br \/> Units = cylinders of 16065 * 512 = 8225280 bytes<\/p>\n<p> \u00a0 \u00a0Device Boot \u00a0 \u00a0 \u00a0Start \u00a0 \u00a0 \u00a0 \u00a0 End \u00a0 \u00a0 \u00a0Blocks \u00a0 Id \u00a0System<br \/> \/dev\/sdj1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 13054 \u00a0 104856223+ \u00a08e \u00a0Linux LVM<\/p>\n<p> =======&gt;&gt; Now create the pv on the server by the above partition.<\/p>\n<p> [root@servername ~]# pvcreate \/dev\/sdj1<br \/> \u00a0Physical volume &#8220;\/dev\/sdj1&#8221; successfully created<\/p>\n<p> =======&gt;&gt; vg free space before the addition of pv to the volumegroup.<\/p>\n<p> [root@servername ~]# vgdisplay vg3<br \/> \u00a0 \/dev\/vg2\/media: read failed after 0 of 4096 at 0: Input\/output error<br \/> \u00a0 &#8212; Volume group &#8212;<br \/> \u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 vg3<br \/> \u00a0 System ID<br \/> \u00a0 Format \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0lvm2<br \/> \u00a0 Metadata Areas \u00a0 \u00a0 \u00a0 \u00a01<br \/> \u00a0 Metadata Sequence No \u00a05<br \/> \u00a0 VG Access \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 read\/write<br \/> \u00a0 VG Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 resizable<br \/> \u00a0 MAX LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/> \u00a0 Cur LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/> \u00a0 Open LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/> \u00a0 Max PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/> \u00a0 Cur PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/> \u00a0 Act PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/> \u00a0 VG Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 600.00 GB<br \/> \u00a0 PE Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4.00 MB<br \/> \u00a0 Total PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0153599<br \/> \u00a0 Alloc PE \/ Size \u00a0 \u00a0 \u00a0 153088 \/ 598.00 GB<br \/> \u00a0 Free \u00a0PE \/ Size \u00a0 \u00a0 \u00a0 511 \/ 2.00 GB<br \/> \u00a0 VG UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 aVQV67-68Ge-b6EK-FnbI-81S2-9wsr-EobIkt<\/p>\n<p> =======&gt;&gt; Now extend the volume group by adding the pv as shown below<\/p>\n<p> [root@servername ~]# vgextend vg3 \/dev\/sdj1<br \/> \u00a0 Volume group &#8220;vg3&#8221; successfully extended<\/p>\n<p> =======&gt;&gt; Now check the volume group free space on the server as shown below<\/p>\n<p> [root@servername ~]# vgdisplay vg3<br \/> \u00a0 \/dev\/vg2\/media: read failed after 0 of 4096 at 0: Input\/output error<br \/> \u00a0 &#8212; Volume group &#8212;<br \/> \u00a0 VG Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 vg3<br \/> \u00a0 System ID<br \/> \u00a0 Format \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0lvm2<br \/> \u00a0 Metadata Areas \u00a0 \u00a0 \u00a0 \u00a02<br \/> \u00a0 Metadata Sequence No \u00a06<br \/> \u00a0 VG Access \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 read\/write<br \/> \u00a0 VG Status \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 resizable<br \/> \u00a0 MAX LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/> \u00a0 Cur LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a01<br \/> \u00a0 Open LV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1<br \/> \u00a0 Max PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00<br \/> \u00a0 Cur PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02<br \/> \u00a0 Act PV \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a02<br \/> \u00a0 VG Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 699.99 GB<br \/> \u00a0 PE Size \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4.00 MB<br \/> \u00a0 Total PE \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0179198<br \/> \u00a0 Alloc PE \/ Size \u00a0 \u00a0 \u00a0 153088 \/ 598.00 GB<br \/> \u00a0 Free \u00a0PE \/ Size \u00a0 \u00a0 \u00a0 26110 \/ 101.99 GB<br \/> \u00a0 VG UUID \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 aVQV67-68Ge-b6EK-FnbI-81S2-9wsr-EobIkt<\/p>\n<p> =======&gt;&gt; Now increase ( 100GB ) \u00a0the LV size as you needed the free space on the FS as shown below<\/p>\n<p> [root@servername ~]# lvextend -L +100G \/dev\/vg3\/media1<br \/> \u00a0 Extending logical volume media1 to 698.00 GB<br \/> \u00a0 Logical volume media1 successfully resized<\/p>\n<p> =======&gt;&gt; Now resize the FS as shown below<\/p>\n<p> [root@servername ~]# resize2fs -p \/dev\/vg3\/media1<\/p>\n<p> resize2fs 1.39 (29-May-2006)<\/p>\n<p> Filesystem at \/dev\/vg3\/media1 is mounted on \/media; on-line resizing required<\/p>\n<p> Performing an on-line resize of \/dev\/vg3\/media1 to 182976512 (4k) blocks.<\/p>\n<p> The filesystem on \/dev\/vg3\/media1 is now 182976512 blocks long.<\/p>\n<p> =======&gt;&gt; Now check the FS size with the below output.<\/p>\n<p> [root@servername ~]# df -h \/media<br \/> Filesystem \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Size \u00a0Used Avail Use% Mounted on<br \/> \/dev\/mapper\/vg3-media1<br \/> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 688G \u00a0553G \u00a0100G \u00a085% \/media<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before the Addition of new disk to the Linux Server : ============================================================================= ======&gt;&gt; The total number of disks on the system can be seen through fdisk -l<\/p>\n<p> [root@servername ~]# fdisk -l | more<\/p>\n<p> Disk \/dev\/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors\/track, 2610 cylinders Units = cylinders of 16065 * 512 = [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1354"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1354"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1354\/revisions"}],"predecessor-version":[{"id":1355,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/1354\/revisions\/1355"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}