Understanding volumes and hard drives


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Understanding volumes and hard drives
# 1  
Understanding volumes and hard drives

Ok so i thought i was smart but i can tell I need some help. I am playing around with understanding lvm and adding disks to a linux box. I added a disk and then ran what i thought were commands to add this disk to the box but I think I messed up and would like some help. My question is did i just add this disk to the current LV and now i just need to resize the it? I tried to get this to mount but it comes back with the following error. Thanks in advance and yes you can make fun of me for not knowing this stuff but hye I gotta learn somehow right?

mount error..
Code:
mount -t xfs /dev/mapper/ol-lv_oradata  /mnt/drives/oradata
mount: wrong fs type, bad option, bad superblock on /dev/mapper/ol-lv_oradata,
       missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.

here are my outputs.
Code:
df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/ol-root   27G   22G  5.1G  81% /
devtmpfs             1.4G     0  1.4G   0% /dev
tmpfs                1.4G   32M  1.4G   3% /dev/shm
tmpfs                1.4G  9.6M  1.4G   1% /run
tmpfs                1.4G     0  1.4G   0% /sys/fs/cgroup
/dev/sda1            497M  282M  216M  57% /boot
tmpfs                276M   60K  276M   1% /run/user/54321


 ls -ls /dev/sd*
0 brw-rw----. 1 root disk 8,  0 Jan  2 16:34 /dev/sda
0 brw-rw----. 1 root disk 8,  1 Jan  2 16:34 /dev/sda1
0 brw-rw----. 1 root disk 8,  2 Jan  3 13:53 /dev/sda2
0 brw-rw----. 1 root disk 8, 16 Jan  3 13:50 /dev/sdb  <-- this is the disk I added
0 brw-rw----. 1 root disk 8, 17 Jan  3 13:53 /dev/sdb1 <-- this is the disk I added

fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0003e72b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    62914559    30944256   8e  Linux LVM

Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x9a45daa3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   104857599    52427776   83  Linux

Disk /dev/mapper/ol-root: 28.4 GB, 28420603904 bytes, 55508992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol-swap: 3221 MB, 3221225472 bytes, 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol-lv_oradata: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

 lvmdiskscan
  /dev/ram0          [      16.00 MiB] 
  /dev/ol/root       [     <26.47 GiB] 
  /dev/ram1          [      16.00 MiB] 
  /dev/sda1          [     500.00 MiB] 
  /dev/ol/swap       [       3.00 GiB] 
  /dev/ram2          [      16.00 MiB] 
  /dev/sda2          [      29.51 GiB] LVM physical volume
  /dev/ol/lv_oradata [      50.00 GiB] 
  /dev/ram3          [      16.00 MiB] 
  /dev/ram4          [      16.00 MiB] 
  /dev/ram5          [      16.00 MiB] 
  /dev/ram6          [      16.00 MiB] 
  /dev/ram7          [      16.00 MiB] 
  /dev/ram8          [      16.00 MiB] 
  /dev/ram9          [      16.00 MiB] 
  /dev/ram10         [      16.00 MiB] 
  /dev/ram11         [      16.00 MiB] 
  /dev/ram12         [      16.00 MiB] 
  /dev/ram13         [      16.00 MiB] 
  /dev/ram14         [      16.00 MiB] 
  /dev/ram15         [      16.00 MiB] 
  /dev/sdb1          [     <50.00 GiB] LVM physical volume


Last edited by vbe; 01-03-2019 at 06:09 PM.. Reason: code tags
# 2  
Maybe if you explained, wrote what you did( command you passed...), could we understand what is going on, and it is helpful to give more details about your architecture /OS version
# 3  
Code:
mkfs  -t xfs -f /dev/sdb
  fdisk /dev/sdb
  ls -la /dev/sdb*
  pvcreate /dev/sdb1
  vgextend ol /dev/sdb1
  lvcreate -L 50GB -n lv_oradata ol
  lvdisplay ol/lv_oradata
  mkfs -t xfs -f /dev/ol/lv_oradata

Moderator's Comments:
Mod Comment Please use CODE-tags when posting code, data or output from a terminal. Thank you.

Last edited by bakunin; 01-03-2019 at 11:09 PM..
# 4  
Quote:
Originally Posted by cptkirkh
Code:
mkfs  -t xfs -f /dev/sdb
  fdisk /dev/sdb
  ls -la /dev/sdb*
  pvcreate /dev/sdb1
  vgextend ol /dev/sdb1
  lvcreate -L 50GB -n lv_oradata ol
  lvdisplay ol/lv_oradata
  mkfs -t xfs -f /dev/ol/lv_oradata

If these commands have been entered in the order you posted them then you indeed seem not to understand what disks, volumes, partitions and filesystems are. You might profit from reading this little introduction i once wrote. This was for AIX, but the Linux LVM was built after the AIX LVM and the concepts are absolutely the same - just the commands are a little bit different.

I hope this helps.

bakunin

Last edited by RavinderSingh13; 01-04-2019 at 12:24 AM..
This User Gave Thanks to bakunin For This Post:
# 5  
Yes, that helped me understand what I did wrong. It looks like from your other post that since i created a file system at that time it created an underlying LV. thanks for the help. I will read more to see what needs to be done to resolve this issue.

--- Post updated at 02:21 PM ---

Thank you for your help. After reading your other post I understand my error. I have removed all of my issues and successfully added and extended the logical volume on my root. Now i am going to try and add another disk and create a new logical volume and see how it goes.
# 6  
Quote:
Originally Posted by cptkirkh
After reading your other post I understand my error. I have removed all of my issues and successfully added and extended the logical volume on my root. Now i am going to try and add another disk and create a new logical volume and see how it goes.
That is very good news and i am glad you had success. If you encounter another problem don't hesitate to ask.

bakunin
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #1004
Difficulty: Medium
Hopper College at Caltech University was named in honor of Grace Hopper in 2017.
True or False?

10 More Discussions You Might Find Interesting

1. HP-UX

Need Hardware help on a RP4440 that lost the RTC and does not see both hard drives

Since the lost of the rtc all the settings became default. Does anyone remember what needs to be reset to discover both Hard drives? It sees the DVD and the scsi disk (intscsib.0) in 0/1/1/1.0 (disk 1 slot) but not 0/1/1/0.1 (intscsia.1)(disk 0 slot). Right now, from the service menu, scsi shows... (3 Replies)
Discussion started by: mrmurdock
3 Replies

2. Solaris

Solaris 8 - Accessing Hard Drives

Hi, I have two SCSI Hard Drives in a Sun Solaris 8 server as shown below. I would like to access Disk1 and look at its contents, directory structure and files. How do I change my default directory from Disk 0 to Disk 1 and vice versa? Thank you. (5 Replies)
Discussion started by: ssabet
5 Replies

3. Solaris

Trying to boot Solaris without hard drives in T5220

I have three Sun Oracle Netra T5220s. I am trying to just get the processor information psrinfo or prtdiag -v from the # prompt in single user mode. I am needing to know the commands to get to boot the CD/DVD of the Solaris OS. I am using it via Serial Port Management. Tinkering around I... (4 Replies)
Discussion started by: nerdboy
4 Replies

4. Hardware

Hard Drives and MBR

Hello everyone. I have a question which I may know the answer to, I'm just looking for a confirmation. When it comes to the MBR of a hard drive, i've read in multiple sources that it's always located in the first sector of the hard drive. Is the MBR there from the factory? When I buy a new blank... (3 Replies)
Discussion started by: Lost in Cyberia
3 Replies

5. Solaris

Reinstall old hard drives

I have a T2000 Sun-Fire server. I have 2 sets of drives in a raid 1. Lets call them Set A and Set B. I had Set A installed and working. I needed a new install so I so build up Set B. After some time I wanted to put Set A back in the server. Now the system will not boot off of Set A. I tried to boot... (7 Replies)
Discussion started by: stu1811
7 Replies

6. Filesystems, Disks and Memory

Help adding new hard drives

Folks; I just added 2 physical new hard drives to my SUSE server. My server is already running SUSE 10.3 version. Is there a command i can use to add the new space or even see if the system can sees them? (3 Replies)
Discussion started by: Katkota
3 Replies

7. Solaris

formating and repartitioning an external hard drives

Version: solaris 10 x86 I just got a western digital external harddrive formated with fat 32. this drive came with some setup files which is meant for windows or mac. I want to reformat and partition this drive into two ( for solaris and windows) such that the setup files will still be there... (2 Replies)
Discussion started by: seyiisq
2 Replies

8. Solaris

How do I determine the hard drives in /dev/dsk in OpenSolaris?

I have a Solaris machine running OpenSolaris v5.11. It came with a hard drive. It's called /dev/dsk/c4d0s0. I added two new hard drives into the box. I can't figure out what it's called in /dev/dsk. There are 210 filenames in /dev/dsk. How do I find out which filename corresponds to the... (2 Replies)
Discussion started by: sqa777
2 Replies

9. Linux

No Hard Drives Have Been Found

I am using an Acer Aspire 4720Z with two partitions C and D. Windows is installed on C and I decided to install Red Hat Linux 9 in partition D. The two partitions are in NTFS file system. During my installation of the the Linux, a prompt was displayed on screen with the message: "No hard drives... (2 Replies)
Discussion started by: tamcomng
2 Replies

10. UNIX for Dummies Questions & Answers

Hard drives

Will some one tell me what this means. "warning: ida 0 <slot 6> : command timed out on dev 1/42 blk 4824290 logical unit=0 blocks=5512102, size 2, cmd=0x20." I'm running SCO 505 on a proliant 1600r. Thnank you in advance. (3 Replies)
Discussion started by: franruiz
3 Replies

Featured Tech Videos