Play with soft partitions on Solaris part 4

Grow soft partition on the fly

1. Create random file and calculate checksum

# cd /oradata
# dd if=/dev/urandom of=file bs=1024 count=1024
1024+0 records in
1024+0 records out

# digest -a md5 file
f0252c61cab0d92ae0b91206af72f85d


2. Grow d51 partition by 1 GB and grow the filesystem

# metattach d51 1g
d51: Soft Partition has been grown
# growfs -M /oradata /dev/md/rdsk/d51
/dev/md/rdsk/d51:       8388608 sectors in 2048 cylinders of 128 tracks, 32 sectors
        4096.0MB in 82 cyl groups (25 c/g, 50.00MB/g, 8192 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 102464, 204896, 307328, 409760, 512192, 614624, 717056, 819488, 921920,
 7375136, 7477568, 7580000, 7682432, 7784864, 7887296, 7989728, 8092160,
 8194592, 8297024



3. See the mounted soft partitions and check if the file is the same

# df -k|grep md
/dev/md/dsk/d51      4109006    5145 4042237     1%    /oradata
/dev/md/dsk/d52      1488991    1521 1427911     1%    /oralogs
# digest -a md5 file
f0252c61cab0d92ae0b91206af72f85d




Conclusion

In few sample steps we create volumes and filesystems, grow it without disrupting normal work of the system and applications. This example show the power of Solaris Volume manager, but of course do not cover many of the options and details you will need in daily work. For more information about the subject is strictly recommended to read official SUN documentation and related papers.

No comments:

Post a Comment

Compressed tar archive

There are some cases when you want to create compressed tar archive but you do not have enough disk space to keep original files and tar arc...