Gopi Desaboyina Solaris Blogs

Just another weblog

Concat/Stripe with Sun Volume Manager and growing ufs filesystem

Creating a Concatnation/Striping Disks using Sun Volume Manager and Growing the ufs filesystem

1. I’ve two spare hardisks. I’m going to put them in concat mode using svm.

Here is how I partitioned my disks.

Slice 7 with 60 MB for meta databases on both disks.
Slice 0 with Remaining Space. let’s say.

These are the devices

c0d1s0 — 500MB ( for Concatenation )
c0d1s7 — 64MB ( For Metadatabase )

c1d1s0 — 800MB ( For Concatenation )
c1d1s7 — 64MB ( For Metadatabase )

Let’s initiate the metadb :
# Below should create 3 Replicas of metadb in various superblocks for both devices
# metadb -a -c 3 /dev/rdsk/c0d1s7 /dev/rdsk/c1d1s7

Check the metadb info using metadb command
#metadb -i

so now we’ve metadatabase setup. let’s go-ahead and setup concatenation between slice c0d1s0 c1s1s0.
so that space should avilable for our filesystem should be ( 500 + 800 MB) =1300MB

#metainit d10 1 2 /dev/rdsk/c0d1s0 /dev/rdsk/c1d1s0

This should setup concatenation between both LUNS and create a metadevice d10 with size as 1300MB. In the above command 1 is for concatenation and 2 is number saying, we are going concat two luns.

you can check the status of metadevice size and underlying devices using metastat d10.

Alright we’ve now metadevice. next step is to go-ahead and create soft partition ( d20) based this d10.

#metainit d20 -p d10 900mb
#metainit softpartion -p metadevice size

This would create soft partion d20 with size as 900MB.

once d20 is setup. you can go-ahead and create filesystem on that using newfs
#newfs /dev/md/rdsk/d20.
#mount /dev/md/dsk/d20 /mnt.

we’ve now 900MB mount point and you got a requirement to grow that mount point size. Here is how we do it without disturbing mount point and existing data on that.

#metattach d20 100mb ## metattach softpartion growbysize
[that would grow your soft partion to 1000mb ( 900mb + 100mb).]

so now we’ve soft partion grown to 1000mb. we should go-ahead and grow underlying filesystem

#growfs -M /mnt /dev/rdsk/d10.

you are good go now. you can check by df -k /mnt to confirm.

Incase if you ran out of all space on underlying devices ( d10 ). then you can get a new lun and attach to d10 using below command and follow above metattach & growfs.

ok, this is how we attach a new device to existing concatenated metadevice ( d10)

#metattach d10 /dev/rdsk/c2d0s0
#metattach metadevice newrawdevice

#metattach d20 2000mb
#growfs -M /mnt d20.

Good Luck.. This URLhas good info..


April 1, 2009 - Posted by | Solaris |

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: