Tuesday, March 12, 2013

No such device or address while trying to determine filesystem size on SSD in Centos 5

[root@02 ~]# mkfs.ext4 /dev/sdb1
mke4fs 1.41.12 (17-May-2010)
mkfs.ext4: No such device or address while trying to determine filesystem size

All the usual stuff by playing around with df -h, mount , cat /proc/swaps, /etc/mtab , lsof did not yeild any results.

Checking out some forums suggested that it is related to low level raid stuff and can be found by help of dmsetup and dmraid.

List device name

[root@02 ~]# dmsetup ls
ddf1_4c5349202020202010000411100010044711471181ddbcc4 (253, 0)

Get some more information about the device

[root@02 ~]# dmsetup info ddf1_4c5349202020202010000411100010044711471181ddbcc4
Name: ddf1_4c5349202020202010000411100010044711471181ddbcc4
Read Ahead: 256
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 253, 0
Number of targets: 1
UUID: DMRAID-ddf1_4c5349202020202010000411100010044711471181ddbcc4

Discover all software raid devices in the system

[root@02 ~]# dmraid -r
/dev/sdb: ddf1, ".ddf1_disks", GROUP, ok, 123045888 sectors, data@ 0

Get the property of the raid disks

[root@02 ~]# dmraid -s
*** Group superset .ddf1_disks
--> Subset
name : ddf1_4c5349202020202010000411100010044711471181ddbcc4
size : 123045888
stride : 128
type : stripe
status : ok
subsets: 0
devs : 1
spares : 0

Tried to deactivate the raid device

[root@02 ~]# dmraid -an
ERROR: dos: partition address past end of RAID device
The dynamic shared library "libdmraid-events-ddf1.so" could not be loaded:
libdmraid-events-ddf1.so: cannot open shared object file: No such file or directory

Remove all raid devices metadata

[root@02 ~]# dmraid -r -E /dev/sdb
Do you really want to erase "ddf1" ondisk metadata on /dev/sdb ? [y/n] :y
ERROR: ddf1: seeking device "/dev/sdb" to 32779907366912
ERROR: writing metadata to /dev/sdb, offset 64023256576 sectors, size 0 bytes returned 0
ERROR: erasing ondisk metadata on /dev/sdb

Format the entire disk with zeros so that it does not get detected as raid device and cause further problem.

dd if=/dev/zero of=/dev/sdb


  1. AWS Training in Bangalore - Live Online & Classroom
    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.

    IOT Training in Bangalore - Live Online & Classroom
    IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.