Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Solaris 8 - Accessing Hard Drives

Solaris


Tags
accessing file on physical drive, hard drive, solaris 8

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 10-27-2016
ssabet ssabet is offline
Registered User
 
Join Date: Jun 2016
Last Activity: 16 January 2017, 10:05 PM EST
Posts: 7
Thanks: 9
Thanked 0 Times in 0 Posts
Unix or Linux Question Solaris 8 - Accessing Hard Drives

Hi,

I have two SCSI Hard Drives [Disk0: c0t0d0 & Disk1: c0t8d0] in a Sun Solaris 8 server as shown below. I would like to access Disk1 and look at its contents, directory structure and files. How do I change my default directory from Disk 0 to Disk 1 and vice versa?

Thank you.
Sponsored Links
    #2  
Old Unix and Linux 10-28-2016
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 22 July 2017, 1:54 PM EDT
Location: San Jose, CA, USA
Posts: 10,412
Thanks: 527
Thanked 3,638 Times in 3,104 Posts
On what directories are these two two disks mounted?

What do you mean by "default directory"? You use your shell's cd utility to change your current working directory to a different directory.

You create a new user in your system's user database (/etc/passwd and associated files) with whatever directory you want to be that user's home directory.
The Following User Says Thank You to Don Cragun For This Useful Post:
ssabet (10-29-2016)
Sponsored Links
    #3  
Old Unix and Linux 10-28-2016
ssabet ssabet is offline
Registered User
 
Join Date: Jun 2016
Last Activity: 16 January 2017, 10:05 PM EST
Posts: 7
Thanks: 9
Thanked 0 Times in 0 Posts
Don,

There are two SCSI Hard Drives in the Server: Disk 0 (Primary Disk with Solaris 8 on it) and Disk 1 (Secondary Disk with an Application on it). When I login to the Server as Root and issue the command: ls -la does it show me the files and directories on both Disk 0 and Disk 1 or just Disk 0?

I assumed it showed me the directory structures and files on disk0 only, and not on both since I would have to change and access the other disk 1 to look at its directory structure and files. Is this assumption correct?

I'm thinking it's like changing between drive A: and drive B: on a PC. Is this the same way in Solaris OS?

I'm new to Solaris and sorry for asking you basic questions.
    #4  
Old Unix and Linux 10-28-2016
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 22 July 2017, 1:54 PM EDT
Location: San Jose, CA, USA
Posts: 10,412
Thanks: 527
Thanked 3,638 Times in 3,104 Posts
I repeat: On what directories are these two two disks mounted?

If the filesystems on those disks have not been mounted, you will not be able to use ls to list the files on those disks. If you have mounted them, you can use:

Code:
ls -lRa /mountdir

to get a long listing showing all of the files on that disk (assuming that the disk is mounted on the directory /mountdir and on all filesystems mounted on directories located in that filesystem, recursively. The command:

Code:
ls -lRa /

will list all of the files on every filesystem that is currently mounted.

The command:

Code:
ls -la

with no operands (only the options you have shown), will give you a long listing of all files in your current working directory.
The Following User Says Thank You to Don Cragun For This Useful Post:
ssabet (10-29-2016)
Sponsored Links
    #5  
Old Unix and Linux 10-28-2016
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 23 July 2017, 2:57 AM EDT
Location: Outside Paris
Posts: 4,854
Thanks: 18
Thanked 626 Times in 547 Posts
Quote:
Originally Posted by ssabet View Post
I'm thinking it's like changing between drive A: and drive B: on a PC. Is this the same way in Solaris OS?
No, it's definitely not the same with Unix.
There is no separate file hierarchy per disks (partitions) but a unified one starting from "/".
Quote:
I'm new to Solaris and sorry for asking you basic questions.
No problem asking basic questions. Start with showing us the output of "df -k" to see what is mounted and where.
The Following User Says Thank You to jlliagre For This Useful Post:
ssabet (10-29-2016)
Sponsored Links
    #6  
Old Unix and Linux 12-15-2016
crexson crexson is offline
Registered User
 
Join Date: Dec 2016
Last Activity: 22 December 2016, 7:56 PM EST
Posts: 5
Thanks: 3
Thanked 0 Times in 0 Posts
I guess you have to mount the other Disk before you can access to it.
Up to my knowledge, I only know how to mount other disk by certain partition only but not for all, hence you have to know the file you want to access was being stored in which partition first, so you can mount the partition for your access.
Below is the command which I use to mount on disk1 sectorX as /mnt
"/mount /dev/dsk/c0t1d0sX /mnt"
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Trying to boot Solaris without hard drives in T5220 nerdboy Solaris 4 09-03-2013 04:04 PM
Adding new hard drives on Sun SPARC T5440 server with Solaris 10 ramatnmcc Solaris 6 04-15-2011 10:27 AM
Help adding new hard drives Katkota Filesystems, Disks and Memory 3 10-10-2009 03:57 PM
Sun Solaris 9 E250 -- Suggestions For External Hard Drives KenLynch Solaris 2 04-07-2008 11:36 PM
Hard drives franruiz UNIX for Dummies Questions & Answers 3 01-13-2004 04:13 PM



All times are GMT -4. The time now is 04:43 AM.