Re: How to get a disk's partition table in a non-interactive way ?
From: Darren Dunham (ddunham_at_redwood.taos.com)
Date: 05/26/03
- Next message: Ken Gray: "Re: New Solaris 8 release - HW 12/02"
- Previous message: Matty: "Re: What is this mean "interrupt level 6 not serviced" ?"
- In reply to: stefan: "Re: How to get a disk's partition table in a non-interactive way ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 26 May 2003 18:00:44 GMT
stefan <schms@web.de> wrote:
>> > PS: I know
>> > /usr/sbin/prtvtoc /dev/rdsk/c1t0d0s2
>> > but its output does not meet my needs.
>>
>> Can I ask why? It would probably be easier to modify that data than
>> guarantee that you'll do the right thing with format.
> I would like to have the follwing information as I need it in case of
> desaster incident during the recovery process of a system. In this
> process I use a FLASH archive which is a system image (only /, /var,
> /opt/ ) and which is regularly created. When I restore this system
> image ( boot from cdrom, select a flash installation, select the FLASH
> archive with the system image)I am being asked to key in the disk
> layout. That is why I need this information ( partition, Size in GB )
But prtvtoc has all that information, yes?
Is all you need the number in prtvtoc converted from blocks to
gigabytes?
Here's a perl one liner... It could be modified to present other
information, or information in a different format.
# prtvtoc /dev/rdsk/c0t0d0s0 | perl -lane 'next if /^\*/; $gb = $F[4] / (1024 * 1024 * 2) ; printf ("%u %5.2f %s\n", $F[0], $gb, $F[6]); '
The information is "slice#, size(GB), mountpoint".
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
- Next message: Ken Gray: "Re: New Solaris 8 release - HW 12/02"
- Previous message: Matty: "Re: What is this mean "interrupt level 6 not serviced" ?"
- In reply to: stefan: "Re: How to get a disk's partition table in a non-interactive way ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|