Managing FileSystems on Solaris

Hello.
I have got Solaris 10 8/07 on x86 installed successfully using CDs. While I had inserted 1st CD - I created 2 new filesystems also.

But now after entering into Solaris - How do I manipulate sizes or created/delete filesystems by going to terminal?

Thank you!

man format

this is how to create and delete partitions

man mkfs

is how to layout a file system

man mkdir

is how to create a mount point

man vfstab

is how to tell the OS what partitions appear on what mount points.

Thank you for your reply.

1) What is the actual difference between filesystem and mount point?
2) How do we get previous command on terminal like in HP-UX (using esc k) or in AIX (set -o vi) works?

Thank you!

a disk is a series of bytes

a partition or slice is a sequential subset of those bytes

a filesystem is an arrangement of directories, files and inodes on a partition

a mountpoint is the inode used by the operating system to make the root of a filesystem appear.

eg say you had all variable data on one partition, you would have an empty directory on the root filesystem and mount the var filesystem at "/var", typically by an entry in "/etc/vfstab".

using "mount" or "df" will show you different views of all the current active mountpoints.

in regards to shell, I use bash on Solaris, it solves all my character mapping problems.

I have got 2 FileSystems visible when I use df -k or mount command /u00 and /u01 of 5 GB and 10 GB respectively. Can you please let me know exact commands to execute for below:

1) Delete /u00
2) Modify /u01 from 10 GB size to 5 GB size
3) Create /u02 (new fs) of size 10 GB

Thank you - by using bash the issue of shells resolved.

Why don't you do something like just rename /u01 to /u02, and rename /u00 to /u01?

This would be done by

umount /u00
umount /u01

rmdir /u00
mkdir /u02

edit /etc/vfstab to change the reference from /u01 to /u02, and /u00 to /u01.

then

mount /u01
mount /u02

Hello - Thanks for your reply, It was quite short n sweet method - I was struggling so many big commands :slight_smile:

However, I got an error in last while using #mount /u02
mount: No such device
mount: Cannot mount /dev/dsk/c0d0s4

Please advice.

Now to cleanup I did below, whether any of /uXX existed or no:

umount /u00 /u01 /u02
rmdir /u00 /u01 /u02
Modifiec /etc/vfstab to have below entries:
/dev/dsk/c0d0s3 /dev/rdsk/c0d0s3 /u00 ufs 2 yes -
/dev/dsk/c0d0s4 /dev/rdsk/c0d0s4 /u01 ufs 2 yes -
mkdir /u00 /u01
mount /u00
mount /u01 [This gave an error:]
mount: No such device
mount: Cannot mount /dev/dsk/c0d0s4

Even though I can see one directory exist as /u01

Please suggest.

Do you have

(a) a copy of what your vfstab was before

(b) a copy of what "mount" said before?

can you print out your partition table with format?

(a) a copy of what your vfstab was before

(b) a copy of what "mount" said before?

can you print out your partition table with format?

I had not copied the entries of vfstab and mount - But I remember the device names and allocated sizes. Here is the output related to /u01 after format command:

/dev/dsk/c0d0s3 is currently mounted on /u00. Please see umount(1M).
/dev/dsk/c0d0s4 is normally mounted on /u01 according to /etc/vfstab. Please remove this entry to use this device.

Output of print table:
Part Tag Flag Cylinders Size Blocks
4 unassigned wm 1355 - 2660 10.00GB (1306/0/0) 20980890 [The one I have problem with]
4 unassigned wm 1355 - 1409 431.43MB (55/0/0) 883575 [This I was trying to create in morning with 55c, But had got an error while using mkfs as the allocated space was unavailable.

Please advice!

Please let me know How do I get back with original /u01 ?

I have managed to reboot and repair of filesystem. Let me post the fresh query here again:

I have got 2 FileSystems visible when I use df -k or mount command /u00 and /u02 of 5 GB and 10 GB respectively. Can you please let me know exact commands to execute for below:

1) Delete /u00
2) Modify /u02 from 10 GB size to 5 GB size
3) Create /u01 (new fs) of size 10 GB

Thank you!

You can't really do that without deleting then recreating.

What I was suggesting you do is use what you already have, because the partition/filesystem sizes are what you want, but just on the wrong mountpoints.

I suggest you save a copy of your /etc/vfstab, umount the two, mkdir the mountpoints you want, then change your /etc/vfstab to put the appropriate filesystem on the correct mountpoint, then mount them.

But then How would I assign or allocate the size for new filesystems?

use the "format" utility...

I thought you already had 5Gig and 10Gig filesystems allocated for /u00 and /u01. Dismounting them and removing them from vfstab does not destroy the filesystems on the partitions.