Tables G-10 and G-11 show differences in Linux and Solaris logical volume management and configuration tasks.
Table G-10. [*] Logical Volume Management
Volume Management Task | Solaris | Linux |
---|
Initialize a disk for VM | Create partition area/size: metainit | Create partition area/size: pvcreate mkraid, mdadm |
Create a volume or volume group (VG) | metainit volumename raidtype devices... | lvcreate LVname vgcreate VGname devicename mkraid, mdadm |
Enable the volume or volume group | N/A | lvchange -a y LVname vgchange -a y VGname raidstart |
Disable the volume or volume group | N/A | lvchange -a n LVname vgchange -a n VGname raidstop, mdadm |
Delete the volume or volume group | metaclear | lvremove LVname vgremove VGname |
Add a device to the volume or volume group | metattach or metainit | lvextend LVname vgextend VGname newdevname |
Delete a device from the volume or volume group | metadetach | lvreduce LVname vgreduce VGname devicename raidreconf |
Create a soft partition or logical volume (no RAID) | metainit -p | lvcreate -Lsize -nLVname VGname |
Create a soft partition or logical volume (RAID 0) | metainit with RAID 0 on devices first, and then metainit -p to create the soft partition volume | lvcreate -iNumOfStripes -IStripeSize -nLVname VGname mdadm, mkraid |
Create a soft partition or logical volume on a specific device | Same as above, but the second metainit -p has the device name at the end of the command line | Same as above, but add the device name to the end of the command line |
Delete a soft partition or logical volume | metaclear | lvremove /dev/VGname/ LVname raidreconf |
Extend a volume or logical volume | metattach volume [size or devicename] | lvextend -Lsize /dev/VGname/LVname raidreconf |
Extend a file system after volume has been grown | growfs | Red Hat ext2/ext3: resize2fs SUSE ext2: resize2fs Red Hat reiser: resize_reiserfs Note: View the man pages for unmount requirements, and check whether the online version is available. |
Reduce a volume or logical volume | metadetach Volname devicename | ext2: resize2fs lvreduce reiser: resize_reiserfs lvreduce Note: View the man pages for unmount requirements. |
Table G-11. [*] Logical Volume Management Commands
Volume Management Task | Solaris | Linux |
---|
Set up or display metadb | metadb | vgdisplay, lvdisplay, lsraid |
Display metadevice status | metastat | vgdisplay, lvdisplay cat /proc/mdstat |
Initialize raw devices to metadevices | metainit | pvcreate |
Attach metadevices | metattach | vgchange, lvchange |
Detach metadevices | metadetach | vgchange, lvchange |
Clear and remove metadevices | metaclear | vgremove, lvremove |
Replace a metadevice | metareplace | raidreconf |
Rename a volume | metarename | raidreconf |
Check metadevice ID configuration | metadevadm | mdadm |
Manage hot spares | metahs | mdadm, raidhotadd, raidhotremove |
Set submirrors offline | metaoffline | mdadm |
Set submirrors online | metaonline | mdadm |
Change volume parameters | metaparam | vgchange, lvchange |
Back up volume group metadata | N/A | vgcfgbackup |
Recover soft partition configuration information | metarecover | vgcfgrestore |
Set up root filesystem for mirroring | metaroot | N/A |
Administer disk sets for sharing | metaset | N/A |
Resynchronize volume during reboot | metasync | N/A |
Expand a filesystem size | growfs | vgextend, lvextend, resize2fs, resize_ reiserfs, raidreconf |
Start up the kernel metadevice modules | /etc/system | N/A |
Set the default number of available volumes | /kernel/drv/md.conf | /etc/sysconfig/lvm /etc/raidtab |