This post details the processes required to mount a new hard drive in a Linux server. eSecureData.com clients may use this process when they request additional hard drives to be added to their servers, or they may simply put in a support ticket for our techs to do it.
To view attached drives to see which ones need mounting use the following command:
# fdisk -l
You should receive something like this:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225200 bytes
Device Boot Start End Blocks ID System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 60801 488279610 8e Linux
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225200 bytes
Device Boot Start End Blocks ID System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 60801 488279610 8e Linux
You would then type the following command:
# mount -t auto /dev/sdb2 /mnt (where /dev/sdb2 = the device with the data needing recover and /mnt = the location you’re mounting it to)
For logical Volumes this has to be done differently.
Your fdisk -l would return something like the following:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225200 bytes
Device Boot Start End Blocks ID System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 60801 488279610 8e Linux LVM (notice the LVM addition)
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225200 bytes
Device Boot Start End Blocks ID System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 60801 488279610 8e Linux LVM (notice the LVM addition)
This is most likely the case if you’ve just had to install a new OS and attached the second drive for data recovery.
If both hard drives have an LVM, you should check the LVM groups with the following command:
# pvscan
This would return something similar to the following:
PV /dev/sdb2 VG VolGroup00 lvm2 [465.66 GB / 0 free]
PV /dev/sda2 VG VolGroup00 lvm2 [465.66 GB / 0 free]
Total: 2 [931.31 GB] / in use: 2 [ 931.31 GB] / in no VG: 0 [0 ]
If both hard drives have the same Volume Group, you will need to rename one of them with the following commands:
# lvm vgscan –mknodes
# lvm vgchange -ay
# lvm lvscan
# lvm vgrename VolGroup00 VolGroup01
# lvm lvscan
Once renamed a reboot is required. After the reboot an lvscan should show both VolGroup00 and VolGroup01. You would then need to mount the logical volume rather then the hard drive partition.
# vgscan –mknodes
# vgchange -ay
# lvscan
That will detect and activate all available logical volumes. Then you mount them something like this:
# mount /dev/VolGroup01/LogVol00 /mnt
To see all additional hard drive options, please see our pricing pages for Premium Dedicated Servers or Value Dedicated Servers.