- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- fdisk to create LINUX partitions
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 06:34 AM
тАО01-11-2010 06:34 AM
Would it be possible or recommended to use fdisk on a disk device that's already being used by LVM (VGs, LVs etc.)? I still have 177.97 GB free in the PV /dev/cciss/c0d0p2.
Or am I in the danger of overwriting the OS and the filesystem and/or boot partition?
I need to create partitions using fdisk to use them for ASMLIB of Oracle 11g. I don't have HBA drivers installed to connect to our existing SANs or any additional disks to create additional devices.
The verify of fdisk shows 1757398544 unallocated sectors.
Print shows Disk /dev/cciss/c0d0p2: 899.7 GB, 899788055040 bytes
255 heads, 32 sectors/track, 215367 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 06:54 AM
тАО01-11-2010 06:54 AM
Re: fdisk to create LINUX partitions
>> that's already being used by LVM
Fdisk should not be used on LVM physical or logical volume groups, it has to be used before you vgcreate.
Instead of fdisk you should move over to using 'gnu parted', even then it is used before vgcreate.
LVM is a layer over the fdisk/parted sliced up partitions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 07:12 AM
тАО01-11-2010 07:12 AM
SolutionIf this is a system disk, then /dev/cciss/c0d0p1 is probably the /boot filesystem, which must be a regular fdisk-style partition so that BIOS and GRUB can understand it.
What does "fdisk -l /dev/cciss/c0d0" show?
Trying to partition /dev/cciss/c0d0p2 with fdisk would damage your LVM PV.
However, you *can* use "pvresize --setphysicalvolumesize xxG /dev/cciss/c0d0p2" to shrink the LVM PV to xx gigabytes, then use "fdisk /dev/cciss/c0d0" to shrink the partition to the same size (or to slightly greater size, just to be safe).
After that, you can create new partitions with "fdisk /dev/cciss/c0d0" using the now-free space. The new partitions would be c0d0p3 or greater.
It's also possible to use LVM logical volumes for ASM. Google found this discussion in the Oracle forums:
http://forums.oracle.com/forums/thread.jspa?messageID=3384186
(I don't have access to Metalink at the moment, but I think the Metalink reference at the last post of the above-mentioned thread might be useful.)
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 01:13 PM
тАО01-11-2010 01:13 PM
Re: fdisk to create LINUX partitions
1) You're right on partition2 and partition1.
I used on /dev/cciss/c0d0 - you're right - it didn't let me create a 3rd partition (because there are no allotted slots).
I did NOT go with using fdisk on p2 as it will damage it, like you said.
2) What does "fdisk -l /dev/cciss/c0d0" show?
Ravi: it shows both the partitions like I said above.
3) Trying to partition /dev/cciss/c0d0p2 with fdisk would damage your LVM PV.
Ravi - didn't partition with p2.
4) However, you *can* use "pvresize --setphysicalvolumesize xxG /dev/cciss/c0d0p2" to shrink the LVM PV to xx gigabytes, then use "fdisk /dev/cciss/c0d0" to shrink the partition to the same size (or to slightly greater size, just to be safe).
Ravi - this I didn't know as I wasn't comfortable shrinking pv (less risk), and partition (more risky with cylinders/headers and all). Anymore documentation on shrinking partition using 'fdisk'?
5)After that, you can create new partitions with "fdisk /dev/cciss/c0d0" using the now-free space. The new partitions would be c0d0p3 or greater.
Ravi - same as 4) above.
6) It's also possible to use LVM logical volumes for ASM. Google found this discussion in the Oracle forums:
Ravi: I have tried this in the past with little success. With Oracle 11gR2, it seems like it is much better - with oracleasm and all. Initially, it failed, but with right permissions on the LVOLs, I was able to 'createdisk' and create datagroup in ASM using off of LVOLASM (that is basically a LVOL).
Points assigned.
Thanks!
Ravi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2010 01:47 PM
тАО01-11-2010 01:47 PM
Re: fdisk to create LINUX partitions
Please let me explain the source of my confusion.
In the original message you said:
> Print shows Disk /dev/cciss/c0d0p2: 899.7 GB, 899788055040 bytes
> 255 heads, 32 sectors/track, 215367 cylinders
> Units = cylinders of 8160 * 512 = 4177920 bytes.
This is only the top three lines of a "fdisk -l" output. The actual list of partitions is not there. Also, "Disk /dev/cciss/c0d0p2" suggests something is not quite right...
I guess you copy/pasted the wrong output by mistake. Don't worry, it happens to the best of us :)
MK