mount hard drive

General support questions
Post Reply
sirfpsycho
Posts: 16
Joined: 2017/01/29 04:06:35

mount hard drive

Post by sirfpsycho » 2018/03/13 09:57:01

Hello, I bought a dedicated server with 120GB SSD+3TB HDD. Now I wanna know do I need to mount the secondary Hard Drive or it is already mount?
Here is the df -h

[root@node ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg-root 2.7T 919M 2.6T 1% /
tmpfs 12G 0 12G 0% /dev/shm
/dev/sda1 243M 41M 189M 18% /boot
/dev/mapper/vg-tmp 976M 1.3M 924M 1% /tmp

and fdisk -l

[root@node ~]# fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 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: 0x0009be4d

Device Boot Start End Blocks Id System
/dev/sda1 * 1 32 256000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 32 33 2048 83 Linux
Partition 2 does not end on cylinder boundary.

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn 't support GPT. Use GNU Parted.


Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/vg-root: 2986.8 GB, 2986847764480 bytes
255 heads, 63 sectors/track, 363130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg-swap: 12.7 GB, 12650020864 bytes
255 heads, 63 sectors/track, 1537 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg-tmp: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mount hard drive

Post by TrevorH » 2018/03/13 10:17:21

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg-root 2.7T 919M 2.6T 1% /
Yes, it's used otherwise your root filesystem couldn't be 2.7TB in size.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sirfpsycho
Posts: 16
Joined: 2017/01/29 04:06:35

Re: mount hard drive

Post by sirfpsycho » 2018/03/13 12:21:20

Thank you for the quick reply. I contacted the DC and they told me I need to mount 3TB. only 120GB is already mounted. I am confused.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mount hard drive

Post by TrevorH » 2018/03/13 14:07:53

I'm 99% sure they are wrong. Post the output from the following commands, run as root

pvs
vgs
lvs
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sirfpsycho
Posts: 16
Joined: 2017/01/29 04:06:35

Re: mount hard drive

Post by sirfpsycho » 2018/03/13 15:29:47

[root@node ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb1 vg lvm2 a-- 2.73t 0
[root@node ~]# vgs
VG #PV #LV #SN Attr VSize VFree
vg 1 3 0 wz--n- 2.73t 0
[root@node ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root vg -wi-ao---- 2.72t
swap vg -wi-ao---- 11.78g
tmp vg -wi-ao---- 1.00g

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mount hard drive

Post by TrevorH » 2018/03/13 15:54:25

Right, so from that I can see that /dev/sdb1 - which is your 3TB drive - is an LVM Physical Volume that is part of the LVM Volume Group 'vg' and that VG contains the LVM Logical Volumes root, swap and tmp. Your df output from earlier shows that your root filesystem is on /dev/vg/root and is 2.7TB in size and only 1% used. All looks fine with the 3TB drive.

My questions would be more "what about the SSD"? I can see that /dev/sda1, the first partition on your SSD, is used for /boot. It also has another partition on it, /dev/sda2 that is only 1 cylinder in size, 2MB. No idea what that is unless perhaps it's a BIOS boot partition. The rest of your SSD, the other ~119GB, appears to be unused and even unpartitioned. Given the potential speed advantages of the SSD over a bunch of spinning rust, I'd look at what you can use it for.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sirfpsycho
Posts: 16
Joined: 2017/01/29 04:06:35

Re: mount hard drive

Post by sirfpsycho » 2018/03/13 15:58:05

it means 3TB is already mounted and can be used. But how to use 120GB SSD?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mount hard drive

Post by TrevorH » 2018/03/13 16:15:38

Can you also post the output from swapon -s so we can see your swap file configuration.

The rest of your SSD appears to be unpartitioned and available to use. You'll need to run fdisk or parted to create a new partition on it, tag it as the correct partition type for whatever purpose you want to use it for then "do stuff(TM)" to it to make it useful. If you want to make a new LVM PV on it then tag it as type 0x8e and run pvcreate/vgcreate/vgextend as appropriate. If you want to make a filesystem directly on the partition then run mkfs against it (beware, destructive). If you want it to be swap partition then tag it as type 0x82, run mkswap against it and use swapon to activate it (or add it to fstab).

If you wanted to get really complicated then you could probably turn the SSD into a cache disk in front of your spinning disk but that's much harder, more complex and possibly also destructive - not something I've ever had occasion to use.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sirfpsycho
Posts: 16
Joined: 2017/01/29 04:06:35

Re: mount hard drive

Post by sirfpsycho » 2018/03/13 17:04:57

[root@node ~]# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 12353532 0 -1
[root@node ~]#


SSD Cache would be better solution. How can I do it?

Post Reply