LSM and disks

Setting Up LSM

  1. install lsm

  2. initialise lsm using the volsetup utility

    e.g. /usr/sbin/volsetup rz1

    Note: If there are any problems with the disk label, diskconfig can be used to change the label and mark the disk as unused).

  3. encapsulate existing used disks using volencap and vol-reconfig

    e.g. /usr/sbin/volencap rz8 /sbin/vol-reconfig (Note: This reboots the box)

  4. Further disks/volumes can now be added using the GUI dxlsm or command line

    e.g. For GUI, Basic>Ops>UFS Operations>Create>Simple>complete details as required (for raw partitions select gen and mark Create filesystem to no)

  5. To add a new diskgroup use voldiskadd

    e.g. voldiskadd rz9

Adding a new disk

  1. copy current kernel, cp /vmunix /vmunixsave

  2. shutdown -h now

  3. add new disk

  4. boot -fi “genvmunix”

  5. ensure filesystem mounted either using /sbin/bcheckrc or /sbin/lsmbstartup for lsm

  6. sizer -n DECS01

  7. diff /tmp/DECS01 /usr/sys/conf/DECS01 look for lines for new devices (something like device disk re5 at xcr0 drive 5)

  8. edit /usr/sys/conf/DECS01 to add new statements shown by diff

  9. /usr/sbin/doconfig -c DECS01 to regen the kernel

  10. mv /usr/sys/DECS01/vmunix /vmunix

  11. shutdown -r now

    Devices should now be recognised by the system, e.g. if you do a diskconfg, they will show up . Can also check using uerf -R -r 300 (NOTE: The name DECS01 is an example, this file should be an uppercase version of your system name)

  12. If the devices don’t show up, use MAKEDEV to create them

    e.g. cd /dev ./MAKEDEV re5 re6

  13. Use diskconfig to create a disk label

Permissions for LSM

File permissions for raw devices shouldn’t be changed via the chmod/chown commands but using the lsm voledit command.

e.g.voledit -g sybdg set user=sybase master01

This will change volume master01 in diskgroup sybdg to have an owner of sybase

Some lsm commands

Example using command line

  1. If unused disk, check no partitions in use with diskconfig. Can mark all partitions to unused to ensure none active. (No need to partition the disk, voldiskadd does this for you. It creates a partition of most of the disk, type lsmpubl and a small lsm private partition for lsm use)

  2. voldiskadd device e.g. re0

  3. If data present on disk, get the option to encapsulate (i.e. preserve data). Enter y to encapsulate, n to initialise.

  4. enter diskgroup disk to be added into

  5. enter diskname and confirm

  6. volassist make volume_name length (diskname)

  7. For AdvFS; mkfdmn /dev/disk_group_name/volume_name domain

  8. mkfset domain fileset_name

  9. mount domain#fileset_name mountpoint