storage management: mirrordisk/ux, online jfs introduction lvm striping mirror disk / ux – basics...
TRANSCRIPT
![Page 1: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/1.jpg)
Storage Management: MirrorDisk/UX, Online JFS
•Introduction
•LVM Striping
•Mirror Disk / UX – Basics
•Online Backups (lvsplit)
•Mirror Disk / UX – Advanced
•Mirrored Boot Devices
•Snapshots
![Page 2: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/2.jpg)
Introducing the Journal File System
Base Version Bundled
•Veritas Extended File System (VXFS)
•Fast fsck
•Extent-based allocation
•Enhanced mount options
On-line JFS Additional Features
•On-Line Defragmentation
•On-Line Backup – Snapshot
•On-Line Growth/Reduction
![Page 3: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/3.jpg)
Software Disk Striping
•When you use disk striping you create a Logical Volume that spans multiple disks, allowing successive blocks of logical extents to map to different disks.
•Valid stripe sizes are 4k, 8k. 16k, 32k, and 64k. The default size is 16k. You should match the stripe size with the block size of the file system (or a number evenly divisible by the stripe size).
•EG: If the planned block size for a filesystem is 16k, the stripe size should be 4, 8, or 16k.
•Note: You cannot use striping and mirroring on the same logical volume.
![Page 4: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/4.jpg)
Striping – Benefits and Costs
Benefits
•Data access performed over multiple disks simultaneously
•I/O can be balanced across interfaces
Costs
•Hardware failure on a single disk may result in loss of portions of many files
•Entire files must be restored, even though only a portion was lost
•Added complexity
•Maximizing the Benefits of Striping
![Page 5: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/5.jpg)
Maximizing the Benefits of Striping
•To maximize the benefits of striping it is best to spread the volumes across separate interfaces.
•Best performance results from a striped logical volume that spans similar disks
•Select the appropriate stripe size
•For HFS file systems match the block size.
•For JFS file systems, always use 64K stripes.
•For RAW data choose a size that matches the primary I/O size for the application.
•Creating Striped Logical Volumes
![Page 6: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/6.jpg)
Creating Striped Logical Volumes
lvcreate –i stripes –I stripe_size [-l | -L space] [-n name] VG
•-i number of disks to stripe across
•-I stripe size in kilobytes (4, 8, 16, 32, or 64)
•-l total space expressed in extents
•-L total space expressed in megabytes
•-n name of the logical volume
•EG: lvcreate –i 3 –I 8 –L 24 –n lvstripe /dev/vg01
![Page 7: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/7.jpg)
Implementing Mirroring
LogicalLE: 0
LE: 1
LE: 56
LE: 107
/home/fred/file1
filesystem
LVM
Physical
PV0PE:0
PV1PE:0
![Page 8: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/8.jpg)
Mirrored I/O Scheduling
Access PV with lowest outstanding I/Os
Read in PV order
Schedule writes inPV order.
Shedule writessimultaneously to all PVs
Parallel Sequential
READ
WRITE
I/O
LE 47
PE 93, PV0 PE 107, PV2 PE 606, PV1
![Page 9: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/9.jpg)
Protecting from Disk FailurePV0 PV1 PV2
Mirrored I/O
•PV0 Scheduled - returned
•PV1 Scheduled - returned
•PV2 Scheduled, returned – retry – unavailable
•High priority write of PV status to VGRA on all available pvs.
![Page 10: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/10.jpg)
Mirrored Write Cache
•Tracking of pending I/O is done in a cache called Mirrored Write Cache (MWC). The MWC holds the status of write I/Os to a relatively large areas of a logical volume called Logical Track Groups (LTG). When a write I/O is scheduled it is resolved onto the LTG it affects. This entry in the cache is marked dirty.
•The I/O is scheduled, and when it completes the I/O is marked clean.
•The MWC can be turned off
•Provides a runtime performance gain
•Mirror resync takes longer
•At volume group activation if MWC is off then /usr/sbin/nomwcsyncd is started to do a background mirror resync
•You can never run this manually, if necessary deactivate and reactivate the volume group.
![Page 11: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/11.jpg)
LVM Commands for Mirroring
lvcreate [–m copies] [-L size in MB] VG
lvextend [-m copies] LV PV
lvreduce [-m copies] LV PV
lvdisplay –v LV
•You may have 0, 1, or 2 copies of any given logical volume
![Page 12: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/12.jpg)
LVM Commands for Synchronization
lvsync LV
vgsync VG
•Resynchronizes from one copy to make all mirror copies consistent
•Automatically done when a volume group that is not currently active, is activated.
•Rarely done manually.
![Page 13: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/13.jpg)
Online Backups
•In this example you see lvol2 is mirrored with one copy on PV0 and one on PV1.
•A lvsplit operation will freeze the mirror copy and create a ‘backup’ logical volume which points to it.
•This can now be mounted and used while activity continues on the other PV.
•If you have three mirrors when you do this, you can take the backup while continuing to have data protection for the active volume.
•Once a backup has completed you can use the lvmerge command to resynchronize the mirrors.
PV0
PV1
lvol2
lvol2b PV1
PV0lvol2
![Page 14: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/14.jpg)
Base JFS / Online JFS
Base JFS Online JFS
Online Backup not possible online, snapshot
Extending fs offline, extendfs online, fsadm
Reducing fs not possible online, fsadm
Defragmenting fs not possible online, fsadm
Fast recovery fsck yes yes
![Page 15: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/15.jpg)
fsadm
fsadm –F vxfs [-d] [-D] [-e] [-E] /mountpoint_dir
•fsadm-options:
-F vxfs specifies the journaled filesystem
-d Performs a directory defragmentation
-D Report on directory fragmentation
-e Performs a file extent defragmentation
-E Report on file extent fragmentation
•Regains lost performance
•Should be periodically used (between once a day and once a month)
•Can be done manually or scheduled with a cron-job
•The optimization runs online on a mounted JFS file system
![Page 16: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/16.jpg)
Resizing
IncreaseLogicalVolume
IncreaseFilesystem
ReduceFilesystem
ReduceLogicalVolume
![Page 17: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/17.jpg)
Increasing an Online JFS filesystem
•Extend the logical volume to the needed size:
# lvextend –L new_size lvol_name
The value of new_size is given in megabytes!
•Extend the JFS filesystem online:
# fsadm –F vxfs –b new_size /mountpoint
The value of new_size is given in kilobytes!
•Check the size of the increased file system:
# bdf
![Page 18: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/18.jpg)
Reducing an Online JFS filesystem
•Reorganize directories/file extents:
# fsadm –F vxfs –d –D –e –E /mountpoint
•Reduce the JFS file system online:
# fsadm –F vxfs –b new_size /mountpoint
The value of new_size is given in kilobytes!
•Reduce the logical volume to the needed size:
# lvreduce –L new_size lvolname
The value of new_size is given in megabytes!
•Verify the size of the reduced file system:
# bdf
![Page 19: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/19.jpg)
Online Backup via Snapshot
Original File system Snapshot File system
Process writes data
Buffer Cache
1
2
Original BlockNew Block
Copy of originalblock
3
/mountpoint
/snapshot_mnt
![Page 20: Storage Management: MirrorDisk/UX, Online JFS Introduction LVM Striping Mirror Disk / UX – Basics Online Backups (lvsplit) Mirror Disk / UX – Advanced](https://reader036.vdocuments.net/reader036/viewer/2022082414/5697bffb1a28abf838cc0f6f/html5/thumbnails/20.jpg)
Creating a snapshot
•Create a snapshot
# mount –F vxfs –o snapof=/orig_vol /aux_vol /aux_dir
/orig_vol file system, which you want to take a snapshot of/aux_vol logical volume to hold the snapshot (no file system)/aux_dir directory to mount the snapshot
•Backup from the snapshot file system
# cd /aux_dir
# tar cvf /dev/rmt/0m or
# find . | cpio –ovcx > /dev/rmt/0m or
# vxdump –f /dev/rmt/0m /aux_dir
•Unmount the snapshot, then lvremove the volume