Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Slicing drives in zfs root jumpstart

109 views
Skip to first unread message

kartikvashishta108

unread,
Jun 7, 2009, 12:03:26 PM6/7/09
to
In jumpstart installation of a zfs root filesystem, is it required to
slice/partition the drives prior to the jumpstart installation?

http://docs.sun.com/app/docs/doc/819-5461/ggsez?a=view seems to
indicate that this is not something that may eb skipped. I'd rather,
for an unattended jumpstart, slice the drives during jumpstart....

Kartik Vashishta

ITguy

unread,
Jun 7, 2009, 1:28:47 PM6/7/09
to
> In jumpstart installation of a zfs root filesystem, is it required to
> slice/partition the drives prior to the jumpstart installation?

My experience is that the jumpstart will fail if the disk isn't
labelled first.

> http://docs.sun.com/app/docs/doc/819-5461/ggsez?a=viewseems to


> indicate that this is not something that may eb skipped. I'd rather,
> for an unattended jumpstart, slice the drives during jumpstart....

For a completely unattended install, you can label new disks with a
script that runs before the installer begins. Define the start script
in the Jumpstart "rules" file:

#Keyword Value Start Profile Finish
#--------------------------------------------------------------------------------------
any any label default
finish


Contents of the "label" script:
-------------------------------------------------------------------------------------------------------------
#!/bin/sh
#
# Jumpstart pre-install script to label new disks

# Find all attached disks
DISKS=`format</dev/null|grep c[0-9] | awk '{print $2}'`

# Label each disk - This won't hurt a disk that's already labelled
for DISK in ${DISKS}
do
printf "type\n0\nlabel\ny\n" | format -d ${DISK}
done
exit 0
-------------------------------------------------------------------------------------------------------------


A similar script exists to create hardware RAID mirrors:
http://www.sun.com/bigadmin/scripts/submittedScripts/which_disks.txt

kartikvashishta108

unread,
Jun 7, 2009, 2:45:33 PM6/7/09
to
On Jun 7, 11:28 am, ITguy <southa...@gmail.com> wrote:
> > In jumpstart installation of a zfs root filesystem, is it required to
> > slice/partition the drives prior to the jumpstart installation?
>
> My experience is that the jumpstart will fail if the disk isn't
> labelled first.
>
> >http://docs.sun.com/app/docs/doc/819-5461/ggsez?a=viewseemsto
> > indicate that this is not something that may eb skipped. I'd rather,
> > for an unattended jumpstart, slice the drives during jumpstart....
>
> For a completely unattended install, you can label new disks with a
> script that runs before the installer begins.  Define the start script
> in the Jumpstart "rules" file:
>
> #Keyword        Value           Start           Profile         Finish
> #--------------------------------------------------------------------------­------------

> any                 any              label           default
> finish
>
> Contents of the "label" script:
> ---------------------------------------------------------------------------­----------------------------------

> #!/bin/sh
> #
> # Jumpstart pre-install script to label new disks
>
> # Find all attached disks
> DISKS=`format</dev/null|grep c[0-9] | awk '{print $2}'`
>
> # Label each disk - This won't hurt a disk that's already labelled
> for DISK in ${DISKS}
>         do
>         printf "type\n0\nlabel\ny\n" | format -d ${DISK}
> done
> exit 0
> ---------------------------------------------------------------------------­----------------------------------

>
> A similar script exists to create hardware RAID mirrors:http://www.sun.com/bigadmin/scripts/submittedScripts/which_disks.txt

In this case, the drives are labelled. They may not be appropriately
partitioned. To allocate the entire disk capacity to the zfs root
install, do I need to, first, partition the drives so that, for
instance, partition 0 contains the 'whole" disk?

Kartik Vashishta

ITguy

unread,
Jun 7, 2009, 7:15:57 PM6/7/09
to
> In this case, the drives are labelled. They may not be appropriately
> partitioned. To allocate the entire disk capacity to the zfs root
> install, do I need to, first, partition the drives so that, for
> instance, partition 0 contains the 'whole" disk?

Once the disk has a valid label, the installer can alter it according
to the assigned Jumpstart profile. For ZFS, just use the "auto"
keyword to use the entire disk:

<Keyword> <Zpool name> <Zpool size> <swap size> <dump size> <Vdev(s)>
pool rpool auto auto
auto rootdisk.s0

0 new messages