LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Increase /dev/mapper/VolGroup-lv_home by adding an extra hard drive in liux system (https://www.linuxquestions.org/questions/linux-newbie-8/increase-dev-mapper-volgroup-lv_home-by-adding-an-extra-hard-drive-in-liux-system-4175472448/)

boby.kumar 08-07-2013 05:24 AM

Increase /dev/mapper/VolGroup-lv_home by adding an extra hard drive in liux system
 
Hi Team
Thanks a lot for the support you had been providing me. Now again need your help here. Actually i have a linux system with 1TB hd and /home area is showing 1TB. we need to increase /home area by adding an extra hard drive as 1TB to make it 2TB.
A snapshot is goes here for /home area:

Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root ext4 50G 3.1G 44G 7% /
tmpfs tmpfs 1.9G 276K 1.9G 1% /dev/shm
/dev/sda1 ext4 485M 35M 425M 8% /boot
/dev/mapper/VolGroup-lv_home ext4 1.8T 197M 1.7T 1% /home

As per googling i have added hd and create /dev/sb1 pv and added this pv to existing vg.
following is the snapshot here:

--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 3.64 TiB
PE Size 4.00 MiB
Total PE 953737
Alloc PE / Size 953737 / 3.64 TiB
Free PE / Size 0 / 0
VG UUID Km6NE9-n5sq-dDc4-cigp-w6Rk-sPLF-OvoKhu
After that system had restarted to take new effects.
It should be show me the size of /home area to 2TB but no change here.

[root@www ~]# df -PTh
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root ext4 50G 3.1G 44G 7% /
tmpfs tmpfs 1.9G 276K 1.9G 1% /dev/shm
/dev/sda1 ext4 485M 35M 425M 8% /boot
/dev/mapper/VolGroup-lv_home ext4 1.8T 197M 1.7T 1% /home

Could you please let me know how to increase /dev/mapper/VolGroup-lv_home this area to 2TB? I am totally stucked here.
please help me.

Thanks in Advance

chrism01 08-07-2013 06:51 AM

The usual steps are
1. add disk
2. make disk a pv
3. add pv to vg
4. lvextend ...

http://tldp.org/HOWTO/LVM-HOWTO/

Ser Olmy 08-07-2013 06:53 AM

I assume you added the new Physical Volume to the Volume Group with vgextend. Now you need to extend the Logical Volume "VolGroup-lv_home" with lvextend and finally extend the file system with resize2fs.

boby.kumar 08-08-2013 06:57 AM

Thanks for your reply.
If i want to format whole hard drive by mkfs.ext4 /dev/sdb commnad,Is hard drive crashed or not?
can i use this later as it has 2000GB space? please suggest me.

Ser Olmy 08-08-2013 07:21 AM

I'm afraid I don't understand exactly what you're asking, or how it relates to your original question (if at all). What do you mean by "crashed"?

boby.kumar 08-08-2013 07:38 AM

Dear Ser Olmy

i am getting the following error in Hard disk while creating the partition:

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x55293afb

Device Boot Start End Blocks Id System
/dev/sdb1 1 243201 1953512001 83 Linux
Partition 1 does not start on physical sector boundary.

Could you please explain why its happening? please share resolution with me.

Regards
New Member

Ser Olmy 08-08-2013 08:18 AM

I don't see an error message?

If you mean the "partition 1 does not start on physical sector boundary" message, that appears because of this:
Code:

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

This is an "advanced format" disk with 4096 byte physical sectors, but for compatibility reasons it emulates 512 byte sectors. Each physical sector contains 8 emulated, logical sectors.

Your partition starts at emulated sector 243201, which is not a multiple of 8. This is not optimal, and that's why you're getting the "does not start on physical sector boundary" message.

boby.kumar 08-08-2013 08:38 AM

how can i fix this problem? please help me

Ser Olmy 08-08-2013 08:45 AM

Delete the partition and recreate it so it starts on a physical sector boundary. The first sector number must be a multiple of 8. 234201 is not, but 234200 or 234208 is.

By the way, why does the partition start so far from the beginning of the disk?


All times are GMT -5. The time now is 08:22 AM.