/dev/shm is a device which is used for shard memory access. If you have added a hard disk to your system, I think you have mis-identified the device for the drive.
Looking at the output of dmesg
might be able to provide you with the proper device id for your disk. Typically this will be /dev/hd? or /dev/sd? for consumer disks.
The device is not something which you deal with directly - you should not copy files to /dev/sda for example.
Instead, you should partition the disk, format the partitions, and then mount them at some point in the filesystem. Partitions have devices in /dev/, with a number appended to the base device. For example, /dev/sdb2 is the second (primary type) partition on the drive /dev/sdb.
For example, let's say the new disk is /dev/sdb. The procedure you would be looking at would be something like this:
- NOTE: this procedure is not the right one if your system uses LVM - only for "traditional" filesystems.
- Backup, and make sure you have a working restore procedure.
- Shut down oracle and whatever else might be using files in /oradata/
- Use fdisk or cfdisk or gparted or some similar tool to create one or more partitions on the disk. Lets take the simplest option and create one primary partition of type ext3 - that partition will get the device node /dev/sda1
- format the new partition with:
- temporarily mount the new partition on /mnt. /mnt is used for mounting devices for a short time. As root:
mount /dev/sdb1 /mnt
- Copy the files to the new disk, mounted on /mnt.
cp -vdpr /oradata/* /mnt/
- Create a file to act as a flag to show you are using the new disk (see later step)
- un-mount the disk from /mnt:
- Edit the /etc/fstab adding a line so the new disk will be mounted at boot. Add a line like this:
/dev/sdb1 /oradata ext3 errors=remount-ro 0 2
- mount the disk, this time in the proper location. Since you have added a line in /etc/fstab, you should be able to do it like this:
- Check that /oradata now contains the data from the disk. Since you made the file "is_new_disk" a few steps ago, you should be able to see that in /oradata now.
After this procedure, you will have two copies of the /oradata files - one on the new disk which is accessible in the /oradata directory. The old copy of the files will still exists on whatever device they used to (I assume it is the root device, else the procedure above will not work properly). These old files will not be visible until you un-mount the new disk. I recommend leaving them there until you have done a careful test of the new setup. Only then should you consider deleting them. The procedure to delete the old files is like this:
- un-mount the new disk:
- Verify that you are looking at the old files (the "is_new_disk" file should have disappeared).
- Do the deletion. Be totally sure what is going on before doing this command:
- re-mount the new disk:
- All your files are OK, right? If not, get that backup out.