Mounting a new disk on linux server


 
Thread Tools Search this Thread
Operating Systems Linux Mounting a new disk on linux server
# 1  
Old 11-22-2010
Mounting a new disk on linux server

Hi All.
I am pretty new when it comes to Linux. My admin left on vacation and has presented 2 new disks to the server but they won't be seen until I can reboot the box this weekend.
Once that happens I need the steps to make it available to my server and mount them as new filesystems. One will be for oracle data and the other for backup data.
Can anyone provide me with the steps neeed to complete this?
Here is some info I have on the current setup:

Code:
 
RCWLO-ODS10g:/ # uname -a
Linux RCWLO-ODS10g 2.6.16.60-0.42.8-smp #1 SMP Tue Dec 15 17:28:00 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux

Code:
 
RCWLO-ODS10g:/ # df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb3             98523580  56628620  41894960  58% /
udev                  40973400       188  40973212   1% /dev
/dev/sde1            1373587836 1142253616 231334220  84% /SAN
/dev/sda1               104376     41280     63096  40% /boot
/dev/sda2             20972152   6042020  14930132  29% /home
/dev/sdb1             33558712     66016  33492696   1% /tmp
/dev/sdb2             10490104   8796252   1693852  84% /u05
/dev/sda3             15735128    327916  15407212   3% /var


Code:
 
RCWLO-ODS10g:/ # cat /etc/fstab
/dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part3 /                    reiserfs   acl,user_xattr        1 1
/dev/disk/by-id/scsi-3600508b4001046910000800001110000-part1 /SAN                 reiserfs   defaults              1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part1 /boot                reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part2 /home                reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part1 /tmp                 reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part2 /u05                 reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part3 /var                 reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part4 swap                 swap       defaults              0 0
proc                            /proc                   proc            defaults                        0 0
sysfs                           /sys                    sysfs           noauto                          0 0
debugfs                         /sys/kernel/debug       debugfs         noauto                          0 0
usbfs                           /proc/bus/usb           usbfs           noauto                          0 0
devpts                          /dev/pts                devpts          mode=0620,gid=5                 0 0

Thanks
# 2  
Old 11-22-2010
The first question is should the disk be formatted? That is, should there be a file system on them.
I am not sure about Oracle Data. I know that sometimes Oracle uses raw disks for storage. If this is the case, then you need to determine the device of the new Oracle Data disk (is it /dev/sda /dev/sdb, etc') and configure Oracle accordingly.

If the disks need to be formatted, the first step would be to create a file system on them:
1. Determine the device of the disks.
2. Create one or more partitions on each disk using "fdisk" or the graphical tool "gparted".
3. Decide which file system you want to use. It seems like you are using reiserfs for all the disks, and I assume you will use it for the new disks as well.
4. use the "mkfs" command to create the file system.
5. Update the "/etc/fstab" file so that the new formatted partitions will be automatically mounted when the system comes up, or manually.

BTW, what distribution are you using (look at /etc/issue)?
# 3  
Old 11-22-2010
Yes the devices should be formatted.
I am not planning to use them for raw storage for Oracle and there will only be the one partition on both disks for the data.

You mention to determine the devices of the new disks? How do I do that exactly? What command should I run to see the disks after the reboot?

Currently there is:

Code:
RCWLO-ODS10g:/dev # cat /etc/fstab
/dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part3 /                    reiserfs   acl,user_xattr        1 1
/dev/disk/by-id/scsi-3600508b4001046910000800001110000-part1 /SAN                 reiserfs   defaults              1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part1 /boot                reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part2 /home                reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part1 /tmp                 reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part2 /u05                 reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part3 /var                 reiserfs   acl,user_xattr        1 2
/dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part4 swap                 swap       defaults              0 0
proc                            /proc                   proc            defaults                        0 0
sysfs                           /sys                    sysfs           noauto                          0 0
debugfs                         /sys/kernel/debug       debugfs         noauto                          0 0
usbfs                           /proc/bus/usb           usbfs           noauto                          0 0
devpts                          /dev/pts                devpts          mode=0620,gid=5                 0 0
RCWLO-ODS10g:/dev #
RCWLO-ODS10g:/dev # ls -lrt /dev/disk/by-id/scsi-3*
lrwxrwxrwx 1 root root  9 Oct  2 11:40 /dev/disk/by-id/scsi-3600508b40010554c0000800000b30000 -> ../../sdd
lrwxrwxrwx 1 root root  9 Oct  2 11:40 /dev/disk/by-id/scsi-3600508b4001046910000800001110000 -> ../../sde
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508b4001046910000800001110000-part1 -> ../../sde1
lrwxrwxrwx 1 root root  9 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901 -> ../../sda
lrwxrwxrwx 1 root root  9 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509 -> ../../sdb
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part3 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e000000000b855ee6ec6289509-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct  2 11:40 /dev/disk/by-id/scsi-3600508e0000000004d55ca66b1287901-part1 -> ../../sda1

Code:
 
RCWLO-ODS10g:/dev # ls sd*
sda  sda1  sda2  sda3  sda4  sdb  sdb1  sdb2  sdb3  sdc  sdc1  sdd  sde  sde1  sdf  sdg
RCWLO-ODS10g:/dev #

I don't beleive sdf and sdg are being used but after the reboot will I see sdh and sdi? How can I see if sdf and sdg are being used. If they were I am assuming I would see sdf1 and sdg1 for the partitions.

Sorry if these are elementary questions. I appreciate your time in helping me with this.

Thanks
# 4  
Old 11-22-2010
You do not have to reboot for the disks to be seen. You can either get the script called "rescan-scsi-bus.sh" from the web here:
http://www.garloff.de/kurt/linux/res...si-bus.sh-1.25

or try this:

Code:
for i in /sys/class/scsi_host/host*; do; echo "- - -" > /sys/class/scsi_host/$i/scan;
done;

I would try the script (make sure you run a chmod +x) and run the script like this
Code:
chmod +x rescan-scsi-bus.sh
./rescan-scsi-bus.sh -l -w -c

Now... for Oracle, if it will be for ASM it will still require a partition. You should learn some of the commands for fdisk from here:

fdisk(8): Partition table manipulator for - Linux man page

and then create the associated partitions, but not put any file systems on them. If by backup, you mean dumps of the tables, then you will need a filesystem

mkfs.<filesystemtype> should get you started. Many people use ext3, but any number of file system types should work, such as jfs, xfs, etc.

How to: Formatting Linux Filesystem

Based on the output, it appears you are running SUSE, is this correct? Yast would help you with a lot of this if you are.

---------- Post updated at 01:38 PM ---------- Previous update was at 01:36 PM ----------

Also, since you are using SAN based storage, and probably using some sort of multi-pathing (SANs, by the way they work, tend to show you multiple paths to the storage, and the operating system confuses them with actual drives), you should reference your drives like they are in /etc/fstab

Using either devmapper or /dev/disk/by-id rather than the sd? designation.
# 5  
Old 11-24-2010
From the lists you provide, merely by comparing the output of your ls command with the contents of the fstab file you included, it appears to me that the new disk is sdd, since it has no partitions on it, and it is not covered by fstab (and consequently, I assume it is not in use). I cannot see he second new disk there.
of course, sdf and sdg are also new disks. They don't appear in the SCSI list for some reason.

You can use the fdisk program to look at each of these disks. You can see their size and the partitions created on them (if any).

Simply do (as a superuser): fdisk /dev/sdf (or sdg or sdd)
At the prompt type "p" to print the structure of the disk. You will be able to see its size and also any partitions created on it. I hope this information is sufficient for you to recognize the two new disks.

to exit the program type "q" at the prompt.
# 6  
Old 11-29-2010
K we ended up needing to reboot the box anyway and now here is what I see:

Code:
 
RCWLO-ODS10g:/dev # ls sd*
sda  sda1  sda2  sda3  sda4  sdb  sdb1  sdb2  sdb3  sdc  sdc1  sdd  sdd1  sde

definitely different from what I saw last week so now I'm not sure what disk is showing up and what the 2 new disks are.

I tried doing:

Code:
 
RCWLO-ODS10g:/dev # fdisk /dev/sde
Unable to open /dev/sde

Any assistance would be appreciated.

Thanks

---------- Post updated at 09:54 AM ---------- Previous update was at 09:17 AM ----------

Also noticed that the SAN mount is on sdd now:

Code:
 
RCWLO-ODS10g:/dev # df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb3             98523580  54541540  43982040  56% /
udev                  40973400       164  40973236   1% /dev
/dev/sdd1            1373587836 1143516980 230070856  84% /SAN
/dev/sda1               104376     41280     63096  40% /boot
/dev/sda2             20972152   7265444  13706708  35% /home
/dev/sdb1             33558712     66024  33492688   1% /tmp
/dev/sdb2             10490104   8796552   1693552  84% /u05
/dev/sda3             15735128    330820  15404308   3% /var

Can I assume that the sde is the new disk?
# 7  
Old 11-29-2010
Run fdisk -l. It will show the capacities of the disks to help you pin it down more absolutely.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Mounting Windows Share to Linux Server

Hi Folks - I need to mount a Windows Share to a Linux server. What is the best/easiest way to do this? Is this 'how-to' guide accurate: How to Share Files Between Windows and Linux Or is there a better method you could share? Thanks! (8 Replies)
Discussion started by: SIMMS7400
8 Replies

2. Linux

Mounting windows drive into linux server

Dear Experts, My buissness requierment is to place some automated files in Windows server, Now Can you help me to map the Windows folder into Linux server. Windows Details:-windows 2003 Linux Details:- $ uname -a Linux testdb.mawarid.local 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007... (3 Replies)
Discussion started by: Mohammed Fareed
3 Replies

3. Ubuntu

Mounting a disk clone

I wasn't sure where to put this thread but since i use ubuntu for data recovery, I figured this is the best place. So, a friend passed me a 250G Western Digital hard disk the other day and said that his client needs to get her pictures off it. the problem: windows says it wants to reformat the... (13 Replies)
Discussion started by: old noob
13 Replies

4. Solaris

Mounting a Raw Disk

I am using Solaris 10. I have a raw device attached to my system which is /dev/md/rdsk/d91 I want to mount this as a disk with file system on a mount point /u05. Actually this raw device was earlier part of Oracle ASM. Now I have removed this disk from ASM, and want to use it as normal... (3 Replies)
Discussion started by: fahdmirza
3 Replies

5. UNIX for Advanced & Expert Users

Mounting SunSolaris Filesystem on Linux Ubuntu Server

Can someone please help me out here. I have SunSolaris server that has a ridiculous about of space on it. several hundred gigabytes of space. There are lots of partitions on this server that has at least 100Gs on them. I want to mount just one of these partitions on my Linux server so I can... (4 Replies)
Discussion started by: SkySmart
4 Replies

6. Solaris

Mounting disk at boot

Hi once more :p Yesterday I reinstalled Solaris OS and now I can not mount pcfs HDD SunOS unknown 5.10 Generic_142901-03 i86pc i386 i86pc and what has been added in /etc/vfstab is /dev/dsk/c1t0d0p1:c - /podaci - pcfs - yes rw But as I said , my disk is... (4 Replies)
Discussion started by: solaris_user
4 Replies

7. AIX

mounting aix disk under different OS

hi, is that possible? i installed one disk of a old rs/6000 in a linux machine. the problem seems to be the partition layout. linux fdisk tells me that aix disklabels are not supported, so the problem seems to be the partition layout, not the filesystem. does anybody know a way to access... (1 Reply)
Discussion started by: alex.blackbit
1 Replies

8. Shell Programming and Scripting

IInd Hard Disk Mounting Problem on 1st HDD On SCO UNIX Open Server

Hi Engg. ! :mad: I have a harddisk on which SCO UNIX Open Server was installed. There was some data (in .dbf format) on it. Present condition of HDD is that it is not booting. Now I want to mount this HDD through other HDD on which SCO UNIX Open Server is installed by attaching... (0 Replies)
Discussion started by: Niraj Gopal Sha
0 Replies

9. Filesystems, Disks and Memory

Mounting second disk

I have connected up second hard drive to my Sparcstation5, touched /reconfigure. and now would like to know how to mount the hard drive. I am trying to access /etc/passwd file on second disk to change root passwd but after connecting drive; touching reconfigure. don't know how to go about accessing... (2 Replies)
Discussion started by: FattyLumpkin
2 Replies

10. UNIX for Dummies Questions & Answers

mounting disk problem

i am using Interactive Unix 4.1.1 and i have a disk from a another unix machine which is Unix Slackware 2.1 i'm having problem mounting the disk. it gives me an error message, ??? is there any solution to this ??? it say the disk has invalid file system (1 Reply)
Discussion started by: mharck29
1 Replies
Login or Register to Ask a Question