JFS/OnlineJFS Jan 2002
Erasing a file system
JFS/OnlineJFS
Remember that all data on an erased file system will be lost.
# umount <mountpoint>
# lvremove /dev/vgXX/lvolX
or newfs/mkfs on the concerning logical volume
Above information is not useful
=====================================================================================================
Features that are Treated Differently between JFS and
OnlineJFS
Extension of a file system
JFS Online JFS
# umount <mountpoint> # lvextend –L <n> /dev/vgXX/lvolX
# lvextend –L <n> /dev/vgXX/lvolX L <n> set new size of lvol to n MB
L <n> set new size of lvol to n MB
# extendfs –F vxfs /dev/vgXX/rlvolX # fsadm –F vxfs –b <n> <mountpoint>
# mount <mountpoint>
b <n> set new file system size to n KB
Reduction of a file system
JFS Online JFS
Before reduction a backup of the data must Only file systems which are multiple of 32
be done otherwise the data will be lost MB can be reduced online (it depends on the
# umount <mountpoint> allocated extent distribution). A backup
before execution is recommended
# lvreduce L <n> /dev/vgXX/lvolX
# fsadm –F vxfs –d –D –e –E
L <n> set new size of lvol to n MB <mountpoint>
# newfs –F vxfs /dev/vgXX/rlvolX d perform directory defragmentation
e perform extent defragmentation
# mount /dev/vgXX/lvolX <mountpoint>
# fsadm –F vxfs –b <n> <mountpoint>
15/18
JFS/OnlineJFS Jan 2002
b <n> set new file system size to n KB
# lvreduce –L <n> /dev/vgXX/lvolX
L <n> set new size of lvol to n MB
Enabling large file support
JFS Online JFS
# umount <mountpoint> # fsadm F vxfs o largefiles
# fsadm F vxfs o largefiles <mountpoint>
/dev/vgXX/rlvolX entry in /etc/fstab (example):
# mount F vxfs o largefiles /dev/vgXX/lvolX <mountpoint> vxfs
/dev/vgXX/lvolX <mountpoint> delaylog,largefiles 0 2
entry in /etc/fstab (example): check the largefile option:
/dev/vgXX/lvolX <mountpoint> vxfs # fsadm F vxfs <mountpoint>
delaylog,largefiles 0 2
check the largefile option:
# fsadm F vxfs <mountpoint>
Features Only Available for OnlineJFS
Defragmentation of a file system
OnlineJFS
# fsadm –F vxfs –d –D –e –E <mountpoint>
d performs a directory defragmention
D reports on directory fragtmention
e performs a file extent defragmentation
E reports on file extent fragmation
Using extent attributes
OnlineJFS
Extent attributes can be manipulate using setext
#setext –e <extentsize> r <reservationsize> f <flag> <file>
16/18
JFS/OnlineJFS Jan 2002
possible flags:
align: Specify that all extents must be aligned on extent_size boundaries relative
to the start of allocation units
chgsize: Immediately incorporate the reservation into the file and update the file's
on-disk inode with size and block count information that is increased to
include the reserved space.The space added to the file is not initialized
contig: Specify that the reservation must be allocated contiguously
noextend: Specify that the file may not be extended after the preallocated space is
used
noreserve:Specify that the reservation is not a persistent attribute of the file. Instead,
the space is allocated until the final close of the file, when any space not
used by the file is freed. The temporary reservation is not visible to
the user
trim: Specify that the reservation is reduced to the current file size after the last
close by all processes that have the file open
The extend Attributes can either be seen by the commands
#getext <filename>
or
#ls le
Creation of a snapshot
OnlineJFS
1) Creation of a snapshot LV and file systems (should be 10-20% of the snapped file
system):
# lvcreate –L 80 –n lvsnap vgXX
L size of lvol
n name of lvol
# mount –F vxfs –o snapof=/org_vol /dev/lvsnap /aux_dir
/org_vol = file system, which has to backed up
/aux_dir = auxiliary directory for mounting snapshot
2) Backup from snapshot file system
# cd /aux_dir
# tar cvf /dev/rmt/0m or
# find . | cpio –ocvx >/dev/rmt/0m
3) Umount the snapshot
17/18