Friday, February 18, 2011

UFS filesystem creation - Veritas Disk

Creationg a new FileSystme on a disk which is under veritas control but FileSystem to be a UFS filesystem.

(MyServer:/)# mkfs -F vxfs /dev/vx/rdsk/MyZone/MyApplication-2
mkfs: FSType vxfs not installed in the kernel


//Check the similar fs(from same volume) to find the FSType
(MyServer:/)# fstyp /dev/vx/dsk/MyZone/MyApplication
Ufs


//wrong syntax as size should be specified at the end
(MyServer:/)# mkfs -F ufs /dev/vx/rdsk/MyZone/MyApplication-2
size not specified
ufs usage: mkfs [-F FSType] [-V] [-m] [-o options] special size(sectors) \
[nsect ntrack bsize fragsize cpg free rps nbpi opt apc gap nrpos maxcontig mtb]
 -m : dump fs cmd line used to make this partition
 -V :print this command line and return
 -o :ufs options: :nsect=32,ntrack=16,bsize=8192,fragsize=1024
 -o :ufs options: :cgsize=0,free=0,rps=60,nbpi=2048,opt=t
 -o :ufs options: :apc=0,gap=0,nrpos=0,maxcontig=0
 -o :ufs options: :mtb=n,calcsb,calcbinsb
NOTE that all -o suboptions: must be separated only by commas so as to
be parsed as a single argument


Size calculation:
The request is for a 3gb filesystem
The file size should be given in blocks of 512 bytes for the mkfs command

3gb = ( * 1024 * 1024 * 1024) / 512 = 6291456 [Reverse = (6291456 * 512) / 1024 / 1024 / 1024 = 3]

(MyServer:/)# mkfs -F ufs /dev/vx/rdsk/MyZone/MyApplication-2 6291456
/dev/vx/rdsk/MyZone/MyApplication-2:       6291456 sectors in 3072 cylinders of 32 tracks, 64 sectors
        3072.0MB in 192 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 32864, 65696, 98528, 131360, 164192, 197024, 229856, 262688, 295520,
 5965216, 5998048, 6030880, 6063712, 6096544, 6129376, 6162208, 6195040,
 6227872, 6260704

(MyServer:/)#

(MyServer:/)# mkdir /zones/MyZone/MyApplication-2
(MyServer:/)#
(MyServer:/)# mount -F ufs /dev/vx/dsk/MyZone/MyApplication-2 /zones/MyZone/MyApplication-2
(MyServer:/)#

(MyServer:/)# df -h /zones/MyZone/MyApplication-2
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/MyZone/MyApplication-2
                       2.8G   3.0M   2.5G     1%    /zones/MyZone/MyApplication-2

(MyServer:/)#
(MyServer:/)#

No comments:

Post a Comment