Hello ,
I 've got a problem with the root partition on my SCO 5.0.5 .
When I check the disk with df or mount , I can 't see the root filesystem .
# mount
/stand on /dev/boot read only on Tue Sep 05 16:13:51 2006
/home on /dev/home read/write on Tue Sep 05 16:14:41 2006
But , if I try... (3 Replies)
How can I check which partition /usr are mounted on ? Usually this is mounted on root (/). If I want to move /usr to another partition, how do I do this ?
BR Ludwig (1 Reply)
Dear All
Anyone can help me what is the problem of swap partition? swap partition is showing mounted in df -h command output.
Regards
prakash (1 Reply)
First of all, let me state that I am a windows admin.
I have a windows share mounted to /mnt/server
I need a script that will either login as sudo or perform commands with sudo rights. I need the script to copy all of the users /home folders to the mounted windows share. Now If I can... (7 Replies)
Hi
I need to have a piece of code that check if all file systems are mounted or not.
I have to pieces of information like the output of the bdfcommand, and the file /etc/fstab.
The first is:
bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 266656... (3 Replies)
Hi
I have the following piece of code, running on a solaris 10 O.S., that is not working for NFS file systems:
for vol in `grep -E 'vxfs|ufs|nfs' /etc/vfstab | egrep -v '^#' | awk '{ print $3 }'`
do
if df -k $vol | grep $vol > /dev/null
then
outputOK "Filesystem: $vol mounted"
else... (1 Reply)
Discussion started by: fretagi
1 Replies
LEARN ABOUT ULTRIX
dkio
dkio(4) Kernel Interfaces Manual dkio(4)Name
dkio - disk interface
Syntax
#include <sys/fs.h>
#include <sys/ioctl.h>
Description
This section describes the ioctl (input/output controller) codes for all disk drivers. The basic ioctl (input/output controller) format
is:
#include <sys/fs.h>
#include <sys/ioctl.h>
ioctl(fildes, code, arg)
struct pt *arg;
The applicable codes are:
DIOCGETPT Indicates to the driver to store the information in the current partition table in the address pointed to by arg. The file
descriptor must be opened on the raw partitions, a or c.
DIOCGETPT does not change the partition table, but it does provide access to the partition table information.
DIOCSETPT Indicates to the driver to modify the current partition table with the information pointed to by arg.
The file descriptor must be opened on the raw partitions, a or c.
If the a or c partition is not mounted, only the partition table in the driver is modified. This temporarily modifies the
partition table of the disk. The modifications are overwritten with the default table when the disk is turned off and on.
If the a or c partition is mounted, both the partition table in the driver and the partition table in the primary
superblock are modified. This permanently modifies the partition table of the disk. This is not recommended. To change a
partition table permanently, use the command.
DIOCDGTPT Indicates to the driver to store the default information of the current partition table in the address pointed to by arg.
The file descriptor must be opened on the raw partitions a or c.
DIOCGETPT does not change the partition table, but it does provide access to the partition table information.
DKIOCGET Allows the user to receive generic disk information as defined in structdevget.
DKIOCACC This code is defined in It is currently unused.
Restrictions
These restrictions apply when using the DIOCSETPT ioctl code:
o You must have superuser privileges.
o You cannot shrink or change the offset of a partition with a file system mounted on it or with an open file descriptor on the entire
partition.
o You cannot change the offset of the a partition.
Examples
This example shows how to use the DIOGETPT ioctl code to print the length and offset of the a partition of an RZ23 disk:
#include <sys/types.h>
#include <sys/param.h>
#include <sys/fs.h>
#include <sys/ioctl.h>
main()
{
struct pt arg;
int fd, i;
/* Open the "a" partition of the disk you want to see */
if ( (fd = open("/dev/rz0a",0)) < 0 ) {
printf("Unable to open device
");
exit(2);
}
/* Get the partition information */
if ( ioctl(fd,DIOCGETPT,&arg) < 0 )
printf("Error in ioctl
");
printf("Length Offset
");
for ( i = 0; i <= 7; i++ ) {
printf("%d %d
",arg.pt_part[i].pi_nblocks,
arg.pt_part[i].pi_blkoff );
}
}
FilesSee Alsorz(4), disktab(5), fstab(5), chpt(8), diskpart(8), fsck(8), MAKEDEV(8), mkfs(8), tunefs(8)
RISC dkio(4)