0

I have a storage which connected to a server through 10GB fiber

I have managed to set up the multipath for all the folders I want with their specific volume .so now when I get the info, it is like this (I just removed the company name and some useless info)

mpathe ********************************** Company name
size=6.0T features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 17:0:0:4 sdj 8:144 active ready running
`-+- policy='service-time 0' prio=1 status=enabled
  `- 18:0:0:4 sdk 8:160 active ready running
mpathd ********************************** Company name
size=3.0T features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=enabled
| `- 18:0:0:3 sdi 8:128 failed faulty running
`-+- policy='service-time 0' prio=0 status=enabled
  `- 17:0:0:3 sdh 8:112 failed faulty running
mpathc (********************************** Company name
size=2.0T features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 17:0:0:2 sdf 8:80  active ready running
`-+- policy='service-time 0' prio=1 status=enabled
  `- 18:0:0:2 sdg 8:96  active ready running
mpathb (********************************** Company name
size=10T features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 17:0:0:1 sdd 8:48  active ready running
`-+- policy='service-time 0' prio=1 status=enabled
  `- 18:0:0:1 sde 8:64  active ready running

Now trying to format it and then give it certain names that I can latter map it

so I checked and I found that I can do this

pvcreate /dev/mapper/mpathe
pvcreate /dev/mapper/mpathd
pvcreate /dev/mapper/mpathc
pvcreate /dev/mapper/mpathb

But I am still not able to format it, can someone help me here?

I have tried to do the pvcreate, then vgcreate, then lvcreate then mkfs.ext4

# pvcreate /dev/mapper/mpathe
  Error reading device /dev/mapper/mpathd at 0 length 512.
  Error reading device /dev/mapper/mpathd at 0 length 4.
  Error reading device /dev/mapper/mpathd at 4096 length 4.
WARNING: ext4 signature detected on /dev/mapper/mpathe at offset 1080. Wipe it? [y/n]: y
  Wiping ext4 signature on /dev/mapper/mpathe.
  Physical volume "/dev/mapper/mpathe" successfully created.

# vgcreate myfolder /dev/mapper/mpathe
  Error reading device /dev/mapper/mpathd at 0 length 512.
  Error reading device /dev/mapper/mpathd at 0 length 4.
  Error reading device /dev/mapper/mpathd at 4096 length 4.
  Volume group "myfolder" successfully created


# lvcreate -n lv_name -L 6.0T myfolder
  Logical volume "lv_name" created.
# mkfs.ext4 /dev/mapper/myfolder-lv_name
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
201326592 inodes, 1610612736 blocks
80530636 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3758096384
49152 block groups
32768 blocks per group, 32768 fragments per group
4096 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

I don't know if I did it correctly or not and I don't know how to check it and I don't know how to mount it

  • what you mean with formatting the disks? pvcreate is enough – c4f4t0r May 23 at 20:45
  • @c4f4t0r but it does not show the disk I assigned and I am unable to mount it. would you please tell me how should I mount each of them? – Learner May 24 at 0:38
  • with pvcreate you create a physical volume, Now you need to create volume group with vgcreate, after that you can use total space of the disks, pvcreate, vgcreate, lvcreate and after you will have a logical volume and create the filesystem on top, Now you can mount – c4f4t0r May 24 at 5:30
  • @c4f4t0r I did something above, can you please check and let me know your thought? – Learner May 24 at 14:41
  • Now you could try to mount the logical volume with mount /dev/myfolder/lv_name /mnt, in any case you could take a look to the redhat lvm user guide is full of many example – c4f4t0r May 24 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.