Create a fs


 
Thread Tools Search this Thread
Operating Systems Solaris Create a fs
# 1  
Old 02-03-2006
Create a fs

hello

sorry but i'm beginning with solaris (i use Aix)
How can I create a new filesystem with solaris 9 ? (and define the size ).
I find newfs and mkfs but i don't know how use it

Thank you
# 2  
Old 02-03-2006
First, check out unixguide.net to get a feel from what you know (AIX) to Solaris.

To create a new filesystem, you would first check what is being used - and to know that, you may need to look into the following:

df -kl

If any of the filesystems have vx in the device name, then it's using Veritas Volume manager. If they have md in the device name, then it's using Solaris Volume Manager (SVM, also known as ODS and DiskSuite). You can also have hardware raid.

Examples of root partitions:
/dev/dsk/c0t0d0s0
SVM: /dev/md/dsk/d0
Veritas: /dev/vx/dsk/rootdg/d01

Let's just say you have a 'generic' set up - no hardware or software raid going on. You have a empty slice that you can use (let's say it's on /dev/rdsk/c0t0d0s5).

NOTE: The following is an example only - running these commands without knowing your set up may destroy a valid filesystem and crash your server.

You would go into the format utility as root.
# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
0. c0t0d0 <Seagate blah..blah...blah>
/pci@1f,0/pci@1,1/ide@3/dad@0,0
Spedify disk (enter its number): 0
selecting c0t0d0
[disk formatted, no defect list found-
Warning: Current Disk has mounted partitions.

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
repair - repair a defective sector
show - translate a disk address
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
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> p


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
partition> p
Current partition table (original):
Total disk cylinders available: 8892 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 7212 3.25GB (7213/0/0) 6816285
1 swap wu 7213 - 8336 518.64MB (1124/0/0) 1062180
2 backup wm 0 - 8891 4.01GB (8892/0/0) 8402940
3 unassigned wm 8337 - 8836 256.09MB (500/0/0) 524475
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 unassigned wm 0 0 (0/0/0) 0

partition> 5
Part Tag Flag Cylinders Size Blocks
5 unassigned wm 0 0 (0/0/0) 0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:8837
Enter partition size[0b, 0c, 0.00mb, 0.00gb]:55c
partition> label
label disk? y
partition> q


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
repair - repair a defective sector
show - translate a disk address
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
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> q
# newfs /dev/rdsk/c0t0d0s05
newfs: construct a new file system /dev/rdsk/c0t0d0s5: (y/n)? y

After it's completed, you can mount the new filesystem to the directory that you require (as long as the mount point exist).
mount /dev/dsk/c0t0d0s5 /mynewfilesystem


Information on SVM can be found at SVM - docs.sun.com
Info on the different SVM products - list of versions / SVM products
Solaris version documentation
Disk administration

Last edited by RTM; 02-03-2006 at 10:36 AM..
# 3  
Old 02-03-2006
thank you very much for your detailled response Smilie Smilie
# 4  
Old 06-04-2006
Hi buddy
Thank you very much for your reply
Hope this will help.

Regards
Roy
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to create variables to pass into a bash loop to create a download link

I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies

2. AIX

Do i create a new lv ?

Currently directory /home/apps/fs_1 on both servers A and B is mounted on /dev/hd1. I am assuming it should have separate filesystem, with its own lv as fs_1_lv to which /home/apps/fs_1 should be mounted, am I correct ? For Example: Server A: Filesystem GB blocks Free %Used Iused... (2 Replies)
Discussion started by: aix_admin_007
2 Replies

3. Emergency UNIX and Linux Support

How to create user?

Hi, Quick question. How to create user in Unix after they login at the first time then they need to change password. Thanks in Advance :):) (5 Replies)
Discussion started by: justbow
5 Replies

4. Homework & Coursework Questions

Create script to add user and create directory

first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies

5. Red Hat

how to create a Filesystem

Hi everybody, I work with UNIX-AIX OS, I have to install db2 connect , somebody could explain to me how to create a Filesystem?, user, group, and password? ( I read a little and I know there many types of Filesystems) I have no idea how to do it, Linux version 2.6.18-92.el5... (2 Replies)
Discussion started by: lauelmar
2 Replies

6. Solaris

how to create

Hi, I am new to solaris10. I want to add a user without prompting for any password, while logging to his machine Can someone tell me how to do that??? Thiru (2 Replies)
Discussion started by: tirupathiraju_t
2 Replies

7. Shell Programming and Scripting

cannot create

i am creating a shell script to generate a file format. i want to register each and every activity in the log file. here are the commands which i have given, Don't know why i am getting error. v_log_loc="$APPLCSF/log"; export v_log_loc v_logfile=${p_po_requestid}_LOG; export v_logfile ... (4 Replies)
Discussion started by: aindurkhya
4 Replies

8. UNIX for Dummies Questions & Answers

Create Icon

Dear Gurus, I have a question. I have juz created an icon for my user. When I try to run the application (ie double-click) there are nothing being activated. This is the content of the TEST_APP.dt ACTION TEST_APP { LABEL TEST_APP TYPE COMMAND ... (0 Replies)
Discussion started by: lweegp
0 Replies

9. UNIX Desktop Questions & Answers

How do I create desktop icons for the shell programs I create???

I am a bash shell programmer and I create programs on occasional basis. Now, I dont want my programs to be run by typing out its name at a command line. I want to make it as user friendly as possible. I want to create icons on the desktop so users can click on it. mind you, I said "desktop... (7 Replies)
Discussion started by: TRUEST
7 Replies

10. IP Networking

How to create new a/c that ...

how to create a new a/c and use it for webhosting such as my domain is blah.com and i wanan host blah.com on that a/c :) (1 Reply)
Discussion started by: irwan
1 Replies
Login or Register to Ask a Question