Unable to create file system (newfs)

Hi

I have the following cenario:

I have requested a LUN from the NetApp to create a file system, and the netapp admin provide me with one as you can see below, but after following all the steps, I could not create a file system on the device:

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t5000C50039BE40B7d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
          /scsi_vhci/disk@g5000c50039be40b7
       1. c0t5000C50039D8324Fd0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>
          /scsi_vhci/disk@g5000c50039d8324f
       2. c5t500A09818DE3E799d0 <NETAPP-LUN-8020 cyl 6142 alt 2 hd 16 sec 640>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09818de3e799,0
       3. c5t500A09818DE3E799d1 <NETAPP-LUN-8020 cyl 61809 alt 2 hd 255 sec 252>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09818de3e799,1
       4. c5t500A09818DE3E799d2 <NETAPP-LUN-8020 cyl 61809 alt 2 hd 255 sec 252>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09818de3e799,2
       5. c5t500A09818DE3E799d3 <NETAPP-LUN-8020 cyl 6526 alt 2 hd 16 sec 5120>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09818de3e799,3
       6. c5t500A09818DE3E799d4 <NETAPP-LUN-8030 cyl 6489 alt 2 hd 16 sec 9088>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09818de3e799,4
       7. c5t500A09818DE3E799d5 <NETAPP-LUN-8030 cyl 6480 alt 2 hd 16 sec 10112>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09818de3e799,5
       8. c5t500A09819DE3E799d0 <NETAPP-LUN-8020 cyl 6142 alt 2 hd 16 sec 640>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09819de3e799,0
       9. c5t500A09819DE3E799d1 <NETAPP-LUN-8020 cyl 61809 alt 2 hd 255 sec 252>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09819de3e799,1
      10. c5t500A09819DE3E799d2 <NETAPP-LUN-8020 cyl 61809 alt 2 hd 255 sec 252>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09819de3e799,2
      11. c5t500A09819DE3E799d3 <NETAPP-LUN-8020 cyl 6526 alt 2 hd 16 sec 5120>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09819de3e799,3
      12. c5t500A09819DE3E799d4 <NETAPP-LUN-8030 cyl 6489 alt 2 hd 16 sec 9088>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09819de3e799,4
      13. c6t500A09828DE3E799d0 <NETAPP-LUN-8020 cyl 6142 alt 2 hd 16 sec 640>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0/ssd@w500a09828de3e799,0
      14. c6t500A09828DE3E799d1 <NETAPP-LUN-8020 cyl 61809 alt 2 hd 255 sec 252>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0/ssd@w500a09828de3e799,1
      15. c6t500A09828DE3E799d2 <NETAPP-LUN-8020 cyl 61809 alt 2 hd 255 sec 252>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0/ssd@w500a09828de3e799,2
      16. c6t500A09828DE3E799d3 <NETAPP-LUN-8020 cyl 6526 alt 2 hd 16 sec 5120>
          /pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0/ssd@w500a09828de3e799,3

Specify disk (enter its number): 7
selecting c5t500A09818DE3E799d5
[disk formatted]


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
        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
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> partition


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

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0               0         (0/0/0)             0
  1       swap    wu       0               0         (0/0/0)             0
  2     backup    wu       0 - 6479      499.92GB    (6480/0/0) 1048412160
  3 unassigned    wm       0               0         (0/0/0)             0
  4 unassigned    wm       0               0         (0/0/0)             0
  5 unassigned    wm       0               0         (0/0/0)             0
  6        usr    wm       0 - 6479      499.92GB    (6480/0/0) 1048412160
  7 unassigned    wm       0               0         (0/0/0)             0

partition> 6
Part      Tag    Flag     Cylinders        Size            Blocks
  6        usr    wm       0 - 6479      499.92GB    (6480/0/0) 1048412160

Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 0
Enter partition size[1048412160b, 6480c, 6479e, 511920.00mb, 499.92gb]: 499.92gb
partition> label
Ready to label disk, continue? yes

partition> quit


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
        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
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> quit
# newfs /dev/rdsk/c5t500A09818DE3E799d5s6
newfs: /dev/rdsk/c5t500A09818DE3E799d5s6: No such file or directory
# newfs /dev/rdsk/c5t500A09818DE3E799d5s6
newfs: /dev/rdsk/c5t500A09818DE3E799d5s6: No such file or directory

So I went into /dev/rdsk directory, and did an ls -lrt and could not find the selected lun:

bash-3.00# cd /dev/rdsk
You have new mail in /var/mail//root
bash-3.00# ls c5t500A09818DE3E799d5
c5t500A09818DE3E799d5: No such file or directory
bash-3.00# ls -lrt c5t500A09818DE3E799d5s6
c5t500A09818DE3E799d5s6: No such file or directory
bash-3.00#

Please can you help, what could have gone wrong?

Try to run :

devfsadm

Then check if the device file exists.

Take a look at the system logs (/var/adm/messages) for hints if devices are created.
Are you using multipath of some kind ?

Hi

thanks for the reply, the output of devfsadm is:

# devfsadm
devfsadm: line 80: configuration file /etc/devlink.tab has a missing tab -- ignoring
devfsadm: inst_sync failed for /etc/path_to_inst.58886: No space left on device
devfsadm: WARNING: failed to update /etc/path_to_inst
#

in the logs I can see the following:

bash-3.00# tail messages
Aug 10 10:45:13 nikira-db last message repeated 2 times
Aug 10 10:45:14 nikira-db usba: [ID 691482 kern.warning] WARNING: /pci@400/pci@1/pci@0/pci@7/pci@0/usb@0,1 (ohci1): Connecting device on port 2 failed
Aug 10 10:45:14 nikira-db ldc: [ID 717221 kern.warning] WARNING: ldc_open: (0x5) channel rx queue unconf failed
Aug 10 10:45:17 nikira-db last message repeated 3 times
Aug 10 10:45:17 nikira-db usba: [ID 691482 kern.warning] WARNING: /pci@400/pci@1/pci@0/pci@7/pci@0/usb@0,1 (ohci1): Connecting device on port 2 failed
Aug 10 10:45:18 nikira-db ldc: [ID 717221 kern.warning] WARNING: ldc_open: (0x5) channel rx queue unconf failed
Aug 10 10:45:21 nikira-db last message repeated 3 times
Aug 10 10:45:21 nikira-db usba: [ID 691482 kern.warning] WARNING: /pci@400/pci@1/pci@0/pci@7/pci@0/usb@0,1 (ohci1): Connecting device on port 2 failed
Aug 10 10:45:21 nikira-db ufs: [ID 845546 kern.notice] NOTICE: alloc: /: file system full
Aug 10 10:45:22 nikira-db ldc: [ID 717221 kern.warning] WARNING: ldc_open: (0x5) channel rx queue unconf failed
bash-3.00#

the entry related to file system is because of :

bash-3.00# df -h /
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10        9.8G   9.8G     0K   100%    /
bash-3.00#

Assuming that you have a standard Solaris install, try adding these switches to devfsadm:

 
 # devfsadm -r / -p /etc/path_to_inst
 

then, as Peasant says, see if the device in /dev/rdsk is created.

1 Like

it looks like its there now:

bash-3.00# devfsadm -r / -p /etc/path_to_inst
devfsadm: line 80: configuration file /etc/devlink.tab has a missing tab -- ignoring
bash-3.00# cd /dev/rdsk
bash-3.00# ls -lrt c5t500A09818DE3E799d5s6
lrwxrwxrwx   1 root     root          99 Aug 10 10:44 c5t500A09818DE3E799d5s6 -> ../../devices/pci@400/pci@1/pci@0/pci@4/pci@0/pci@2/SUNW,qlc@0/fp@0,0/ssd@w500a09818de3e799,5:g,raw
bash-3.00#

Shall I create a file system now? Will I be able to newfs now?

Go for it! Post any error that you get.

You might want to clean up the root filesystem.

Being on 100% on / will lead to these (and worst) kind of problems.

Also, if you are using slices, consider starting from sector 1 instead of 0.
Dunno if UFS will honor that, but if you overwrite the first sector you will be in trouble.

Regards.
Peasant.

Hi

I have just managed to cleanup the root file system:

bash-3.00# df -h /
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10        9.8G   7.6G   2.2G    78%    /
bash-3.00#

I am bit scared to create a new file system... on that LUN, and the reason to create a file system was actually to release some space from the root file system

Those are metadevices.

You might want to run metastat to identify disks belonging to your metadevice.
It is probably a mirror or alike which consist of 2 or more local disks on that machine... from format output 2 x 300 GB drives.

Then read up about Solaris SVM and expand it.

I don't think you need a netapp lun for that, but i cannot know why you need it.

Hope that helps
Regards
Peasant.

Hi

I am not familiar with metastat , but the output of it is:

bash-3.00# metastat
d60: Mirror
    Submirror 0: d61
      State: Okay
    Submirror 1: d62
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 239087500 blocks (114 GB)

d61: Submirror of d60
    State: Okay
    Size: 239087500 blocks (114 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039BE40B7d0s6          0     No            Okay   Yes


d62: Submirror of d60
    State: Okay
    Size: 239087500 blocks (114 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039D8324Fd0s6          0     No            Okay   Yes


d50: Mirror
    Submirror 0: d51
      State: Okay
    Submirror 1: d52
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 20975000 blocks (10 GB)

d51: Submirror of d50
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039BE40B7d0s5          0     No            Okay   Yes


d52: Submirror of d50
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039D8324Fd0s5          0     No            Okay   Yes


d40: Mirror
    Submirror 0: d41
      State: Okay
    Submirror 1: d42
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 20975000 blocks (10 GB)

d41: Submirror of d40
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039BE40B7d0s4          0     No            Okay   Yes


d42: Submirror of d40
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039D8324Fd0s4          0     No            Okay   Yes


d30: Mirror
    Submirror 0: d31
      State: Okay
    Submirror 1: d32
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 200775000 blocks (95 GB)

d31: Submirror of d30
    State: Okay
    Size: 200775000 blocks (95 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039BE40B7d0s3          0     No            Okay   Yes


d32: Submirror of d30
    State: Okay
    Size: 200775000 blocks (95 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039D8324Fd0s3          0     No            Okay   Yes


d20: Mirror
    Submirror 0: d21
      State: Okay
    Submirror 1: d22
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 20975000 blocks (10 GB)

d21: Submirror of d20
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039BE40B7d0s1          0     No            Okay   Yes


d22: Submirror of d20
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039D8324Fd0s1          0     No            Okay   Yes


d10: Mirror
    Submirror 0: d11
      State: Okay
    Submirror 1: d12
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 20975000 blocks (10 GB)

d11: Submirror of d10
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039BE40B7d0s0          0     No            Okay   Yes


d12: Submirror of d10
    State: Okay
    Size: 20975000 blocks (10 GB)
    Stripe 0:
        Device                             Start Block  Dbase        State Reloc Hot Spare
        /dev/dsk/c0t5000C50039D8324Fd0s0          0     No            Okay   Yes


Device Relocation Information:
Device                           Reloc  Device ID
/dev/dsk/c0t5000C50039D8324Fd0   Yes    id1,sd@n5000c50039d8324f
/dev/dsk/c0t5000C50039BE40B7d0   Yes    id1,sd@n5000c50039be40b7
bash-3.00#

Right now, I am doing a backup of entire / , before I launch newfs on it

I have no idea what you are trying to do.

newfs will create filesystem on the new netapp lun noted in the previous posts.
With that you can mount and use it as UFS filesystem, mounted on the location you desire.
Partition any slice but slice 2 starting from 1 sector to last and create filesystem on /dev/rdsk/ctdsX where X is the slice created via format tool and disk labeled.

Above operation has nothing to do with / filesystem.

If you wish to expand the / filesystem you will need to learn the Solaris SVM.
It is different then other volume managers, but one of the most flexible one.

Output required from following commands (and possibly others, my SVM is a bit rusty since zfs is mostly used nowdays... ) might illuminate if you require operations on root filesystem(s) :

mount
cat /etc/vfstab

Also note the documentation here :
SPARC: Setting Up Disks for UFS File Systems (Task Map) - System Administration Guide: Devices and File Systems

Practice on some test enviroment with FC lun you know it is not used (formating, creating slices, filesystems, metadevices etc.) before issuing commands on production systems.

1 Like

file system created, thank you all