LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Patition disk on linux (https://www.linuxquestions.org/questions/linux-newbie-8/patition-disk-on-linux-4175480113/)

shubhamuddu 10-08-2013 11:59 PM

Patition disk on linux
 
Hello,

I want to partition disk for oracle asm configuration.
root@devtest ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 19G 3.5G 15G 20% /
/dev/sda14 313G 268G 29G 91% /u09
/dev/sda13 6.7G 1.3G 5.1G 20% /home
/dev/sda11 9.5G 978M 8.1G 11% /tmp
/dev/sda10 9.5G 2.8G 6.3G 31% /usr
/dev/sda9 19G 555M 18G 4% /var
/dev/sda8 19G 174M 18G 1% /opt
/dev/sda6 95G 37G 54G 41% /u05
/dev/sda5 95G 27G 63G 30% /u07
/dev/sda3 379G 145G 214G 41% /u06
/dev/sda2 379G 13G 347G 4% /u08
/dev/sda1 487M 33M 429M 8% /boot
tmpfs 7.7G 2.6M 7.7G 1% /dev/shm
none 7.7G 104K 7.7G 1% /var/lib/xenstored

And i have the above partition and do not have any /dev/sdb so how can acheive partitioning disks.
Please help me out.

Regards,
Shubha

pan64 10-09-2013 12:29 AM

/dev/sda is the first disk, /dev/sdb is the second. Probably you do not have two disks.

shubhamuddu 10-09-2013 12:49 AM

Hi

Can i partition /dev/sda6 once again..?

Regards,
Shubha

pan64 10-09-2013 12:54 AM

/dev/sda6 is one single partition, what would you like to do? split into several parts?

shubhamuddu 10-09-2013 01:01 AM

I want to partition it again and want to see that partition in df -h
And this partition i use to store data.

Can i use like the above. Please help.

pan64 10-09-2013 01:05 AM

Sorry, I do not really understand what do you plan to do. Can you please give us more detail!

shubhamuddu 10-09-2013 01:20 AM

Hi
I dont have additional disks to use, tried fdisk /dev/sda
as it says - No free sectors available.

so can i use the part of /dev/sda5 by partion it again..?

Am trying to configure oracle asm for 11g database by following the link http://spotdba.blogspot.in/2012/06/c...cle-11gr2.html Step 5 says partion disk for asm.

Suggest sometthing.

pan64 10-09-2013 01:28 AM

you can use that partition without partitioning again, just don't forget to save your important data (everything on that partition will be lost). Also you need to unmount it and remove it from fstab. oracleasm createdisk DISK1 /dev/sda5 will work.

Ztcoracat 10-09-2013 01:44 AM

Hi: shubhamuddu-;)

Hi: pan64!

In your output/readout I only see "sda" indicating that you have one HDD on that machine. I don't see another HDD from the output.
If you have a memory stick or external HDD it would show as "sdb" and a 3rd usb device would show as "sdc" so forth and so on.
So;....

Looking at this partition that you have on you hard disk drive-
Code:

/dev/sda5 95G 27G 63G 30% /u07
Yes, you can re-partition it.
First what ever you have on that partition you may want to back it up or put in on a memory stick or some other type of hardware (extern HDD or something before you manipulate it.

You can use G-parted to delete that partition and than create a new one and make the size of it whatever size you prefer.

Quote:

Can i partition /dev/sda6 once again..?
Yes, but you will have to do as I mentioned above. Unless you are not concerned about what's on that partition then you can go ahead and resize it-

For example lets say I have a HDD with 3 partitions-
- /dev/sda1 * Linux boot partition size 20 GB
- /dev/sda2 Linux root partition size 4 GB (gigabytes)
- /dev/sda3 Linux swap partition size 2 GB

Using G-pared I could click on and highlight the 20 GB partition and resize it to 24 GB if I wanted to.
However I would have to delete the 4 GB partiton before creating the 24 GB partition-- (just and example)

What distribution are you using?

shubhamuddu 10-09-2013 01:45 AM

To use it as asm disk why i have to unmount and remove it from fstab. Please clarify as am new to linux.

And also please let me know how to unmount it.

Thanks

pan64 10-09-2013 02:18 AM

umount /u07 will unmount that partition, but first save your important data located on /u07
/etc/fstab contains a line related to that partition (show us that file if you could not find it), that should be removed too.
The reason is: it is now mounted and used as filesytem and it will be used by oracle (therefore that filesystem will be lost)

shubhamuddu 10-09-2013 04:25 AM

Hi Thanks for the solution.

I have unmounted /dev/sda5, removed it from fstab and put the same entry in /etc/fstab and mounted back and restarted the system.
Now tried to execute the command oracleasm createdisk DISK1 /dev/sda5 says Unable to open device "/dev/sda5": Device or resource busy

pan64 10-09-2013 04:28 AM

yes, that's what I told you: umount that partition and remove it from fstab. You can either use it as a normal filesystem or for oracle database, but not for both.

pan64 10-09-2013 04:30 AM

just one more time: if you continue using that partition for oracle all the data on /u07 will be lost. Forever. There is no way to keep them, save it before continuing!

shubhamuddu 10-09-2013 05:27 AM

Hi

Thanks a lot. Its done and your saying previous data will be lost correct. And please confirm can i revert back to use it as a filesystem as before..?

But as asm disk whatever data am going to store will be retained correct.

Thanks,
Shubha


All times are GMT -5. The time now is 09:40 PM.