Configure_LSM
?p> initialize 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).
encapsulate existing used disks using volencap and vol-reconfig e.g.
/usr/sbin/volencap rz8
/sbin/vol-reconfig (Note: This reboots the box)
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)
To add a new diskgroup use voldiskadd e.g. voldiskadd rz9
Adding a new disk
copy current kernel, cp /vmunix /vmunixsave
shutdown -h now
add new disk
>>>boot -fi "genvmunix"
ensure filesystem mounted either using /sbin/bcheckrc or /sbin/lsmbstartup for lsm
sizer -n DECS01
diff /tmp/DECS01 /usr/sys/conf/DECS01 look for lines for new devices (something like device disk re5 at xcr0 drive 5)
edit /usr/sys/conf/DECS01 to add new statements shown by diff
/usr/sbin/doconfig -c DECS01 to regen the kernel
mv /usr/sys/DECS01/vmunix /vmunix
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)
If the devices don't show up, use MAKEDEV to create them e.g.
cd /dev
./MAKEDEV re5 re6
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
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:
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)
voldiskadd device e.g. re0
If data present on disk, get the option to encapsulate (i.e. preserve data). Enter y to encapsulate, n to initialise.
enter diskgroup disk to be added into
enter diskname and confirm
volassist make volume_name length (diskname)
For AdvFS:
mkfdmn /dev/disk_group_name/volume_name domain
mkfset domain fileset_name
mount domain#fileset_name mountpoint
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/