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 4. (Note: This reboots the box) 5. 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) 6. 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 6. or /sbin/lsmbstartup 7. for lsm 8. sizer -n DECS01 9. diff /tmp/DECS01 /usr/sys/conf/DECS01 10. look for lines for new devices (something like 11. >device disk re5 at xcr0 drive 5 12. ) 13. edit /usr/sys/conf/DECS01 to add new statements shown by diff 14. /usr/sbin/doconfig -c DECS01 15. to regen the kernel 16. mv /usr/sys/DECS01/vmunix /vmunix 17. 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) 18. If the devices don't show up, use MAKEDEV to create them e.g. cd /dev ./MAKEDEV re5 re6 19. Use diskconfig 20. 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
- voldg list - displays disk groups
- voldg free - displays free space in disk group
- volprint - show lsm setup details
- volassist make volume_name length - create volumes
e.g. volassist make voldef 10m - makes a 10Mb volume called voldef
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 3. e.g. re0 4. If data present on disk, get the option to encapsulate (i.e. preserve data). Enter y to encapsulate, n to initialise. 5. enter diskgroup 6. disk to be added into 7. enter diskname 8. and confirm 9. volassist make volume_name length (diskname) 10. For AdvFS; mkfdmn /dev/disk_group_name/volume_name domain 11. mkfset domain fileset_name 12. mount domain#fileset_name mountpoint
Still stuck? Maybe we can help. Contact us at Upwork
Never miss a thing subscribe to our newsletter
or follow us on twitter
For more super cool techie stuff check out our blog!!
Recent Changes
Contribute to this wiki
Why not help others by sharing your knowledge? Contribute something to this wiki and
join out hall of fame!
Contact us for a user name and password