LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hard Disk Issue - fdisk and df -h (https://www.linuxquestions.org/questions/linux-newbie-8/hard-disk-issue-fdisk-and-df-h-4175500763/)

sachinsud 04-06-2014 11:35 AM

Hard Disk Issue - fdisk and df -h
 
Hi,

I have a dedicated server which has raid 1 configured to use 2x 1 Tb hard drive.

I want to create a volume group. But i m not able to do so.

If i do df -h i get this


[root@sd-55453 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 99G 2.7G 91G 3% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sda1 194M 61M 123M 34% /boot
[root@sd-55453 ~]#


And if i do fdisk -l

[root@sd-55453 ~]# fdisk -l

Disk /dev/sda: 999.7 GB, 999653638144 bytes
255 heads, 63 sectors/track, 121534 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008dd48

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 13080 104857600 83 Linux
/dev/sda3 13080 14112 8290304 82 Linux swap / Solaris
/dev/sda4 14112 121533 862860094+ 8e Linux LVM
[root@sd-55453 ~]#


Now this dev/sda4 does not appear on df -h and i m new to this so how can i bring sda4 on def -h command. And after that only i can create LVG
Please suggest

JeremyBoden 04-06-2014 12:31 PM

df -h only shows mounted partitions.

fdisk shows all partitions on a disk.

You need to tell LVM which partitions are managed by LVM.

So enter
Code:

sudo lvm
then enter 'help' to list available LVM commands, 'quit' to return to command entry.

You start with pvcreate (enter pvcreate -h for more info).


All times are GMT -5. The time now is 12:59 PM.