Mon, 03 Apr 2006

Making a Solaris UFS filesystem on a file


I wanted to set up a temporary database for testing purposes, and the scripts I needed to use to create an Oracle database wanted to use a couple of filesystems exclusively. Well, I didn't have a couple of spare filesystems lying around so I set about creating them on a couple of files. It turns out to be a fairly simple process. Here's how it worked for one of the filesystems.

# mkfile 2000m /myspace/fs1

# lofiadm -a /myspace/fs1
/dev/lofi/1

# newfs /dev/lofi/1
newfs: construct a new file system /dev/rlofi/1: (y/n)? y
/dev/rlofi/1:   4095600 sectors in 6826 cylinders of 1 tracks, 600 sectors
        1999.8MB in 214 cyl groups (32 c/g, 9.38MB/g, 2368 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 19232, 38432, 57632, 76832, 96032, 115232, 134432, 153632, 172832, 192032,
 [ ... ]
 3993632, 4012832, 4032032, 4051232, 4070432, 4089632,

# mount /dev/lofi/1 /dbTST/fs1

# df -k /dbTST/fs1
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/lofi/1          1981012      11 1921571     1%    /dbTST/fs1

[/unix] permanent link




November 2022
Sun Mon Tue Wed Thu Fri Sat