Archive for category Solaris

My own referral…?


Funny story… at least I thought it was… I was on-site @ a customer’s data center the other day and I was tasked with configuring a SUN LTO-3 Quantum tape drive, similar to the photo on the left here, among other things… No biggie right…? Any way… in my usual way I was Googling lots of stuff, because I don’t remember anything… and while doing so, I came across my own blog, this very one you are reading for the answer.  I thought that was awesome… I answered my own question… LOL 🙂

Advertisements

, , , ,

Leave a comment

SUN-Jail – Solaris 10 convicted ! Part III Dammit… this friggin thing doesn’t restart @ boot-time !!!


Ok well I was not expecting to have a Part III, but I forgot some pretty important stuff… I guess I am so used to working with Linux where all of this manual crap is a “given,” meaning it is already configured to do what you would expect it to do… I got lazy and didn’t check the start-up scripts… and of course, on Solaris 10 at least, proftpd doesn’t just start on it’s own…  So here are the steps to make that happen for you as well as the start-up script I am currently using… Oh, and make sure that in your proftpd config file, you have proftpd set as a standalone server…

# cat /usr/local/etc/proftpd.conf|grep ServerType
ServerType                      standalone
Go out and make this file in /etc/init.d
# vi /etc/init.d/proftpd
#!/bin/sh
case $1 in
'start' )
/usr/local/sbin/proftpd
;;
'stop' )
kill `ps -ef | grep proftpd | grep -v grep | awk '{print $2}'` > /dev/null 2>&1
;;
*)
echo "usage: $0 {start|stop}"
esac
# chmod 744 /etc/init.d/proftpd
# ln -s /etc/init.d/proftpd /etc/rc3.d/S99proftpd
# ln -s /etc/init.d/proftpd /etc/rc1.d/K99proftpd

I have webmin installed here so I went in to test the scripts from the “System” dashboard under “Bootup and Shutdown” just to make sure it works, obviously you can reboot as well as the final test for proper functionality.  Sorry for the omissions 😦

, , , , , , , ,

1 Comment

SUN-Jail – Solaris 10 convicted ! Part II Dammit… I forgot to lock the door !


OK… so hopefully you already went through Part I, but if not, this may not make much sense as I am not going to re-visit anything here.  This is for the mod_tls setup for ftps or ftpes if you are using filezilla… I was not familiar with the ftpes connection state, but now I am and so are you… I was using fireFTP and everything was working fine, but in the interest of testing more than what I use, I found this new tidbit of information 🙂

So lets first tweak the proftpd.conf file, add this to the bottom of the file:

<IfModule mod_tls.c>
TLSEngine                  on
TLSLog                     /var/log/proftpd/tls.log
TLSProtocol                SSLv23
TLSOptions                 NoCertRequest
TLSRSACertificateFile      /etc/proftpd/ssl/proftpd.cert.pem
TLSRSACertificateKeyFile   /etc/proftpd/ssl/proftpd.key.pem
TLSVerifyClient            off
TLSRequired                off
</IfModule>
Take note of the files referenced here.  Go ahead and create the log dir, def do this as you will need it if anything is not working… and then we can move on to making the key/cert.  Keep in mind that I am using webmin for the proftpd control and it allows you to apply changes following a save eliminating the need for a manual restart of proftpd 🙂

Make this dir, please make this or the key/cert command will whine like a bitty baby…

mkdir -p /etc/proftpd/ssl

Then make the key/cert:

openssl req -new -x509 -days 365 -nodes -out /etc/proftp /ssl/proftpd.cert.pem -keyout /etc/proftpd/ssl/proftpd.key.pem

Make sure to answer all the posed questions:

Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").
State or Province Name (full name) [Some-State]: <-- Enter your State or Province Name.
Locality Name (eg, city) []: <-- Enter  your City.
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter your Organization Name (e.g., the name  of your company).
Organizational Unit Name (eg, section) []: <-- Enter your Organizational Unit Name (e.g. "IT  Department").
Common Name (eg, YOUR name) []: <--  Enter the Fully Qualified Domain Name of the system (e.g.  "server1.example.com").
Email Address []: <-- Enter your Email  Address.

And again now we are done.  Not too bad… right?  I set up a few test users to allow me to tail the log file and watch as they login to make sure I can see what is expected as well as what isn’t…

May 25 15:35:08 mod_tls/2.2.1[2020]: using default OpenSSL verification locations (see $SSL_CERT_DIR environment variable)
May 25 15:35:08 mod_tls/2.2.1[2020]: TLS/TLS-C requested, starting TLS handshake
May 25 15:35:09 mod_tls/2.2.1[2020]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
May 25 15:35:10 mod_tls/2.2.1[2020]: Protection set to Private
May 25 15:35:26 mod_tls/2.2.1[2021]: using default OpenSSL verification locations (see $SSL_CERT_DIR environment variable)
May 25 15:35:26 mod_tls/2.2.1[2021]: TLS/TLS-C requested, starting TLS handshake
May 25 15:35:27 mod_tls/2.2.1[2021]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES128-SHA (128 bits)
May 25 15:35:27 mod_tls/2.2.1[2021]: Protection set to Private
May 25 15:35:51 mod_tls/2.2.1[2022]: using default OpenSSL verification locations (see $SSL_CERT_DIR environment variable)
May 25 15:35:52 mod_tls/2.2.1[2022]: TLS/TLS-C requested, starting TLS handshake
May 25 15:35:52 mod_tls/2.2.1[2022]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)
May 25 15:36:33 mod_tls/2.2.1[2023]: using default OpenSSL verification locations (see $SSL_CERT_DIR environment variable)
May 25 15:36:33 mod_tls/2.2.1[2023]: TLS/TLS-C requested, starting TLS handshake
May 25 15:36:33 mod_tls/2.2.1[2023]: TLSv1/SSLv3 connection accepted, using cipher DHE-RSA-AES256-SHA (256 bits)

, , , , , , , , ,

1 Comment

SUN-Jail – Solaris 10 convicted ! Part I


OK… so a while back I did something about jails for FTP… Odd that I don’t even remember what it was for let-alone being to lazy to go back and look to make proper reference here.. but anyway, I have a successful and simple approach to doing this on Solaris 10 and seeing that I get ALOT of hits for my Solaris posts, this may in fact be another good destination. I went back to my tried and true buddy, webmin for this, with as little effort as possible.  I decided to use the ProFTPd module that comes (icon anyway) included with webmin for Solaris (which by the by, is also a default package on Sol 10) and packages from the sunfreeware site.  So lets get started with the required packages and some basic system tweaks you may or may not need:

I started out making a repo dir under /export/home as it is a large one on these systems:

mkdir /export/home/sunfreeware

cd /export/home/sunfreeware

For whatever reason, the default $PATH for Solaris 10 is as bare as it comes, leaving out lots of cool, already installed tools, like wget for example. I created a .profile and added this PATH:

PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/sfw/bin:/usr/local/sbin

This covers everything I found useful without absolutes (and without actually knowing where the f’ it is !!!)…

Here is a listing of what I needed: (You may or may not need all of these)

gcc-3.4.6-sol10-x86-local.gz
make-3.81-sol10-x86-local.gz
openssl-1.0.0-sol10-x86-local.gz
proftpd-1.3.2-sol10-x86-local.gz
rssh-2.3.2-sol10-x86-local.gz

So lets quickly grab these…

cd /export/home/sunfreeware (in case you were not there already 🙂 )

for i in gcc-3.4.6-sol10-x86-local.gz make-3.81-sol10-x86-local.gz   openssl-1.0.0-sol10-x86-local.gz proftpd-1.3.2-sol10-x86-local.gz rssh-2.3.2-sol10-x86-local.gz; do wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/$i; done

Then gunzip them:

for i in `ls`; do gunzip $i; done

The pkgadd them:

for i in `ls`; do pkgadd -d $i; done (You will need to answer at least the creation of the /usr/local/bin dir if it is not already there and the default ‘ALL’ question for each recursion)

Before you get yourself all in a tizzy… lets stop the defalt FTP service:

svcadm disable network/ftp

OK… now lets install webmin:

webminsetup (see how handy our PATH has been so far… 🙂 )

Answer the questions however you like… and wallah… Done 🙂

Now we need to make a few tweaks to the ProFTPd settings:

So you may have to click on this pic to see the line to which I am referring but in any event you want to uncomment this line so that ALL users are jailed to their defined home dir… and let me tell you that this is as easy as that process gets.  There is one other designation we need to make to ensure this takes place but it is in fact a radio button, so nothing overly complex there.  I also made the usual permissions changes on the user dirs to ensure the most security possible and a few other changes… well lets look at that step one by one shall we…

OK, so as you can see (from the wget up above) I grabbed rssh, a restricted shell.  Weather or not any of this is actually necessary is highly speculative, but I will at least illustrate what I did.

/usr/local/etc/rssh.conf

allowsftp <– This is all I wanted to allow

# If you want to chroot users, use this to set the directory where the root of
# the chroot jail will be located.
#
# if you DO NOT want to chroot users, LEAVE THIS COMMENTED OUT.
chrootpath = /export/home/chroot <– Make this whatever you are jailing your users to

You will also need to make an entry in /etc/shells (and create it if it is not there):

/usr/local/bin/rssh

ftptest:x:104:100:FTP Test User:/export/home/chroot/ftptest:/usr/local/bin/rssh

# id ftptest
uid=104(ftptest) gid=100(ftptest)

drwx——   2 ftptest ftptest      512 May 20 15:17 ftptest

From the main module screen simply select the “Files and Directories” option to open the module.  I should mention that we are already in the ProFTPd module at this point so if you are not there, simply click on the “Servers” link in the top left and then select “ProFTPD Server” and you will be at this very page.  Take note of where things are in Webmin as surely you will want to go back and make lots of additional amendments to whatever else you have running on the system.

All we are looking at here is making sure that you restrict the user to their home directory. This may be kind of obvious, but make sure you START the service as well… It can be done from any module.  Up in the right corner you will see a “Start ProFTPd Service” button… click it.  I would also run a few commands from the console just to see what you have going on as well maybe you just should have some understanding outside of a graphical environment of what is really taking place here.  So lets run some simple commands shall we???

# ps -ef |grep ftp
ftptest2  4951  4430   0 10:38:45 ?           0:00 /usr/local/sbin/proftpd
nobody  4430     1   0 10:20:35 ?           0:00 /usr/local/sbin/proftpd
root  5193  4197   0 12:43:10 pts/2       0:00 grep ftp

Make sure you don’t see anything other than the proftpd service running… (remember we stopped the default ftp service earlier right??? )

# /usr/local/sbin/proftpd -vv
– mod_tls/2.2.1: compiled using OpenSSL version ‘OpenSSL 0.9.8k 25 Mar 2009’ headers, but linked to OpenSSL version ‘OpenSSL 0.9.8n 24 Mar 2010’ library
ProFTPD Version: 1.3.2 (stable)
Scoreboard Version: 01040002
Built: Wed May 13 16:36:46 EDT 2009

Loaded modules:
mod_tls/2.2.1
mod_md5fs.c
mod_readme.c
mod_auth_pam/1.1
mod_ident/1.0
mod_facts/0.1
mod_delay/0.6
mod_site.c
mod_log.c
mod_ls.c
mod_auth.c
mod_auth_file/0.8.3
mod_auth_unix.c
mod_xfer.c
mod_core.c

And that’s it 🙂 Go and test it to ensure you have achieved the expected results:

This is exactly what I was expecting. Make sure you cannot move out of this dir and you are all set… 🙂

So this is all fine and dandy, but who wants to use regular FTP?  I would hope no one in a business environment anyway… Part II deals with using the mod_tls module packaged with proftpd.  For whatever reason, it was actually a pretty big pain in the a$$ to get this whole thing working…

, , , , , , , , , , , ,

1 Comment

Solaris ‘growfs’ type thang…


This was the easy way to do this, meaning I had free space to grow into… If you don’t have any free space, check out the Solaris 10 disk extending post here…

# which growfs <– was that really necessary???
/usr/sbin/growfs
# format
Searching for disks…done <– remember… pick the right one here…

c1t5d0: configured with capacity of 1.87GB
c1t8d0: configured with capacity of 4.20GB

AVAILABLE DISK SELECTIONS:
0. c1t1d0 <DEFAULT cyl 1604 alt 2 hd 10 sec 258>
/pci@0,0/pci1de1,3907@a/sd@1,0
1. c1t2d0 <DEFAULT cyl 2625 alt 2 hd 10 sec 258>
/pci@0,0/pci1de1,3907@a/sd@2,0
2. c1t5d0 <IBMOEM-0664M1H-661 cyl 2787 alt 2 hd 15 sec 94>
/pci@0,0/pci1de1,3907@a/sd@5,0
3. c1t8d0 <IBM-DDRS-34560W-S98G cyl 8084 alt 2 hd 5 sec 218>
/pci@0,0/pci1de1,3907@a/sd@8,0

Type 0 to select disk 0

Specify disk (enter its number): 0
selecting c1t1d0
[disk formatted]

FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit

type ‘partition’
format> partition

PARTITION MENU:
0 – change `0′ partition
1 – change `1′ partition
2 – change `2′ partition
3 – change `3′ partition
4 – change `4′ partition
5 – change `5′ partition
6 – change `6′ partition
7 – change `7′ partition
select – select a predefined table
modify – modify a predefined partition table
name – name the current table
print – display the current table
label – write partition map and label to the disk
!<cmd> – execute <cmd>, then return
quit’

type ‘print’ to see the details of the partition

partition> print
Current partition table (original):
Total disk cylinders available: 4107 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wm 0 – 1603 1.97GB (1604/0/0) 4138320
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 1 – 1603 1.97GB (1603/0/0) 4135740
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 0 (0/0/0) 0
9 unassigned wm 0 0 (0/0/0) 0

type ‘2’ to edit partition 2

partition> 2
Part Tag Flag Cylinders Size Blocks
2 backup wm 0 – 1603 1.97GB (1604/0/0) 4138320

Enter partition id tag[backup]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:

type in new partition size, ‘4107c’

Enter partition size[4138320b, 1604c, 1603e, 2020.66mb, 1.97gb]: 4107c

type ‘print’ to see the details of the modified partition

partition> print
Current partition table (unnamed):
Total disk cylinders available: 4107 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wm 0 – 4106 5.05GB (4107/0/0) 10596060
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 1 – 1603 1.97GB (1603/0/0) 4135740
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 0 (0/0/0) 0
9 unassigned wm 0 0 (0/0/0) 0
type ‘quit’ to leave the partition edit menu

partition> quit

FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit

try to save the changes

format> save
Please name this partition type before saving it <– whoops.. I f’ed it up

UH OH, back to disk 0 partiton menu <– I will skip all of the details

partition> label
Ready to label disk, continue? y

partition> quit

FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit
format> quit

I then double checked that my edit had been saved, which I will skip as well. Next to grow the partition.

# growfs
usage: growfs [ -M mount-point ] [ newfs-options ] raw-special-device
# growfs /dev/rdsk/c1t1d0s6
/dev/rdsk/c1t1d0s6: 10593480 sectors in 4106 cylinders of 10 tracks, 258 tors
5172.6MB in 257 cyl groups (16 c/g, 20.16MB/g, 9664 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 41584, 83136, 124688, 166240, 207792, 249344, 290896, 332448, 374000,
10198096, 10239648, 10281200, 10322752, 10364304, 10405856, 10447408,
10488960, 10530512, 10567712,

Did that make any sense? LOL… but seriously did it?

, , , , , , , , , , , ,

1 Comment

Solaris 10 disk extending


So I had a job recently that had an OS requirement for Solaris 10… Ya I am a UNIX guy, but all flavors are a little different, you know, but far be it from me to turn down an assignment just because I don’t know what I am doing, right? Well that is me… “do something, even if it’s wrong.”

Here are my notes on how I got through this one and keep in mind that everything worked out perfectly, until the customer decided to change their mind on the partitioning scheme… That presented some additional issues that I have outlined here… Unlike AIX, which compared to Solaris, is pretty straight forward… here is what I did…

Oh ya.. I forgot that they also ended up asking for an NFS mount… 2 actually, so I included that @ the end as a ‘BONUS’ as well… 🙂

Tar up and move all data on each partition as this process will wipe the partitions. That Means ALL DATA will be destroyed… Make a friggin’ back-up… LOL !!

Unmount the affected partitions and comment them out in /etc/vfstab <– This is more important than you think (LOL)
# umount /a
# umount /export/home

Now format the partition table <– This just takes you to the menu, it is not formatting the partition…
# format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c1t0d0 <– You may have more than 1 selection here, pick the right one. This is a 4 disk RAID 10 array so the OS thinks it’s only 1 disk…
/pci@0,0/pci10de,375@f/pci108e,286@0/disk@0,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
Warning: Current Disk has mounted partitions. <– Ignore this unless you are trying to do something with the listed mounted filesystems…
/dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).

FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
inquiry – show vendor, product and revision
volname – set 8-character volume name
! – execute , then return
quit
format> verify

Primary label contents:

Volume name = < >
ascii name =
pcyl = 35667
ncyl = 35665
acyl = 2
bcyl = 0
nhead = 255
nsect = 63

Here is where you make the actual changes to the sizes.  You need to review the Block allocations and adjust them properly or nothing works.  If it is not obvious or unless you have unpartitioned FREE space, you will need to REDUCE the larger filesystem FIRST to have FREE space to grow the other filesystem(s).  makes sense right? LOL … You will also have to employ a bit of mathematics as well as guess work (@ least I had to) as there is a variance in the block (or GB) allocation you give that do not exactly match perfectly by human standards… You will see what I mean, but don’t get frustrated, just reduce the count by 1 or 2 blocks and all will be fine, the percentages will remain perfect however.

I am reducing /export/home to grow /a… by their equivalent:

Part Tag Flag Cylinders Size Blocks
0 root wm 96 – 2900 21.49GB (2805/0/0) 45062325
1 swap wu 1 – 95 745.20MB (95/0/0) 1526175
2 backup wm 0 – 35664 273.21GB (35665/0/0) 572958225
3 unassigned wm 18837 – 35664 128.91GB (16828/0/0) 270341820
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 home wm 2901 – 18836 122.08GB (15936/0/0) 256011840
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 unassigned wm 0 0 (0/0/0) 0

format>
label, name (default is a fine name) and save the new partitons

Now create the new (or same filesystem(s)) You can get this info from the /etc/vfstab file, the
lines that you commented out before are used below.

All changed partitons must be ‘newfs’ this is a completely destructive process !!! All data will be lost.
# newfs -v /dev/rdsk/c1t0d0s3
newfs: construct a new file system /dev/rdsk/c1t0d0s3: (y/n)? y
pfexec mkfs -F ufs /dev/rdsk/c1t0d0s3 400516515 63 -1 8192 1024 264 1 166 8192 t 0 -1 8 128 n
Warning: 4702 sector(s) in last cylinder unallocated
/dev/rdsk/c1t0d0s3: 400516514 sectors in 65189 cylinders of 48 tracks, 128 sectors
195564.7MB in 4075 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:
399610016, 399708448, 399806880, 399905312, 400003744, 400102176, 400200608,
400299040, 400397472, 400495904

# newfs -v /dev/rdsk/c1t0d0s7 <– What psycho @ SUN came up with this disk naming scheme???
newfs: /dev/rdsk/c1t0d0s7 last mounted as /export/home
newfs: construct a new file system /dev/rdsk/c1t0d0s7: (y/n)? y
pfexec mkfs -F ufs /dev/rdsk/c1t0d0s7 125837145 63 -1 8192 1024 264 1 166 8192 t 0 -1 8 128 n
Warning: 4264 sector(s) in last cylinder unallocated
/dev/rdsk/c1t0d0s7: 125837144 sectors in 20482 cylinders of 48 tracks, 128 sectors
61443.9MB in 1281 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:
124951456, 125049888, 125148320, 125246752, 125345184, 125443616, 125542048,
125640480, 125738912, 125829152

Now uncomment the /etc/vfstab entries for these partitions and execute mount -a to remount
all partitions.

# df -hk
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 21G 4.0G 17G 19% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 7.0G 964K 7.0G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap2.so.1
21G 4.0G 17G 19% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 7.0G 63M 7.0G 1% /tmp
swap 7.0G 28K 7.0G 1% /var/run
/dev/dsk/c1t0d0s3 188G 146M 186G 1% /a
/dev/dsk/c1t0d0s7 59G 60M 58G 1% /export/home

SFX4140T: <– This is what the original partitioning scheme was for these 2 filesystems:
/dev/dsk/c1t0d0s3 127G 64M 126G 1% /a
/dev/dsk/c1t0d0s7 120G 64M 119G 1% /export/home

* BONUS *

NFS mounting:
Ensure NFS is running:
# ps -ef |grep nfs
daemon 386 1 0 Feb 23 ? 0:00 /usr/lib/nfs/lockd
root 1299 1224 0 11:24:15 pts/2 0:00 grep nfs
daemon 378 1 0 Feb 23 ? 0:00 /usr/lib/nfs/nfs4cbd
daemon 379 1 0 Feb 23 ? 0:00 /usr/lib/nfs/statd
daemon 380 1 0 Feb 23 ? 0:04 /usr/lib/nfs/nfsmapid

On server you want to mount disks from:
sunblade # cat /etc/dfs/dfstab
# Place share(1M) commands here for automatic execution
# on entering init state 3.
#
# Issue the command ‘/etc/init.d/nfs.server start’ to run the NFS
# daemon processes and the share commands, after adding the very
# first entry to this file.
#
# share [-F fstype] [ -o options] [-d “”]
[resource]
# .e.g,
# share -F nfs -o rw=engineering -d “home dirs” /export/home2
share -F nfs -o rw -d “home dirs” /export/home
share -F nfs -o rw -d “FACTS” /a <– this was added
share -F nfs -o rw -d “FACTS_TEST” /usr6 <– this was added
#share -F nfs -o rw -d “home dirs” /usr4/export
#share -F nfs -o rw -d “home dirs” /usr4/sfa
#share -F nfs -o rw -d “home dirs” /usr4/ups
#share -F nfs -o rw -d “home dirs” /usr4/neoforma/in
#share -F nfs -o rw -d “home dirs” /usr4/neoforma/out
#share -F nfs -o rw -d “home dirs” /usr4/medibuy/in
#share -F nfs -o rw -d “home dirs” /usr4/medibuy/out
#share -F nfs -o rw -d “home dirs” /usr4/import

Add the new filesystems you want to share:
sunblade # cat /etc/dfs/sharetab
/a – nfs rw FACTS
/export/home – nfs rw FACTS
/usr6 – nfs rw FACTS_TEST

execute “shareall” @ the command line:
execute /etc/init.d/nfs.server start <– ensure changes are taken

On the server you want to mount on:
create the mount points on / :

drwxrwxrwx 14 root root 512 Sep 1 16:12 a_sunblade
drwxr-xr-x 44 root root 1024 Feb 10 16:22 usr6_sunblade

then mount the filesystems you want:
# mount sunblade:/a /a_sunblade
# mount sunblade:/usr6 /usr6_sunblade
# df -h |grep sunblade
sunblade:/a 17G 10G 7.0G 60% /a_sunblade
sunblade:/usr6 33G 17G 16G 52% /usr6_sunblade

fstab entry for NFS mount:
[root@centOS54 /]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
SFX4140P:/export/home /SFX4140P nfs rsize=8192,wsize=8192,timeo=14,intr <– this one

, , , , , , , , , ,

1 Comment