Sponsored Content
Full Discussion: Script to label a disk
Operating Systems Solaris Script to label a disk Post 302761121 by prashant2507198 on Friday 25th of January 2013 06:07:10 AM
Old 01-25-2013
Thanks. fmthard is an alternative.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cannot label disk when partitions are in use as described

:confused: Hello, In my Solaris system, I want to resize my mounted home directory slice. 1.I unmount the slice, #umount /export/home 2.Resize the directory #format>partition> 3.#format>label 4.#format>Cannot label disk when partitions are in use as described. So, How can label ? Thanks (2 Replies)
Discussion started by: XNOR
2 Replies

2. Solaris

Warning: No Disk Label

Hi Fellows, I am trying to mirror 2 identical disks on a SUN Ultra 10 machines (with new installation of Solaris 8). In the process, I found 2 issues: 1. prtvtoc /dev/rdsk/c0t0d0s0 | fmthard -s - /dev/rdsk/c0t1d0s0 Result: Disk partitions between the 2 disks do not match up. 2. manually... (2 Replies)
Discussion started by: o51974
2 Replies

3. Solaris

ZFS disk label missing

I 'm having problem in importing a zfs pool was getting error device missing and upon further digging found that labels on my disk for zpool are missing Does anyone know how to recover from it ? root@essapl020-u006 # zdb -l /dev/dsk/emcpower0c --------------------------------------------... (0 Replies)
Discussion started by: fugitive
0 Replies

4. Solaris

Help:"Bad checksum in disk label" and "Can't open disk label package"?

Hello, I'm brand new to Sun/Solaris. I have a Sun Blade 150, with SunOS 5.8. I wanted to make a backup to prevent future data loss, so I put the disk in a normal PC with Windows XP to try to make a backup with Norton Ghost, the disk was detected, but not the file volume, so I place the disk... (6 Replies)
Discussion started by: Resadija
6 Replies

5. UNIX for Dummies Questions & Answers

How to read a disk label?

Hi there, I'm wondering how to display a disk label (why not edit it but I don't need that yet). I found several commands on forums like disklabel and diskinfo but I can't find them on my system and don't know the package they belong to. Can you help me? Cheers Santiago (2 Replies)
Discussion started by: chebarbudo
2 Replies

6. Hardware

Unrecognized disk label of a external HD

I have a external HD that I can't seem to open. When I try to open it with gparted it says unrecognized disk. When I run gparted from the terminal this is what it says. ~ $ sudo gparted ====================== libparted : 2.2 ====================== /dev/sdb: unrecognised disk label When I... (18 Replies)
Discussion started by: cokedude
18 Replies

7. Solaris

label a slice on disk erorr

Hi there, I am trying to do root volume mirroring on SunFire V210 server. I have two disks in it.First one is c1t0do and second one is c1t1do. Both disks already have partitions in them so I am deleting the partitions of second disk(c1t1do) using format command and selecting cylinder start 0... (2 Replies)
Discussion started by: newbi8321
2 Replies

8. AIX

Need help manually assigning a disk volume label

I've managed to bork a volume label on a disk that's shared out via GPFS. There has to be a fairly simple dd command to rewrite the blocks in question, but I can't seem to dig up the information necessary anywhere I look. Any help would be greatly appreciated! Fri Feb 28 15:20:26 EST 2014:... (1 Reply)
Discussion started by: kneemoe
1 Replies

9. Hardware

Unrecognized disk label on my external HD

Hi everyone, I have an external hard drive and I accidentally deleted the partition table. Can I restore my files? If I try to run the f-disk command this is what it says Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units =... (1 Reply)
Discussion started by: Sampa
1 Replies

10. Solaris

Bad magic number in disk label.

This is first time post...found this forum when looking for possible solution to fix my sun pc. Just one day can't boot it already showing the following: Boot device: disk File args: Bad magic number in disk label Can't open disk label package Evaluating: boot Can't open boot device... (40 Replies)
Discussion started by: SHuKoSuGi
40 Replies
fmthard(1M)                                                                                                                            fmthard(1M)

NAME
fmthard - populate label on hard disks SYNOPSIS
SPARC fmthard -d data | -n volume_name | -s datafile [-i] /dev/rdsk/c? [t?] d?s2 fmthard -d data | -n volume_name | -s datafile [-i] /dev/rdsk/c? [t?] d?s2 The fmthard command updates the VTOC (Volume Table of Contents) on hard disks and, on systems, adds boot information to the Solaris fdisk partition. One or more of the options -s datafile, -d data, or -n volume_name must be used to request modifications to the disk label. To print disk label contents, see prtvtoc(1M). The /dev/rdsk/c?[t?]d?s2 file must be the character special file of the device where the new label is to be installed. On systems, fdisk(1M) must be run on the drive before fmthard. If you are using an system, note that the term ``partition'' in this page refers to slices within the fdisk partition on machines. Do not confuse the partitions created by fmthard with the partitions created by fdisk. The following options are supported: -d data The data argument of this option is a string representing the information for a particular partition in the current VTOC. The string must be of the format part:tag:flag:start:size where part is the partition number, tag is the ID TAG of the partition, flag is the set of permission flags, start is the starting sector number of the partition, and size is the number of sectors in the partition. See the description of the datafile below for more information on these fields. -i This option allows the command to create the desired VTOC table, but prints the information to standard output instead of modifying the VTOC on the disk. -n volume_name This option is used to give the disk a volume_name up to 8 characters long. -s datafile This option is used to populate the VTOC according to a datafile created by the user. If the datafile is "-", fmthard reads from standard input. The datafile format is described below. This option causes all of the disk par- tition timestamp fields to be set to zero. Every VTOC generated by fmthard will also have partition 2, by convention, that corresponds to the whole disk. If the input in datafile does not specify an entry for partition 2, a default partition 2 entry will be created auto- matically in VTOC with the tag V_BACKUP and size equal to the full size of the disk. The datafile contains one specification line for each partition, starting with partition 0. Each line is delimited by a new-line character ( ). If the first character of a line is an asterisk (*), the line is treated as a com- ment. Each line is composed of entries that are position-dependent, separated by "white space" and having the fol- lowing format: partition tag flag starting_sector size_in_sectors where the entries have the following values: partition The partition number. Currently, for Solaris SPARC, a disk can have up to 8 partitions, 0-7. Even though the partition field has 4 bits, only 3 bits are currently used. For , all 4 bits are used to allow slices 0-15. Each Solaris fdisk partition can have up to 16 slices. tag The partition tag: a decimal number. The following are reserved codes: 0 (V_UNASSIGNED), 1 (V_BOOT), 2 (V_ROOT), 3 (V_SWAP), 4 (V_USR), 5 (V_BACKUP), 6 (V_STAND), 7 (V_VAR), and 8 (V_HOME). flag The flag allows a partition to be flagged as unmountable or read only, the masks being: V_UNMNT 0x01, and V_RONLY 0x10. For mountable partitions use 0x00. starting_sector The sector number (decimal) on which the partition starts. size_in_sectors The number (decimal) of sectors occupied by the partition. You can save the output of a prtvtoc command to a file, edit the file, and use it as the datafile argument to the -s option. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ uname(1), format(1M), prtvtoc(1M), attributes(5) Only fdisk(1M), installgrub(1M) Special care should be exercised when overwriting an existing VTOC, as incorrect entries could result in current data being inaccessible. As a precaution, save the old VTOC. For disks under one terabyte, fmthard cannot write a VTOC on an unlabeled disk. Use format(1M) for this purpose. 11 Apr 2005 fmthard(1M)
All times are GMT -4. The time now is 08:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy