Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for unused disks 3

Status
Not open for further replies.

stevenriz

IS-IT--Management
May 21, 2001
1,069
Could anyone tell me what the command it to list all hardware devices? Specifically disk devices? I think that one of the disks in one of our servers is "vacant" and I wish to create a mount point for it. My ultimate goal is this... If you can, please list all commands to do this if you can... I have done most of this in the past but I'm not sure it's like riding a bike... I don't think all the syntax will come back to me.

- Partition this new disk once I prove it's available
- Copy the contents of another mount point to this new disk (running out of space on it)
- make the new found disk name the same mount point "name" as the existing one and remove the existing mount point all together.

If that isn't too clean, I can elaborate... Thank you all.
 
Hi,
U haven't specified what architecture or OS version u have.
Anyway u can use 'probe-scsi-all' or 'probe-ide' depending upon the arch. of u'r machine for diplaying the attached devices at the PROM prompt.The command 'help diag' will further list more commands.
U can use 'format' command to format the new disk from u'r OS.
Mount the partition on a new mount point and using cpio/tar u can copy the contents of the old partition to the new location.Then unmount the old and new partitions and mount the new partition with that name(mount pt. of old partition) and see if all the applications/software are running fine.If u r satisfied then u can format the old partition.

I hope u found this helpful.
 
you can print system configuration with "prtconf -D", or "sysdef", but a easy way for disks is use "format", format lists available disks, then if you have a disk for use you need use format to partition and label, after you partition the disk and assuming that you will not use "Volume Manager" or "SDS" you can create the filesystem with "newfs", for example if you configure partition 0 on a disk on controler 0, target 1, you can do
# newfs -m 1 /dev/dsk/c0t1d0s0" to create the filesystem, then to mount on for example "/new" just do
# cd /
# mkdir /new
# mount /dev/dsk/c0t1d0s0 /new

to make available at boot time don't forget to change "/etc/vfstab" ...
them you can copy old data to new location assuming /old contain the old data you could use something like:
# cd /old
# tar cpmf - . | (cd /new;tar xpf - )

Hope this helps,

Regards,

Carlos Almeida,


 
I will work on this. Thank you. This particular machine is an e250 running Solaris 2.6. Do these commands that you gave me change for this version of the OS?
Steve
 
No, you can use them on your E250 Solaris 2.6 box ...

Regards,

Carlos Almeida,
 
Hi,
No,the commands will be these only.If u are able to see the new disk using 'format' command then u need not go to the PROM prompt.Then just follow the steps described by Carlos.
However,use the newfs command on raw device(rdsk instead of dsk) and after all these activities if u r satisfied of the filesystem activity ,make changes for new partition in /etc/vfstab as Carlos has written.
 
... on the example "newfs /dev/dsk/c0t1d0s0" is the same as
"newfs -m1 /dev/rdsk/c0t1d0s0", because newfs always create
the filesystem on "raw" device, the command that is runned in background is something like:
"mkfs -F ufs /dev/rdsk/c0t1d0s0 ... ... ... -t 0 -1"

Regards,

Carlos Almeida,
 
I am working on this now. I have 4 18gb drives in our 3500. When I use format, it shows that all disks are in use. Then when I do a df -k, I cannot for the life of me find 4 18gb drives worth of mount points. Am I missing something here? Thanks guys.
steve
 
I believe the OS is mirrored. That's about it.
 
If the OS is mirrored then the partitians shown running df -k will actually account for 2 disks: eg /dev/dsk/md/d0 for / partitian would be the / partitian on the boot disk and also the / partitian on the mirror disk ( the mirror being made up of one partitian on each disk)
If you run /usr/opt/SUNWmd/sbin/metastat | more this will list the mirrors and the disk partitians used to make up the mirrors.
NOTE: This assumes you are using Solstice DiskSuit to mirror the OS.
 
More info:
A mirror is made up of two or more submirrors ie mirror d0 could have d10 & d20 as submirrors if you look at the output of the metastat command, you will probably see the submirrors showing the partitians eg c0t0d0s0 mirrored by c0t1d0s0. If you run format and look at the partitian info you will see the two disks are partitianed the same. Which would explain the missing disk as you only see the mirror not its components when you run the df.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top