Partitioning hard disk. Want 8 slices...have 9


 
Thread Tools Search this Thread
Operating Systems Solaris Partitioning hard disk. Want 8 slices...have 9
# 1  
Old 05-27-2010
Partitioning hard disk. Want 8 slices...have 9

Hi all

I'm having difficulty setting up a proper disk structure on a 72GB HDD. The drive was previously part of a zfs pool. The zpool has ben destroyed and now I want to use the disk in a raid 5 array. I need to partition the disk accordingly though.
This is what the partition table currently looks like:

Code:
Part      Tag    Flag     First Sector         Size         Last Sector
  0        usr    wm                34       68.36GB          143358320
  1 unassigned    wm                 0           0               0
  2 unassigned    wm                 0           0               0
  3 unassigned    wm                 0           0               0
  4 unassigned    wm                 0           0               0
  5 unassigned    wm                 0           0               0
  6 unassigned    wm                 0           0               0
  8   reserved    wm         143358321        8.00MB          143374704

I want it to look like this:

Code:
Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0 -    18       94.41MB    (19/0/0)       193344
  1       root    wu       0                0         (0/0/0)             0
  2     backup    wm       0 - 14086       68.35GB    (14087/0/0) 143349312
  3 unassigned    wu      19 -  2698       13.00GB    (2680/0/0)   27271680
  4 unassigned    wu    2699 -  8057       26.00GB    (5359/0/0)   54533184
  5 unassigned    wu    8058 - 11973       19.00GB    (3916/0/0)   39849216
  6        var    wm   11974 - 14034       10.00GB    (2061/0/0)   20972736
  7 unassigned    wu   14035 - 14086      258.38MB    (52/0/0)       529152

How do I get the disk to have slice 0-7 as the one I want it to look like?

Smilie
# 2  
Old 05-27-2010
quick question, where did the partition info come from for the drive that you want it to look like? was it on the same system?

if so you could use:

prtvtoc /dev/rdsk/cXtXdXs2 | fmthard -s - /dev/rdsk/cXtXdXs2

where the first target is the source disk and the other the disk you want to partition.

Similar commands (just a few extra steps) would be needed if the source partition info was on another machine.

if it was from a book or something - then it's manual partitioning :-)

Last edited by Celtic_Monkey; 05-27-2010 at 10:17 AM..
# 3  
Old 05-27-2010
Quote:
Originally Posted by Celtic_Monkey
quick question, where did the partition info come from for the drive that you want it to look like? was it on the same system?

if so you could use:

prtvtoc /dev/rdsk/cXtXdXs2 | fmthard -s - /dev/rdsk/cXtXdXs2

where the first target is the source disk and the other the disk you want to partition.
Both disks are on the same system yes. I have already tried the prtvtoc and fmthard commands but to no avail..
# 4  
Old 05-27-2010
Quote:
Originally Posted by DNT
Both disks are on the same system yes. I have already tried the prtvtoc and fmthard commands but to no avail..
why? what's the error message? - the usual issue with this is the RDSK path or the C0... target!

post the actual command you used!
# 5  
Old 05-27-2010
i just got a solution now from a colleague!
Use the "format -e" command.
Select the disk with slice 0-8.
Choose "label"
It will ask you for SMI or EFI.
Choose SMI.
Fixed!

Code:
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0                0         (0/0/0)             0
  1       swap    wu       0                0         (0/0/0)             0
  2     backup    wu       0 - 14086       68.35GB    (14087/0/0) 143349312
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6        usr    wm       0 - 14086       68.35GB    (14087/0/0) 143349312
  7 unassigned    wm       0                0         (0/0/0)             0

Now I can use the prtvtoc and fmthard commands Smilie

---------- Post updated at 03:24 PM ---------- Previous update was at 03:22 PM ----------

Quote:
Originally Posted by Celtic_Monkey
why? what's the error message? - the usual issue with this is the RDSK path or the C0... target!

post the actual command you used!
It did not give any error. It just didn't work.
# 6  
Old 05-27-2010
ah - so you should have had a corrupt label error in dmesg? did you check? ;-)

that was my next line of attack!
# 7  
Old 05-27-2010
Quote:
Originally Posted by Celtic_Monkey
ah - so you should have had a corrupt label error in dmesg? do you check? ;-)

that was my next line of attack!
there was no corrupt label, just an EFI label.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Which is a recommended method of partitioning Disk?

I m not sure if this is a right question to ask . During the installation of the OS, installation sw does partitioning for you. I m not quit sure if they have used parted or fdisk to partition the disk. (If they are using fdisk then you can't make partition > 2Tb )correct me if i m wrong.Also... (5 Replies)
Discussion started by: pinga123
5 Replies

2. Red Hat

Partitioning newly added disk to Redhat

Hi Everyone, I have added new Virtual disk to OS. The main point is I need to bring this whole Disk into LVM control, is it necessary to partition the disk using fdisk command and assign partition type as '8e', or can I directly add that disk into LVM, by running pvcreate command with out... (2 Replies)
Discussion started by: bobby320
2 Replies

3. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies

4. Red Hat

Disk partitioning commands for RHEL5

I'm new to Linux 5, going through initial phases of installation and setting up devices, etc,, and much to my surprise discovered also an existence of a 2nd hard drive to try to initialize and partition perhaps using any built-in command i.e. "fdisk" or similar, but I couldn't get the command to... (4 Replies)
Discussion started by: su
4 Replies

5. Solaris

mirroring root disk using svm - but no free slices for metadb's

Hi all, we have an existing system that was configured using just one of the (two) internal disks. I want to mirror the disk using SVM, but have realised there is no free slice for creating the metadb's. Is there a workaround I can use for this? In the past we have always kept slice 7 free -... (8 Replies)
Discussion started by: badoshi
8 Replies

6. Solaris

disk partitioning

Total disk size is 38912 cylinders Cylinder size is 32130 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === ... (2 Replies)
Discussion started by: seyiisq
2 Replies

7. UNIX for Dummies Questions & Answers

Resize root disk slices

I have a Sun box running Solaris 9. My root disk was slices too small when it was installed and I am now at 99% capacity for my root partition. Is it possible, and if so how?, to increase the size of slice 0 and decrease the size of slice 7?? Thanks! Current partition table... (6 Replies)
Discussion started by: FredSmith
6 Replies

8. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

9. UNIX for Dummies Questions & Answers

Hard Disk partitioning to use UNIX

Hello, To run UNIX, can the hard disk be partitioned so I could use that part for UNIX and the other for my existing Windows '98? At the moment there are hard drives C: & D:. Also, where can I obtain the UNIX software?.....Your response is appreciated. (2 Replies)
Discussion started by: hpin
2 Replies

10. UNIX for Dummies Questions & Answers

new disk slices

How do I create new disk slices taking space from an existing slice? Right now I have slice 6 (/usr) with 16G. I'd like to create slices 5 (/opt) and 7 (/export/home) and steal space from slice 6. Thanks (3 Replies)
Discussion started by: kmgrady01
3 Replies
Login or Register to Ask a Question