Technorama

An omnibus of tech posts by a Futurologist on software development primarily.

Saturday, 8 January 2011

 

sda is apparently in use by the system; it's not safe to run badblocks!

root@ubuntu:~# badblocks -b 4096 -c 512 -s -v -w /dev/sda
/dev/sda is apparently in use by the system; it's not safe to run badblocks!

Checking the output of "mount" I see none of the partitions are mounted. However, using the command "swapon -s" I see the swap partition was in use:

root@ubuntu:~# swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 12285948 0 -1

root@ubuntu:~# swapoff /dev/sda5
root@ubuntu:~# badblocks -b 4096 -c 512 -s -v -w /dev/sda
Checking for bad blocks in read-write mode
From block 0 to 122096645
Testing with pattern 0xaa: 0.32% done, 0:20 elapsed
2.97% done, 3:11 elapsed


Previous log
=======

root@ubuntu:/# mount
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=
0620)
/dev/sdb1 on /cdrom type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon
(rw,nosuid,nodev,user=ubuntu)
root@ubuntu:/# badblocks -b 4096 -c 512 -s -v -w /dev/sda
/dev/sda is apparently in use by the system; it's not safe to run badblocks!

Labels: ,


Comments:
This just happened to me, today, playing with Natty Narwhal.

FOR OTHERS--
What I had to do, was exit the Rescue Mode shell, and "Go Back" to the main menu, where, at the bottom, was a different "Execute a Shell" command.

This shell did not have the /dev/sda mounted, and I was able to run badblocks (with the -n switch).
 
Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

February 2003   March 2003   April 2003   August 2004   September 2004   December 2004   May 2005   June 2005   December 2006   January 2007   February 2007   March 2007   April 2007   July 2007   August 2007   September 2007   October 2007   November 2007   December 2007   January 2008   February 2008   March 2008   April 2008   May 2008   June 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009   February 2009   March 2009   April 2009   September 2009   November 2009   December 2009   January 2010   April 2010   September 2010   October 2010   November 2010   December 2010   January 2011   February 2011   March 2011   April 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   March 2012   April 2012   May 2012   June 2012   July 2012   October 2012   December 2012   March 2013   May 2013   August 2013   September 2013   October 2013   November 2013   March 2014   May 2014   June 2014   July 2014   September 2014   October 2014   December 2014   January 2015   February 2015   March 2015   April 2015   May 2015   June 2015   July 2015   August 2015   September 2015   October 2015   November 2015   December 2015   March 2016   April 2016   May 2016   July 2016   August 2016   September 2016   October 2016   November 2016   December 2016   January 2017   February 2017   March 2017   April 2017   May 2017   June 2017   July 2017   August 2017   September 2017   November 2017   March 2018   April 2018   May 2018   June 2018   August 2018   October 2018   December 2018   January 2019   March 2019   May 2019   August 2019   September 2019   March 2020   April 2020   May 2020   September 2020   October 2020   February 2022   June 2022   July 2022   October 2022   December 2022   February 2023   April 2023   September 2023   October 2023   May 2024   June 2024   July 2024  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]