Skip to content

Instantly share code, notes, and snippets.

@ss23
Created October 24, 2011 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ss23/1310475 to your computer and use it in GitHub Desktop.
Save ss23/1310475 to your computer and use it in GitHub Desktop.
Crisp ss23 # hdparm -r /dev/sdf2
/dev/sdf2:
readonly = 0 (off)
Crisp ss23 # btrfsck /dev/sdf2
found 2394718208 bytes used err is 0
total csum bytes: 1930568
total tree bytes: 417816576
total fs tree bytes: 398311424
btree space waste bytes: 113042195
file data blocks allocated: 1989308416
referenced 1971613696
Btrfs Btrfs v0.19
Crisp ss23 # mount -w /dev/sdf2 /mnt/new_root/
mount: block device /dev/sdf2 is write-protected but explicit `-w' flag given
Crisp ss23 # mount /dev/sdf2 /mnt/new_root/
mount: block device /dev/sdf2 is write-protected, mounting read-only
Crisp mnt # mount -t btrfs /dev/sdf2 /mnt/new_root -o remount,rw
mount: /mnt/new_root not mounted already, or bad option
Crisp mnt # umount /mnt/new_root/
umount: /mnt/new_root/: not mounted
Crisp mnt #
@ss23
Copy link
Author

ss23 commented Oct 24, 2011

device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
Btrfs detected SSD devices, enabling SSD mode
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
Btrfs detected SSD devices, enabling SSD mode
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
Btrfs detected SSD devices, enabling SSD mode
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
Btrfs detected SSD devices, enabling SSD mode
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
Btrfs detected SSD devices, enabling SSD mode
------------[ cut here ]------------
WARNING: at fs/btrfs/extent-tree.c:5693 btrfs_alloc_free_block+0x1e2/0x420()
Hardware name: H55M-USB3
Pid: 2116, comm: btrfsctl Not tainted 3.0.6-gentoo #5
Call Trace:
[] ? warn_slowpath_common+0x76/0xc0
[] ? btrfs_alloc_free_block+0x1e2/0x420
[] ? read_extent_buffer+0xcf/0x1b0
[] ? __btrfs_cow_block+0x154/0x600
[] ? btrfs_cow_block+0x10b/0x1f0
[] ? commit_cowonly_roots+0x65/0x1d0
[] ? btrfs_commit_transaction+0x406/0x810
[] ? join_transaction.clone.25+0x1c9/0x200
[] ? abort_exclusive_wait+0xb0/0xb0
[] ? btrfs_ioctl+0x5f8/0xe40
[] ? handle_mm_fault+0x113/0x330
[] ? do_page_fault+0x1a9/0x420
[] ? do_vfs_ioctl+0x96/0x540
[] ? sys_ioctl+0x49/0x80
[] ? system_call_fastpath+0x16/0x1b
---[ end trace 28b9d6fcffa207c6 ]---
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
Btrfs detected SSD devices, enabling SSD mode
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
device fsid 2a38248e-9ff7-4b3a-aec0-d8d4ced96834 devid 1 transid 1576 /dev/sdf2
Btrfs detected SSD devices, enabling SSD mode
Crisp mnt #

@jetpks
Copy link

jetpks commented Oct 24, 2011

Have you tried turning it off and then on again?

@ss23
Copy link
Author

ss23 commented Oct 24, 2011

Crisp ss23 # parted /dev/sdf
GNU Parted 3.0
Using /dev/sdf
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA OCZ-VERTEX2 (scsi)
Disk /dev/sdf: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 32.5MB 31.5MB ext2 bios_grub
2 32.5MB 60.0GB 60.0GB

(parted)

@jetpks
Copy link

jetpks commented Oct 24, 2011

Crisp ss23 # parted /dev/sdf
GNU Parted 3.0
Using /dev/sdf
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA OCZ-VERTEX2 (scsi)
Disk /dev/sdf: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End    Size    File system Name      Flags
1       1049kB 32.5MB 31.5MB  ext2        bios_grub
2       32.5MB 60.0GB 60.0GB

@ss23
Copy link
Author

ss23 commented Oct 24, 2011

Crisp ss23 # mount /dev/sdf1 /mnt/new_media/
Crisp ss23 # umount /dev/sdf1

To demonstrate that its partition specific, not drive specific

@ss23
Copy link
Author

ss23 commented Oct 24, 2011

Btrfs Btrfs v0.19

Version info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment