Diff for /wikisrc/guide/lvm.mdwn between versions 1.3 and 1.4

version 1.3, 2013/03/21 11:11:21 version 1.4, 2015/06/19 19:18:31
Line 90  This example features a LVM setup on Net Line 90  This example features a LVM setup on Net
  7. **Snapshots**   7. **Snapshots**
   
         A facility provided by LVM is 'snapshots'. Whilst in standard NetBSD, the          A facility provided by LVM is 'snapshots'. Whilst in standard NetBSD, the
         [fss(3)](http://netbsd.gw.com/cgi-bin/man-cgi?ffs+3+NetBSD-current) driver          [[!template id=man name="fss" section="3"]] driver
         can be used to provide file system snapshots at a file system level, the          can be used to provide file system snapshots at a file system level, the
         snapshot facility in the LVM allows the administrator to create a logical          snapshot facility in the LVM allows the administrator to create a logical
         block device which presents an exact copy of a logical volume, frozen at          block device which presents an exact copy of a logical volume, frozen at
Line 145  kernel and link it as statically linked  Line 145  kernel and link it as statically linked 
 If you do not want to rebuild your kernel only because of LVM support you can  If you do not want to rebuild your kernel only because of LVM support you can
 use dm kernel module. The devmapper kernel module can be loaded on your system.  use dm kernel module. The devmapper kernel module can be loaded on your system.
 To get the current status of modules in the kernel, the tool  To get the current status of modules in the kernel, the tool
 [modstat(8)](http://netbsd.gw.com/cgi-bin/man-cgi?modstat+8+NetBSD-current)  [[!template id=man name="modstat" section="8"]]
 is used:  is used:
   
     vm1# modstat      vm1# modstat
Line 159  is used: Line 159  is used:
     ptyfs           vfs     filesys 0       7852    -      ptyfs           vfs     filesys 0       7852    -
   
 You can use  You can use
 [modload(8)](http://netbsd.gw.com/cgi-bin/man-cgi?modload+8+NetBSD-current) to  [[!template id=man name="modload" section="8"]] to
 load the dm kernel module by issueing `modload dm`:  load the dm kernel module by issueing `modload dm`:
   
     vm1# modstat      vm1# modstat
Line 202  in `/dev/r{s,w}d*` Line 202  in `/dev/r{s,w}d*`
   
 You will probably want to remove any pre-existing disklabels on the physical  You will probably want to remove any pre-existing disklabels on the physical
 volume disks in the LVM. This can be accomplished in one of two ways with the  volume disks in the LVM. This can be accomplished in one of two ways with the
 [dd(1)](http://netbsd.gw.com/cgi-bin/man-cgi?dd+1+NetBSD-5.0.1+i386) command:  [[!template id=man name="dd" section="1"]] command:
   
     # dd if=/dev/zero of=/dev/rsd0d bs=8k count=1      # dd if=/dev/zero of=/dev/rsd0d bs=8k count=1
     # dd if=/dev/zero of=/dev/rsd1d bs=8k count=1      # dd if=/dev/zero of=/dev/rsd1d bs=8k count=1
Line 291  are stored in this header. Line 291  are stored in this header.
     # lvm pvcreate /dev/rwd1[ad]      # lvm pvcreate /dev/rwd1[ad]
   
 Status of physical volume can be viewed with the  Status of physical volume can be viewed with the
 [pvdisplay(8)](http://netbsd.gw.com/cgi-bin/man-cgi?pvdisplay+8+NetBSD-current)  [[!template id=man name="pvdisplay" section="8"]]
 command.  command.
   
     # lvm pvdisplay      # lvm pvdisplay
Line 308  can create Logical Volumes *partitions*. Line 308  can create Logical Volumes *partitions*.
  * `/dev/rwd1[ad]` is Physical Volume   * `/dev/rwd1[ad]` is Physical Volume
   
 The volume group can be later extended/reduced with  The volume group can be later extended/reduced with
 [vgextend(8)](http://netbsd.gw.com/cgi-bin/man-cgi?vgextend+8+NetBSD-current)  [[!template id=man name="vgextend" section="8"]]
 and  and
 [vgreduce(8)](http://netbsd.gw.com/cgi-bin/man-cgi?vgreduce+8+NetBSD-current)  [[!template id=man name="vgreduce" section="8"]]
 commands. These commands add physical volumes to VG.  commands. These commands add physical volumes to VG.
   
     # lvm vgextend vg0 /dev/rwd1[ad]      # lvm vgextend vg0 /dev/rwd1[ad]
     # lvm vgreduce vg0 /dev/rwd1[ad]      # lvm vgreduce vg0 /dev/rwd1[ad]
   
 The status of Volume group can be viewed with the  The status of Volume group can be viewed with the
 [vgdisplay(8)](http://netbsd.gw.com/cgi-bin/man-cgi?vgdisplay+8+NetBSD-current)  [[!template id=man name="vgdisplay" section="8"]]
 command.  command.
   
     # lvm vgdisplay vg0      # lvm vgdisplay vg0
Line 335  partitions` volumes. Line 335  partitions` volumes.
   
   
 Logical Volume can be later extended/reduced with the  Logical Volume can be later extended/reduced with the
 [lvextend(8)](http://netbsd.gw.com/cgi-bin/man-cgi?lvextend+8+NetBSD-current)  [[!template id=man name="lvextend" section="8"]]
 and  and
 [lvreduce(8)](http://netbsd.gw.com/cgi-bin/man-cgi?lvreduce+8+NetBSD-current)  [[!template id=man name="lvreduce" section="8"]]
 commands.  commands.
   
     # lvm lvextend -L+20M /dev/vg0/lv1      # lvm lvextend -L+20M /dev/vg0/lv1
Line 345  commands. Line 345  commands.
   
 *Note*: To shrink a lv partition you have to shrink filesystem before. See the  *Note*: To shrink a lv partition you have to shrink filesystem before. See the
 manpage of  manpage of
 [resize_ffs(8)](http://netbsd.gw.com/cgi-bin/man-cgi?resize_ffs+8+NetBSD-current)  [[!template id=man name="resize_ffs" section="8"]]
 for how to do this.  for how to do this.
   
 The status of Logical Volume can be viewed with the  The status of Logical Volume can be viewed with the
 [lvdisplay(8)](http://netbsd.gw.com/cgi-bin/man-cgi?lvdisplay+8+NetBSD-current)  [[!template id=man name="lvdisplay" section="8"]]
 command  command
   
     # lvm lvdisplay lv0/lv1      # lvm lvdisplay lv0/lv1

Removed from v.1.3  
changed lines
  Added in v.1.4


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb