K
K
Konstantin Khairov2017-05-27 00:54:43
linux
Konstantin Khairov, 2017-05-27 00:54:43

How to mount an additional SSD drive?

Hello everyone, in general the problem is as follows. I don't really understand Linux and what to do in my situation is not yet clear. And so the problem is this, there was one tariff for VDS became another with additional space (SSD). By Google, I mean different topics and articles on the forum, but since it didn’t help, I’m writing here.
As I understand it, I have LVM installed and this is how an additional partition is added. But how can I use it? How to make it so that it would be, for example, along the path /home/web/ssd2/ something like this. After Google, I found out that I needed to mount it using fdisk /dev/disk_name.
But I immediately ran into a problem, here's what my second disk is listed like this /dev/mapper/VolGroup-lv_root but tried to do as in the example and added the disk name that is indicated I have ( /dev/mapper/VolGroup-lv_root) .
Here's what I got in response: fdisk: cannot open /dev/mapper/VolGroup-Lv_root: No such file or directory
/dev/ has both devices (sda1,sda2) what to do with this is not clear. Trying to do as in the examples, it didn’t lead to anything, just the same errors as above ( fdisk: cannot open /dev/mapper/VolGroup-Lv_root: No such file or directory)
So, here is what fdisk -l gives


Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track,
130544 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: 0x0008d32e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 6528 51915776 8e Linux LVM
Disk /dev/mapper/VolGroup-lv_root: 51.0 GB, 51044679680 bytes
255 heads, 63 sectors/track, 6205 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: 0x00000000
Disk /dev/mapper/VolGroup-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 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: 0x00000000

Seeing that Disk / dev / sda: 107.4 GB was indicated, I thought that apparently everything was already marked up, since it was 50 and another 50 GB was added, but I did not see any traces.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2017-05-27
@chupasaurus

You have added a volume to the disk, but since it is not marked out and not listed in LVM, it is not used.

  • vgextend $vg_name /dev/sda3
  • If you just want to increase the space for the root:
    lvextend VolGroup-lv_root /dev/sda3
    resize2fs /dev/mapper/VolGroup-lv_root

  • Didn't find what you were looking for?

    Ask your question

    Ask a Question

    731 491 924 answers to any question