useradd in 2nd HDD in r5.4

there is request that one want to spread some user on the 2nd HDD on rocks@FE

the followings will work , there could be other way

  • fdisk  /dev/sdb create partition 1
  • mkfs –t ext3 /dev/sdb1
  • mkdir /state/partition2; make sure it has 777 mode
  • tune2fs –L partition2 /dev/sdb1
  • mount /dev/sdb1 /state/partiton2;
  • add it in fstab; LABEL=partition2 /state/partition2ext3 defaults  1  2
  • cd /; ln –s /state/partition1 export2
  • add /export2 in /etc/exports  (by copy the line /export)
  • run exportfs –r; exportfs –a
  • add user
    • useradd –d /export2/home/test2 test2
    • passwd test2
    • su – test2 to generate ssh key; exit
    • add test2 <cluster>.local:/export2/home/test2  to /etc/auto.home
    • edit /etc/passwd and change /export2/home/test2 to /home/test2
    • /etc/init.d/autofs restart
    • rocks sync users
    • testing by
      • su – test2
      • as test2; ssh compute-0-0 ls

In contrast, to add user by default in 1st HDD

  • useradd test1
  • passwd test1
  • su – test1 to generate ssh  key; exit test1
  • rocks sync user
  • this will automatic populate auto.home  for test1

About laotsao 老曹

HopBit GridComputing LLC Rockscluster Gridengine Solaris Zone, Solaris Cluster, OVM SPARC/Ldom Exadata, SPARC SuperCluster
This entry was posted in ROCKS. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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