#lvdisplay /dev/vg01/lvol5

--- Logical volumes ---

LV Name

/dev/vg01/lvol5

VG Name

/dev/vg01

:

 

:

 

LV Size (Mbytes)

112

:

 

:

 

#extendfs -F vxfs -s 48648 /dev/evfs/vg01/rlvol5

#mount -F vxfs /dev/evfs/vg01/lvol5 /test5

#bdf /test5

Filesystem

kbytes

used

avail

%used

Mounted on

/dev/evfs/vg01/lvol5

 

 

 

 

 

 

113664

1141

105498

1%

/test5

Incorrect

When calculating the number of Kbytes available for the file system, the user does not reserve space for the EVFS EMD. The LVM is 112 Mbytes = 114688 Kbytes. The user attempts to increase the current file system size, 65016 Kbytes, by 49672 Kbytes to use all available space on the LVM for the file system (114688 – 65016 = 49672).

#extendfs -F vxfs -s 49672 /dev/evfs/vg01/rlvol5

#vxfs extendfs: New size (114688 blocks) beyond device capacity (114168 blocks).

LVM Example: Reducing Volume and File System Sizes

In the following sessions, the LVM volume is 112 Mbytes and the file system size is 113664 Kbytes. The administrator wants to decrease the size of the LVM volume to 64 Mbytes.

Correct

When calculating the number of Kbytes available for file system on a 64-Mbtye LVM volume, the user reserves 1 Mbyte for the EMD: 64 – 1 Mbytes = 63 * 1024 = 64512 Kbytes for the file system. The user reduces the size of the file system to 64512 Kbytes, then reduces the size of the LVM volume to 64 Mbytes.

#fsadm -F vxfs -b 64512 /test1

vxfs fsadm: /dev/evfs/vg01/rlvol5 is currently 113664 sectors - size will be reduced

#lvreduce -L 64 /dev/vg01/lvol5

When a logical volume is reduced useful data might get lost; do you really want the command to proceed (y/n) : y

Logical volume "/dev/vg01/lvol5" has been successfully reduced.

Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf

#cd /test1

#pwd /test1

Incorrect

The user does not reserve space for the EMD when calculating the number of Kbytes available for a file system on a 64-Mbyte LVM volume. The user reduces the size of the file system to 65536 Kbytes, (64 * 1024 Mbytes = 65536 Kbytes), then reduces the size of the LVM volume to 64 Mbytes. Subsequent operations on the file system might fail. Data might be lost or corrupted.

#fsadm -F vxfs -b 65536 /test1

vxfs fsadm: /dev/evfs/vg01/rlvol5 is currently 113664 sectors - size will be reduced

#lvreduce -L 64 /dev/vg01/lvol5

When a logical volume is reduced useful data might get lost; do you really want the command to proceed (y/n) : y

Logical volume "/dev/vg01/lvol5" has been successfully reduced.

Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf

#cd /test1

ksh: /test1: bad directory

98 Managing Data on EVFS Volumes

Page 98
Image 98
HP UX Encrypted Volume and Filesystem (EVFS) manual LVM Example Reducing Volume and File System Sizes, Incorrect