SamFS bei 70 Grad Süd – It´s about a SamFS installation on the Polarstern, a german research vessel
Archive for the ‘UNIX Solution’ Category
Solaris 10 / SUN SamFS 4.6 – The most southern SamFS installation
Sonntag, Januar 18th, 2009System Administration Commands „syslogd“ log system messages
Samstag, Januar 3rd, 2009Solaris 10 / SUN SamFS 4.6 – Working with SamFS / Adding Devices to a Storage Pool
Donnerstag, Januar 1st, 2009dynamically add space to a pool by adding a new top-level virtual device. This space is immediately available to all datasets within the pool. To add a new virtual device to a pool, use the „zpool add“ command
# zpool add samfs2_pool_1 c2t3d0
# zpool add samfs2_pool_2 c2t4d0
# zpool status samfs2_pool_1
pool: samfs2_pool_1
state: ONLINE
scrub: none requested config:
NAME STATE READ WRITE CKSUM
samfs2_pool_1 ONLINE 0 0 0
c2t1d0 ONLINE 0 0 0
c2t3d0 ONLINE 0 0 0
errors: No known data errors
# zpool status samfs2_pool_2
pool: samfs2_pool_2
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
samfs2_pool_2 ONLINE 0 0 0
c2t2d0 ONLINE 0 0 0
c2t4d0 ONLINE 0 0 0
errors: No known data errors
Solaris 10 / SUN SamFS 4.6 – Working with SamFS / Planning Issues for the Recycling Process
Donnerstag, Januar 1st, 2009Recycling is the process of reclaiming space on archive volumes. The recycler works with the archiver to reclaim the space occupied by unused archive copies. As users modify files, the archive copies associated with the old versions can be purged from the system
# cat /etc/opt/SUNWsamfs/archiver.cmd
interval=2m
fs = samfs1
logfile=/var/opt/SUNWsamfs/archiver/samfs1.log
arset1_dir01 dir01
1 30s
2 120s
arset1 .
1 30s
2 1200s
params
allsets -recycle_hwm 50 -recycle_mingain 50 -recycle_vsncount 1
endparams
vsns
arset1.1 dk disk11
arset1.2 dk disk21
arset1_dir01.1 dk disk12
arset1_dir01.2 dk disk22
samfs1.1 dk disk10
endvsns
-recycle_hwm 50 „high water mark “ – Percentage of the total storage space in the library that must be utilized before recycling will occur
-recycle_mingain 50 „minimum gain“ – Percentage of the VSN that must be expired archives before it can be recycled
-recycle_vsncount 1 – „VSN count“ – Maximum number of VSNs recycled in one recycler run
Creating a crontab File for the Recycler If the system is performing as expected, you are ready to make a crontab entry for the superuser to run the recycler periodically, every two hours or more, depending on your site’s conditions
# EDITOR=vi
# export EDITOR
# crontab -e
…
5 1,3,5,7,9,11,13,15,17,19,21,23 * * * /opt/SUNWsamfs/sbin/sam-recycler
Solaris 10 / SUN SamFS 4.6 – Working with SamFS / How to Migrate a SAM-FS File System
Dienstag, Dezember 30th, 2008# /etc/init.d/samba stop
# samcmd arrun
# showqueue -v -f
Scan list
0 2009-10-20 07:50:16 background - .
No archive requests# cd /samfs-old
# samfsdump -f /spacious_directory/samfsdump -u# mount -F samfs samfs-new /samfs-new
# cd /samfs-new
# samfsrestore -f /spacious_directory/samfsdump
# samcmd m
# cd /samfs-new
# sls -D myfile
# cp newfile /samfs-new/newfile
# samcmd arrun
# samcmd a
Solaris 10 / SUN SamFS 4.6 – Working with SamFS / Adds disk partitions to an existing SamFS Filesystem
Samstag, Dezember 27th, 2008samfs1 10 ms samfs1
/dev/dsk/c1t4d0s2 11 md samfs1 on /dev/rdsk/c1t4d0s2
# umount samfs1
# samd stop
samfs1 10 ms samfs1
/dev/dsk/c1t4d0s2 11 md samfs1 on /dev/rdsk/c1t4d0s2
/dev/dsk/c1t5d0s2 12 md samfs1 on /dev/rdsk/c1t5d0s2
# samgrowfs samfs1
# mount samfs1
Solaris 10 / SUN SamFS 4.6 – Working with SamFS / Command Reference
Samstag, Dezember 27th, 2008samcmd Executes one samu operator interface utility command
samd Starts or stops robotic and removable media daemons
samexplorer Generates a SamFS diagnostic report script
samfsconfig Displays configuration information
samfsdump Creates a dump file of a SamFS file system
samfsinfo Displays the layout SamFS file system
samfsrestore Restores a dump file of a SamFS file system
samgrowfs Adds disk partitions to an existing Sun StorEdge
sammkfs Initializes a new file system from disk device
samu Invokes the full-screen, text-based operator interface
sam-recycler Reclaims space used by expired archive copies
archiver syntax completeness check and semantic accuracy
showqueue Displays the content of an archiver queue file
star Restores file data from archives.zpool configures ZFS storage pools
Solaris 10 / SUN SamFS 4.6 – Working with SamFS
Freitag, Dezember 26th, 2008# mkfile 10m /samfs1/testfile01
# sls -D testfile01
testfile01:
mode: -rw——T links: 1 owner: root group: root
length: 10485760 admin id: 0 inode: 1029.1
access: Dec 25 21:20 modification: Dec 25 21:20
changed: Dec 25 21:20 attributes: Dec 25 21:20
creation: Dec 25 21:20 residence: Dec 25 21:20
after some minutes …
# sls -D testfile01
testfile01:
mode: -rw——T links: 1 owner: root group: root
length: 10485760 admin id: 0 inode: 1029.1
archdone;
copy 1: —– Dec 25 21:31 0.1 dk disk01 f0
copy 2: —– Dec 25 21:50 0.1 dk disk03 f0
access: Dec 25 21:20 modification: Dec 25 21:20
changed: Dec 25 21:20 attributes: Dec 25 21:20
creation: Dec 25 21:20 residence: Dec 25 21:20
Solaris 10 / SUN SamFS 4.6 – Configuring disk archiving
Freitag, Dezember 26th, 2008# cat /etc/opt/SUNWsamfs/diskvols.conf
disk11 /samfs1_pool_1/dir11
disk12 /samfs1_pool_1/dir12
disk13 /samfs1_pool_2/dir13
# cat /etc/opt/SUNWsamfs/archiver.cmd
interval=2m
fs = samfs1
logfile=/var/opt/SUNWsamfs/archiver/samfs1.log
arset1 .
1 30s
2 120s
params
allsets -recycle_hwm 50 -recycle_mingain 50 -recycle_vsncount 1
endparams
vsns
arset1.1 dk disk12
arset1.2 dk disk13
arset1_dir01.1 dk disk14
arset1_dir01.2 dk disk15
samfs1.1 dk disk11
endvsns
# samd config
Configuring SAM-FS
# archiver -lv
Reading ‚/etc/opt/SUNWsamfs/archiver.cmd‘.
…
#
Solaris 10 / SUN SamFS 4.6 – Configuring a SamFS filesystem /etc/vfstab
Freitag, Dezember 26th, 2008#cat /etc/vfstab
…
samfs1 – /samfs1 samfs – yes high=80,low=60
# samd config
Configuring SAM-FS
# sammkfs samfs1
Building ’samfs1′ will destroy the contents of devices:
/dev/zvol/dsk/samfs1_base/samfs1_base_1
Do you wish to continue? [y/N]y
total data kilobytes = 4194240
total data kilobytes free = 4192576
# mount /samfs1
# cd /samfs1
# samfsinfo samfs1
name: samfs1 version: 2
time: Sun Jan 25 20:15:11 CET 2009
count: 1
capacity: 00000000003fffc0 DAU: 64
space: 00000000003ff940
ord eq capacity space device
0 11 00000000003fffc0 00000000003ff940 /dev/zvol/dsk/samfs1_base/samfs1_base_1
Solaris 10 / SUN SamFS 4.6 – Configuring a SamFS filesystem /etc/opt/SUNWsamfs/mcf
Freitag, Dezember 26th, 2008# cat /etc/opt/SUNWsamfs/mcf
samfs1 10 ms samfs1
/dev/zvol/dsk/samfs1_base/samfs1_base_1 11 md samfs1 on /dev/zvol/rdsk/samfs1_base/samfs1_base_1
Identifier for filesystems and disksf
ms – basic file system
ma – high performance filesystem
mm – metadata device for QFS
mr – data device for QFS (single DAU)
md – meta data and data device for basic filesystem or data device for QFS (dual DAU)
Solaris 10 / SUN SamFS 4.6 – Configuring a SamFS filesystem / ZFS Archive Volumes
Freitag, Dezember 26th, 2008# zpool create samfs1_pool_1 c1t2d0
# zfs create samfs1_pool_1/dir11
# zfs create samfs1_pool_1/dir12
# zpool create samfs1_pool_2 c1t3d0
# zfs create samfs1_pool_2/dir13
# zpool create samfs1_base mirror c1t4d0 c1t5d0
# zfs set mountpoint=none samfs1_base
# zfs create -V 4g samfs1_base/samfs1_base_1
Solaris 10 / SUN SamFS 4.6 – Installing the SamFS Filesystem Manager
Freitag, Dezember 26th, 2008# cd sunstorgeteksam-fs4.6
# cd x64
# ./fsmgr_setup
Solaris 10 / SUN SamFS 4.6 – Installing the SamFS packages
Freitag, Dezember 26th, 2008# cd sunstorageteksam-fs4.6
# cd x64
# cd 2.10
# pkgadd -d . SUNWsamfsr SUNWsamfsu
#PATH=$PATH:/opt/SUNWsamfs/bin:/opt/SUNWsamfs/sbin
#MANPATH=$MANPATH:/opt/SUNWsamfs/man
#export PATH MANPATH