This discussion is archived
5 Replies Latest reply: Feb 19, 2013 5:25 PM by 989910 RSS

format / newfs command hang after creating disk mirror

989910 Newbie
Currently Being Moderated
Hi :

We are using four 300G disks to create disk mirror. c1t0d0 and c1t1d0 are mirrored , and c1t2d0 and c1t3d0 are palned to set up mirror.

One sample for the 3rd disk (c1t2d0 ) partition layout :

Part Tag Flag Cylinders Size Blocks
0 usr wm 0 - 46850 279.25GB (46851/0/0) 585637500
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 - 46872 279.38GB (46873/0/0) 585912500
3 unassigned wu 0 0 (0/0/0) 0
4 unassigned wu 0 0 (0/0/0) 0
5 unassigned wu 0 0 (0/0/0) 0
6 unassigned wu 0 0 (0/0/0) 0
7 unassigned wm 46851 - 46872 134.28MB (22/0/0) 275000


After mirrored c1t0d0 and c1t1d0, we want to use format to see current disk partion , also newfs to setup filesystem on c1t2d0, but these two commands are failed.

Example : ( we have to use Ctrol+C to stop format because the command is hung )

format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
/pci@0/pci@0/pci@2/scsi@0/sd@0,0
1. c1t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
/pci@0/pci@0/pci@2/scsi@0/sd@1,0
2. c1t2d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
/pci@0/pci@0/pci@2/scsi@0/sd@2,0
3. c1t3d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
/pci@0/pci@0/pci@2/scsi@0/sd@3,0
Specify disk (enter its number): 2
selecting c1t2d0
[disk formatted]

^C

Could you give some clues ? Thanks !
  • 1. Re: format / newfs command hang after creating disk mirror
    989910 Newbie
    Currently Being Moderated
    Updated information :

    I use command " truss -o /tmp/out -d -D -E -fl newfs /dev/rdsk/c1t2d0s0 " to trace system call while newfs disk. The sample of output file is as following. Acturally , according to opensolaris mkfs source code, after mkfs read mnttab, it should invoke create64 to create device,

    4285/1:          8.7587     0.0004     0.0003     open("/etc/mnttab", O_RDONLY)               = 3
    4285/1:          8.7592     0.0005     0.0002     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7594     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7595     0.0001     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7597     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7599     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7601     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7603     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7605     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7606     0.0001     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7608     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7610     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7612     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7614     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7616     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7617     0.0001     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 0
    4285/1:          8.7619     0.0002     0.0000     ioctl(3, MNTIOC_GETMNTENT, 0xFFBFDF44)          = 1
    4285/1:          8.7621     0.0002     0.0000     llseek(3, 0, SEEK_CUR)                    = 0
    4285/1:          8.7623     0.0002     0.0000     close(3)                         = 0
    4285/1:          8.7625     0.0002     0.0000     uadmin(16, 4, 0)                    = 1
    4285/1:          8.7626     0.0001     0.0000     uadmin(16, 2, 161256)                    = 1

    Seems mkfs does not invoke such as "creat64("/dev/md/rdsk/d20", 0666)" to create device. Why ?
  • 2. Re: format / newfs command hang after creating disk mirror
    cindys Pro
    Currently Being Moderated
    I can't tell if the format hangs before or after the newfs or mkfs.

    If format is hanging when reviewing device info, then something is wrong from the device level.

    Another way to test this to create a ZFS storage pool on one of the devices that is hanging:

    # zpool create test c1t2d0

    That will tell us that something is wrong with the devices and not newfs or mkfs.

    Thanks, Cindy
  • 3. Re: format / newfs command hang after creating disk mirror
    989910 Newbie
    Currently Being Moderated
    Hi Cindy :

    Thanks your help. I have tried zpool command and device is ok. Same as what i mentioned in the first message, i have created disk mirror and format/newfs is slow. After searching forum , i found one thread ( newfs "hangs" for almost 30 minute delay! ) is similar to my problems. If network is down ( on my system, it is e1000g0), format/newfs will be very slow. But if network is up ( on my system, it will be fast ).

    So , my question is same as this thread, what's the relationship between network, metadb and format/newfs ?

    I did not enable NIS or mpxio.

    Thanks !
  • 4. Re: format / newfs command hang after creating disk mirror
    cindys Pro
    Currently Being Moderated
    Hi--

    I don't know SVM well enough to comment but I do know that there are meta* services
    in inetadm so maybe its SVM that needs network access. I do remember that in the
    previous /etc/inetd.conf there was a SVM-related service.

    I hope some more knowledgeable can comment.

    Thanks, Cindy
  • 5. Re: format / newfs command hang after creating disk mirror
    989910 Newbie
    Currently Being Moderated
    Hi :

    Thanks your valuable information. Network interface is disabled because of duplicated ip address.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points