Sponsored Content
Operating Systems Solaris Trouble creating a disk partition slice (EFI) Post 302938891 by selectstar on Thursday 19th of March 2015 07:04:23 PM
Old 03-19-2015
Trouble creating a disk partition slice (EFI)

Hi all,


I am using SPARC Solaris 11.1 with EFI labelled disks.
I am new to ZFS file systems and slightly stuck when trying to create a partition (slice) on one of my LUNs.

EFI labels use sectors and blocks and I am not sure how exactly it works.

From here I can try and create a partition but when I have to enter the Starting Sector, I get confused, as you can see from the below code.

I have tried to understand the sectors and so on, but cannot work out what sector I need to create from.

Any help would be greatly appreciated and/or info on sectors.


Code:
root@odb-grumpy:/# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c2d1 <NETAPP-LUN-820a-40.00GB>
          /virtual-devices@100/channel-devices@200/disk@1
       1. c2d2 <NETAPP-LUN-820a-20.00GB>
          /virtual-devices@100/channel-devices@200/disk@2
       2. c2d3 <NETAPP-LUN-820a-500.00MB>
          /virtual-devices@100/channel-devices@200/disk@3
Specify disk (enter its number): 2
selecting c2d3
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        inquiry    - show disk ID
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> p


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> p
Current partition table (original):
Total disk sectors available: 1007549 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector       Size       Last Sector
  0        usr    wm               256    491.86MB        1007582
  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           1007583      8.00MB        1023966

partition> 1
Part      Tag    Flag     First Sector       Size       Last Sector
  1 unassigned    wm                 0         0             0

Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting sector[1007583]:

 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

slice & partition???

:confused: Hello, What is the difference between slice and partition on Solaris world? Regards (4 Replies)
Discussion started by: XNOR
4 Replies

2. Solaris

EFI Disk labels on 3510 raid array

Hi Peeps, Can anyone help me an EFI lablel on a 3510 raid array that I cannot get rid of, format -e and label just asks you if you want to label it. Want an SMI label writing to it. Anyone got any ideas on how to remove the EFI label? Thanks in advance Martin (2 Replies)
Discussion started by: callmebob
2 Replies

3. Solaris

Installing using ZFS - need to remove EFI disk labels

What is the preferred way of doing this from a bare metal install? (3 Replies)
Discussion started by: LittleLebowski
3 Replies

4. Solaris

ZFS - whole disk Vs slice

we have a ZFS file system that was created as a pool of just one disk (raid on a SAN) when this was created it was done as a whole disk, and so EFI label. now we want to mount this file system into an LDOM. my understanding of how ldom's and disk works this is that we can only do this as a... (1 Reply)
Discussion started by: robsonde
1 Replies

5. Solaris

Partition overlaps another partition while creating new parition in solaris

hi all while formatting hard disk i am getting following error. Partition 1 ends at 266338338 It must be between 34 and 143374704. label error: EFI Labels do not support overlapping partitions Partition 8 overlaps partition 1. Warning: error writing EFI. Label failed. I have formatted the... (2 Replies)
Discussion started by: nikhil kasar
2 Replies

6. BSD

Find Partition/Slice UUID

I thought I had figured this out at one point, but I can't remember. Is there a way/command to get the UUIDs of a disk's partitions/slices in FreeBSD? Linux has the blkid command, which doesn't seem to be available. (2 Replies)
Discussion started by: AntumDeluge
2 Replies

7. Solaris

EFI disk labeling / understand the parition table / sectors not continue

Hi all, I have a EFI disk and it is use in zfs pool. partition> p Volume: rpool Current partition table (original): Total disk sectors available: 1172107117 + 16384 (reserved sectors) Part Tag Flag First Sector Size Last Sector 0 usr wm ... (8 Replies)
Discussion started by: javanoob
8 Replies
efi_alloc_and_init(3EXT)				    Extended Library Functions					  efi_alloc_and_init(3EXT)

NAME
efi_alloc_and_init, efi_alloc_and_read, efi_free, efi_write, efi_use_whole_disk - manipulate a disk's EFI Partition Table SYNOPSIS
cc [ flag ... ] file... -lefi [ library ... ] #include <sys/vtoc.h> #include <sys/efi_partition.h> int efi_alloc_and_init(int fd, uint32_t nparts, dk_gpt_t **vtoc); int efi_alloc_and_read(int fd, dk_gpt_t **vtoc); void efi_free(dk_gpt_t *vtoc); int efi_write(int fd, dk_gpt_t *vtoc); int efi_use_whole_disk(int fd); DESCRIPTION
The efi_alloc_and_init() function initializes the dk_gpt_t structure specified by vtoc in preparation for a call to efi_write(). It calcu- lates and initializes the efi_version, efi_lbasize, efi_nparts, efi_first_u_lba, efi_last_lba, and efi_last_u_lba members of this sturcture. The caller can then set the efi_nparts member. The efi_alloc_and_read() function allocates memory and returns the partition table. The efi_free() function frees the memory allocated by efi_alloc_and_init() and efi_alloc_and_read(). The efi_write() function writes the EFI partition table. The efi_use_whole_disk() function takes any space that is not contained in the disk label and adds it to the last physically non-zero area before the reserved slice (from slice 0 to slice 6 or unallocated space). The fd argument refers to any slice on a raw disk, opened with O_NDELAY. See open(2). The nparts argument specifies the number of desired partitions. The vtoc argument is a dk_gpt_t structure that describes an EFI partition table and contains at least the following members: uint_t efi_version; /* set to EFI_VERSION_CURRENT */ uint_t efi_nparts; /* number of partitions in efi_parts */ uint_t efi_lbasize; /* size of block in bytes */ diskaddr_t efi_last_lba; /* last block on the disk */ diskaddr_t efi_first_u_lba; /* first block after labels */ diskaddr_t efi_last_u_lba; /* last block before backup labels */ struct dk_part efi_parts[]; /* array of partitions */ RETURN VALUES
Upon successful completion, efi_alloc_and_init() returns 0. Otherwise it returns VT_EIO if an I/O operation to the disk fails. Upon successful completion, efi_alloc_and_read() returns a positive integer indicating the slice index associated with the open file descriptor. Otherwise, it returns a negative integer to indicate one of the following: VT_EIO An I/O error occurred. VT_ERROR An unknown error occurred. VT_EINVAL An EFI label was not found. Upon successful completion, efi_write() returns 0. Otherwise, it returns a negative integer to indicate one of the following: VT_EIO An I/O error occurred. VT_ERROR An unknown error occurred. VT_EINVAL The label contains incorrect data. Upon successfully completion, efi_use_whole_disk() returns 0. Otherwise, it returns a negative integer to indicate one of the following: VT_EIO An I/O error occurred. VT_ERROR An unknown error occurred. VT_EINVAL The label contains incorrect data. VT_ENOSPC Space out of label was not found. USAGE
The EFI label is used on disks with more than 1^32-1 blocks. For compatibility reasons, the read_vtoc(3EXT) and write_vtoc() functions should be used on smaller disks. The application should attempt the read_vtoc() or write_vtoc() call, check for an error of VT_ENOTSUP, then call the analogous EFI function. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
fmthard(1M), format(1M), prtvtoc(1M), ioctl(2), open(2), libefi(3LIB), read_vtoc(3EXT), attributes(5), dkio(7I) SunOS 5.11 8 May 2008 efi_alloc_and_init(3EXT)
All times are GMT -4. The time now is 04:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy