Advertisements

Creating a SVM metadevice and an UFS filesystem

The storage team created new LUNs and presented them to the server. I need to check which disks doesn’t have a label yet

root@solaris:~ # echo | format | more
Searching for disks…done

c3t5006048449AFD297d167: configured with capacity of 11.24GB
c3t5006048449AFD297d168: configured with capacity of 11.24GB
c3t5006048449AFD297d169: configured with capacity of 11.24GB
c3t5006048449AFD297d170: configured with capacity of 11.24GB
c3t5006048449AFD297d171: configured with capacity of 11.24GB
c4t5006048449AFD298d167: configured with capacity of 11.24GB
c4t5006048449AFD298d168: configured with capacity of 11.24GB
c4t5006048449AFD298d169: configured with capacity of 11.24GB
c4t5006048449AFD298d170: configured with capacity of 11.24GB
c4t5006048449AFD298d171: configured with capacity of 11.24GB
emcpower68a: configured with capacity of 11.24GB
emcpower69a: configured with capacity of 11.24GB
emcpower70a: configured with capacity of 11.24GB
emcpower71a: configured with capacity of 11.24GB
emcpower72a: configured with capacity of 11.24GB

These disks are PowerPath devices and the only thing diferenciating them are the controllers. One path comes from c3 and the other one comes from c4. After I apply a label on the PowerPath devices, I create a new Solaris Volume Manager metadevice with metainit

root@solaris:/ # metainit d74 1 1 /dev/dsk/emcpower68c
d74: Concat/Stripe is setup

I could specify the metadevice with the options 4 1 disk 1 disk 1 disk 1 disk but I find that if I attach one by one there is less chance of error

root@solaris:/ # metattach d74 /dev/dsk/emcpower69c
d74: component is attached
root@solaris:/ # metattach d74 /dev/dsk/emcpower70c
d74: component is attached
root@solaris:/ # metattach d74 /dev/dsk/emcpower71c
d74: component is attached

Checking the metadevice and which physical disks are being used

root@solaris:~ # metastat -p d74
d74 4 1 /dev/dsk/emcpower68c \
1 /dev/dsk/emcpower69c \
1 /dev/dsk/emcpower70c \
1 /dev/dsk/emcpower71c

Creating an UFS filesystem on this metadevice

root@solaris:/ # newfs /dev/md/rdsk/d74
/dev/md/rdsk/d74: Unable to find Media type. Proceeding with system determined parameters.
newfs: construct a new file system /dev/md/rdsk/d74: (y/n)? y
/dev/md/rdsk/d74: Unable to find Media type. Proceeding with system determined parameters.
Warning: 5952 sector(s) in last cylinder unallocated
/dev/md/rdsk/d74: 94261440 sectors in 15343 cylinders of 48 tracks, 128 sectors
46026,1MB in 959 cyl groups (16 c/g, 48,00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
………………
super-block backups for last 10 cylinder groups at:
93297312, 93395744, 93494176, 93592608, 93691040, 93789472, 93887904,
93986336, 94084768, 94183200

Creating the mount point for the filesystem

root@solaris:/ # mkdir /mountpoint

Here I’m setting the read and browse properties for the directory to avoid problems if the umask is different than 022

root@solaris:/ # chmod 755 /mountpoint

I mount the filesystem and specify the metadevice

root@solaris:/ # mount /dev/md/dsk/d74 /mountpoint

root@solaris:/ # df -h /mountpoint
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d74 44G 45M 44G 1% /mountpoint

If needed, now with the filesystem mounted you can change the owner and group of this filesystem

root@solaris:/ # ls -ld /mountpoint
drwxr-xr-x 3 root root 512 jul 22 16:19 /nfein

I made this new filesystem for the DBA to hold some files. So I’m changing the owner to oracle and group to dba

root@solaris:/ # chown oracle:dba /mountpoint

root@solaris:/ # ls -ld /mountpoint
drwxr-xr-x 3 oracle dba 512 jul 22 16:19 /nfein

Advertisements
%d bloggers like this: