LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Do I use two disks or not? (https://www.linuxquestions.org/questions/linux-newbie-8/do-i-use-two-disks-or-not-4175414504/)

ovod88 07-02-2012 04:15 PM

Do I use two disks or not?
 
Hi.
I have next question. I have Centos 6. When I type command
fdisk -l
I see next output:
disk /dev/mapper/asr_1p3: 71.4 ГБ, 71381811200 байт
255 heads, 63 sectors/track, 8678 cylinders
Units = цилиндры of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

disk /dev/mapper/asr_1: 72.8 ГБ, 72771174400 байт
255 heads, 63 sectors/track, 8847 cylinders
Units = цилиндры of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8b6465a5

As you can see I have two disks, But df -h shows that linux use only one disk:

[root@security_server vkhrystenko]# df -h
File system Size Avail Used% mounted on
/dev/mapper/asr_1p3 66G 2,3G 63G 4% /
tmpfs 1012M 0 1012M 0% /dev/shm
/dev/mapper/asr_1p1 291M 31M 245M 12% /boot

Output from cat /proc/mdstat shows no raid installed.

So my question is: Linux use only one disk or not? And if one, how to join second disk to the system (or do raid mirroring)?

Kustom42 07-02-2012 04:40 PM

Ah dev mapper...

You are using the wonderful world of LVM for your disks.

Here is a great resource to read over to educate yourself on the topic:

http://sources.redhat.com/lvm2/wiki/MultipathUsageGuide

ovod88 07-09-2012 02:40 PM

I have read about LVM. And now I have another question. I have almost all space mounted on / including var. As I understand, it is not a good idea to do so. So my question is how to separate my var directory on separate partition if all space in single mounting point?
Please help.

Kustom42 07-10-2012 11:28 AM

The reason why people say /var and /tmp should be seperated is due to isolation of file space. These filesystems can become full easily on some systems, say a web server that gets millions of requests a day the httpd access logs in /var/log/httpd/ would start to consume the entire filesystem.

If this is an actual issue for you then you can look at creating a new lv(provided the volume group has enough space) for these. If you don't have enough space you can reduce the size of your current lv to create the new ones.

Again, this isn't something that you must do but it is something that could be a potential issue under certain types of server configuration.

ovod88 07-10-2012 12:20 PM

Hm...
I think what we have here is misunderstanding( I have next situation (I dont khow how to get screen from my virtual machine):
df -h
/dev/sda2 bla bla mounted on /
/dev/sda1 bla bla mounted on /boot
lvdisplay shows no output however LVM is installed. So my question is: How to get some space from / and create separate partition for /var. Unfortunatelly I dont have any LV configured. Partitions were created during initial setting and var was allocated on the same space and FS as /. How to change this?

Kustom42 07-10-2012 01:24 PM

Looks like you aren't actually using LVM, I am confused a little bit though as the /dev/mapper indication in your fdisk output shows the volumes.

What does a pvdisplay or vgdisplay give you?

From the output you just provided you wouldn't be able to create a separate partition unless you already had more free space as the /dev/sda shows you are using partitions and not LVM for your mounts.

ovod88 07-11-2012 03:21 AM

Yeap. There is mapper in output. But no output for pvdisplay or vgdisplay. I think it is because LVM is included in this distribution and was used during initial setting only. Or it is not a LVM but just name of file in /dev directory and has no concern to LVM.

Kustom42 07-11-2012 12:30 PM

You have LVM installed but you are not using it for your partitions.

In this case, nothing is broke so don't fix it.


All times are GMT -5. The time now is 09:14 AM.