How to discard unused space on an SSD?

Dear forum,
I have bought an ssd several days ago and I've wiped the whole drive to prepare for system encryption.
I now realized that it may not be really good to keep that random data on the ssd due to performance reasons. So now I would like to discard all unsed space except the space used by my partitions.
How could I easily accomplish this?
I have tried with hdparm and the trim option, but I do not think that worked quite well.
I am uncertain what values to use for the initial sector and sector count. I'd be very happy if someone could explain me how to use this properly or even show me another way to accomplish this in case there is one.
-szt

If the unused space on the SSD is continuous, the easiest & safest is probably to create a partition in the unused space and then wipe it with /dev/zero again (man shred).
Using tune2fs on it should do it also (once the 'unused' partition is setup), but then you have to mount it with the discard option also. With a partition setup temporarily for it, you get away without getting hdparm parameters correct.

Similar Messages

  • Where did 30GB of unused space on my SSD main drive go?  I have a mid 2011 iMac that until yesterday had just 54GB of space occupied on the primary drive.  I imported 45 minutes of video from an SD card.  Could that have used up the space?

    Where did 30GB of unused space on my SSD main drive go?  I have a mid 2011 iMac that until yesterday had just 54GB of space occupied on the primary drive.  I imported 45 minutes of video from an SD card.  Could that have used up the space?

    I added an SSD to my 27" 2011 iMac.  Although Sahidus is absolutely correct, it is much easier to add an SSD replacing the optical drive, it wasn't that bad to add it using an entirely seperate cable using SATA-III.  To me it is worth the extra hassle to install a SATA-III SSD.  This is where you are going to get maximum performance.
    Although it appears complicated, if you go slow, the procedure to install an SSD drive isn't too bad.  It takes at most 3 hours, as long as you are prepared and have all the parts and tools.
    http://www.btobey.com/learn/imac-ssd-install.php
    This describes how I did it.  Now I get awesome data performance from my iMac!
    I think the 21.5" may be more difficult to find where to place the SSD.  But im sure it is possible.  Just be creative.

  • How to access unused space on a harddisk ? crypt this without part.

    Hello,
    i try to use unused space on a harddisk without a device-file.
    My harddisk:
    /dev/sda1    /boot
    /dev/sda2   SWAP
    /dev/sda5   /
    and the free/unused space after this partitions i like to use for cryptsetup luksFomat
    but i dont know how to access this.
    i dont like create a partition (like /dev/sda6) to hide the crypt space, i think a unused partition is treasonously.
    i can crypt /dev/sda an create LVM on sda, but then the harddisk looks like empty thats treasonously too.
    thanks

    Wow, you must live in a tough place.
    One might get a microSD card and plug it into your card reader when you need it, hiding it otherwise. These are very tiny cards and easy to hide.
    Truecrypt.org might have some ideas for you. But if you are arrested and trying to prove you have nothing "subversive" on your computer, you are already in a very bad situation no matter how good the technical means you have to hide things on your disk and anyway having truecrypt on your computer is incriminating. Can torture be ruled out? It can't even in the US any more (look up the phrase "extraordinary rendition"). It may be better to take Solzhenitsyn's advice:
    "And how we burned in the camps later, thinking: What would things have been like if every Security operative, when he went out at night to make an arrest, had been uncertain whether he would return alive and had to say good-bye to his family? Or if, during periods of mass arrests, as for example in Leningrad, when they arrested a quarter of the entire city, people had not simply sat there in their lairs, paling with terror at every bang of the downstairs door and at every step on the staircase, but had understood they had nothing left to lose and had boldly set up in the downstairs hall an ambush of half a dozen people with axes, hammers, pokers, or whatever else was at hand? . . ."
    Last edited by PaulBx1 (2011-09-27 16:13:49)

  • How to get unused space in SQL SERVER in OS level

    Hi ,
    We have ECC 6.0 system on Windows 2003 and SQL SERVER 2005 database. There were hugh number of spools request deleted by us.
    Now DB02 is showing this :
    Number of files                     5
    Total Size [MB]               402,900
    Allocated [MB]                302,727
    Free [MB]                     100,173
    We want 100GB free space in OS level that is inside the SQL server .The affected table was TST03 .
    Is there any procedure / document to recover this space in OS level ?
    Thanks
    Mukul

    Hi dudes!
    I agree with Mushtaq_M that you can shrink your files, and also that this is not recommended; some DBAs become very nervous if they see some tens of Gb allocated by the database but free and which space cannot be returned to the file system.
    Of course, you can shrink your database files. It is explained in note *363018* (points D and E). In fact, under certain circumstances it could be necessary to shrink your transaction log, as per note *625546* and note *421644*.
    However, regarding your particular question, I would say that it could have a 'bad' effect: you would waste your resources or even hinder the performance during the time it takes the database shrinking and you wouldn't get a performance improvement in return. In fact, sooner or later your database will probably grow up to its current size or even more. Even more, as a rule of a thumb, it is recommended that each datafile has at least around 10-15% of free space.
    At last, let me point out that you should not rely on SQL Server's "autogrow" function: this is recommended just to prevent the emergency situation that the database stops working because there is no free space left at all, but you are recommended to monitor and manually increase the datafiles whenever necessary.
    You can also refer to the SAP Help Portal for further help on the +MS SQL Server DB administration in CCMS+ as well as on the +Database Management Tools+. You should always check the +Microsoft SQL Server 2005 *Books Online (BOL)*+
    Cheers!!
    -Jesú

  • How do I fill the unused space?

    Hi there,
                I have an issue whereby I can not get the screen to use the unused space on the side of my presenter area.
    I have a big gray empty section on the right hand side and this makes my charts too small in the middle.
    Can any one tell me how to use the entire space available?
    I have tried to resize the screen resolution , tried using presenter area only tried clicking and dragging it wider but cant seem to get it to fill the gray area on the right hand side.
    I have attached a chart to show you what I mean.
    Thanx

    Hi there,
                Thanx for the answer...the problem is my members do see this area...that screen shot was sent to me from a member.
    They all can see that gray area which is why I am trying to fix it.
    I am a complete newbie to this software and so am still trying to make head or tail of the multitudious manuals and tutorials...
    would it be possible for you to post a step for step how to maximize the area seen by the members? I have attached a chart here sent to me from the same member of another connect pro room that uses all the space, have a look at their space usage...its fills the box and their off stage area on the right is very much smaller than mine.
    thanx

  • How do I reclaim the unused space after a huge data delete- very urgent

    Hello all,
    How do I reclaim the unused space after a huge data delete?
    alter table "ODB"."BLOB_TABLE" shrink space; This couldn't execute with ora 10662 error. Could you please help

    'Shrink space' has requirements:
    shrink_clause
    The shrink clause lets you manually shrink space in a table, index-organized table or its overflow segment, index, partition, subpartition, LOB segment, materialized view, or materialized view log. This clause is valid only for segments in tablespaces with automatic segment management. By default, Oracle Database compacts the segment, adjusts the high water mark, and releases the recuperated space immediately.
    Compacting the segment requires row movement. Therefore, you must enable row movement for the object you want to shrink before specifying this clause. Further, if your application has any rowid-based triggers, you should disable them before issuing this clause.
    Werner

  • How to reduce unused/available space in database file

    our database is partitioned on monthly basis and i am seeing large amount (nearly 50-70%) of space available in the data files. These files are not expected to grow(in large amount) in future. So i want to remove the unused space. What is the reason for
    that large amount of unused space and how to eliminate it? I tried shrinking the file which decresed the unused space to decent size but that resulted in fragmentation. To avoid fragmentation I rebuilded the indexes which again brought the unused space to
    the original size.
    Is there any way to find which table (which field ) is causing this.
    thanks in advance,

    hi Kalen,
      I am using sql server 2008 . I ran the following query [borrowed from other online sources]to get used,unused space for the files.
    --================query======================
    select
    [FileSizeMB]
    =
    convert(numeric(10,2),sum(round(a.size/128.,2))),
    [UsedSpaceMB]
    =
    convert(numeric(10,2),sum(round(fileproperty(
    a.name,'SpaceUsed')/128.,2)))
    [UnusedSpaceMB]
    =
    convert(numeric(10,2),sum(round((a.size-fileproperty(
    a.name,'SpaceUsed'))/128.,2)))
    [Type]
    =
    case
    when a.groupid
    is
    null
    then
    when a.groupid
    = 0
    then
    'Log'
    else
    'Data'
    end,
    [DBFileName]
    =
    isnull(a.name,'***
    Total for all files ***')
    from
    sysfiles a
    group
    by
    groupid,a.name
    with
    rollup having
    a.groupid
    is
    null
    or
    a.name
    is
    not
    null
    order
    by
    case
    when a.groupid
    is
    null
    then 99
    when a.groupid
    = 0
    then 0
    else 1
    end,
    a
    .groupid,
    case
    when a.name
    is
    null
    then 99
    else 0
    end,
    a
    .name
    --===========end of the query======================
    When I ran the query sugested by you, i observed that there is no much difference[less than 10] between row_reserved and row_used value and all the reamining columns are 0.
    Any suggestion is appreciated
    thanks,
    mp

  • How to delete unused audio files in a project?

    Hi guys,
    The question is fairly simple:
    How to delete unused audio files in a project?
    I can't manage to find the answer in the manual,... all I could find is how to delete audio outside used regions!
    But in the projects I use, I have loads of outtakes which I don't use in the project anymore, and now, I would like to delete them of the audio folder to save space on the HD.
    Can Logic select automatically the takes in the audio files folder which are not used in the project and delete them??
    Because there is hundreds of audio files per project, and +/- 50 projects, I just can't do it manually.
    Thanks,
    Fred

    Whoops! Yes, I knew that but a cow flew by... Sorry!
    The procedure I follow is to do what I described then Save as Project, creating a project folder. That way only the required audio is saved to the folder and I delete all temporary stuff. However, if you have folders with shared material, it's much harder and would require you to go through all your projects doing Save as Project before you could delete your old working folder.
    When doing day to day work, best practice is to create a new folder and only use Save as Project when you're working on stuff. Shared material (eg sample libraries etc) can go elsewhere and you can get Logic to copy those to the project folder automatically.
    Otherwise, Shift-Backspace in the Audio window, as you rightly say
    Pete

  • Add button to unused space in JTableHeader

    I have modified my JTable so that I can have multiple rows of column headers. I did this by extending BasicTableHeaderUI. In my particular instance, the first column of the table will never have more than one row in the header (unlike other implementations of multi-row headers I have seen, my column headers don't automatically fill upwards to take up all usable space in the header). So, I have "unused" space in the header above the first column.
    I would like to put some buttons there that are relevant to the table, but so far every effort to do so has failed.
    In the SSCCE below I have created a very stripped down version of my TableHeaderUI. It doesn't contain any of the code to create multiple row headers, it just pushes down the standard column headers to create some space. I try adding a button to the rendererPane, but it doesn't show up. There is a commented out line that paints the button which does work in terms of showing the button, but that's probably not the right way to do this (and the button doesn't work anyway).
    So, why isn't the button showing up? Am I doing this the right way (i.e. adding the button within the UI)? Thanks in advance for you help.
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Enumeration;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.plaf.basic.BasicTableHeaderUI;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumn;
    import javax.swing.table.TableColumnModel;
    public class HeaderButtonTable extends JPanel {
         public HeaderButtonTable() {
              String[] colNames = {"column 1", "column2", "column3"};
              Object[][] data = {{"a","b","c"},{"d","e","f"}};
              JTable table = new JTable(data, colNames);
              table.setPreferredScrollableViewportSize(new Dimension(400,100));
              table.setFillsViewportHeight(true);
              table.getTableHeader().setUI(new ButtonHeaderUI());
              JScrollPane scrollPane = new JScrollPane(table);
              add(scrollPane);
         public class ButtonHeaderUI extends BasicTableHeaderUI {
              public void paint(Graphics g, JComponent c) {
                   Rectangle clip = g.getClipBounds();
                   Point left = clip.getLocation();
                   Point right = new Point( clip.x + clip.width - 1, clip.y );
                   TableColumnModel cm = header.getColumnModel();
                   int cMin = header.columnAtPoint(left);
                   int cMax = header.columnAtPoint(right);
                   if (cMin == -1) cMin =  0;
                   if (cMax == -1) cMax = cm.getColumnCount()-1;
                   TableColumn draggedColumn = header.getDraggedColumn();
                   int columnWidth;
                   Rectangle cellRect = header.getHeaderRect(cMin);
                   TableColumn aColumn;
                   for(int column = cMin; column <= cMax ; column++) {
                        aColumn = cm.getColumn(column);
                        columnWidth = aColumn.getWidth();
                        cellRect.width = columnWidth;
                        if (aColumn != draggedColumn) {
                             paintCell(g, cellRect, column);
                        cellRect.x += columnWidth;
                  JButton test = new JButton("test");
                  test.addActionListener(new ActionListener(){
                        public void actionPerformed(ActionEvent e) {
                             System.out.println("pressed");
                  test.setBounds(2, 2, 60, 15);
                  rendererPane.add(test);  //why isn't this showing up?
                  //this line will display the button, but button doesn't work
    //          rendererPane.paintComponent(g, test, header, 2, 2, 60, 15);
              private Component getHeaderRenderer(int columnIndex) {
                   TableColumn aColumn = header.getColumnModel().getColumn(columnIndex);
                   TableCellRenderer renderer = aColumn.getHeaderRenderer();
                   if (renderer == null) renderer = header.getDefaultRenderer();
                   return renderer.getTableCellRendererComponent(header.getTable(),
                        aColumn.getHeaderValue(), false, false, -1, columnIndex);
              private void paintCell(Graphics g, Rectangle cellRect, int columnIndex) {
                   Component component = getHeaderRenderer(columnIndex);
                   rendererPane.paintComponent(g, component, header,
                        cellRect.x, cellRect.y + 30, cellRect.width,
                        cellRect.height - 30, true);
              public Dimension getPreferredSize(JComponent c) {
                   long width = 0;
                   Enumeration enumeration = header.getColumnModel().getColumns();
                   while (enumeration.hasMoreElements()) {
                        TableColumn aColumn = (TableColumn)enumeration.nextElement();
                        width = width + aColumn.getPreferredWidth();
                   return new Dimension((int)width, 60);
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.add(new HeaderButtonTable());
              frame.pack();
              frame.setVisible(true);
    }

    Yes, I've seen similar links/posts about how to activate buttons in the header of a table, but those do it by adding listeners to the renderer. My buttons would be directly in the CellRendererPane that is the container for the table header. I would have thought that by putting the button directly in the Cell RendererPane that it would have nothing to do with the rest of the table header. CellRendererPane extends Container. Is it not possible to put a JButton in a Container? JFrame extends indirectly from Container and you can add buttons to that.
    Edited by: Bob.B on Oct 28, 2009 10:57 PM

  • HOW TO Delete Unused Media from FINAL CUT PRO

    *HOW TO DELETE UNUSED MEDIA FROM HARD DRIVE IN FINAL CUT PRO.* Keywords: disk disc drive space remove compressor
    SUMMARY:
    Say your original clip is 10 gigs, you can use only what you need and delete the rest from your hard drive. I know people on the forums say to just buy another hard drive, NO! It took 2 days to figure out but here it is!!! Email me if needed at [email protected]
    QUESTION:
    I captured 1 hour of video at a time and now want to delete from my hard drive all the parts I don’t want to use. I have 300GB of junk on my hard drive and I only want to use a few scenes using a few megabytes, so that I'll get most of my 300GB back!!!!
    ANSWER:
    In final cut on Mac, click on one small clip (to get familiar with process), go to “file”, “export”, then “using compressor”. This will open compressor software. Your file will open in the left top window. Then you need to batch the job or jobs. IMPORTANT: I’ve also solved the Compressor problem when you press “submit” to a batch and it states “Cluster: None”. Search forum for “In compressor you experience what I have”.
    <Edited by Moderator>

    Part of the problem could lie in the fact it's an imovie project coming into FCP, wouldn't rule that out. Second my be the terms you use and what you expect to happen. For example, a subclip is just a smaller clip subbed from a larger clip. It has nothing to do with media management. But you can media manage a subclip and delete the unused media.
    Try this (be sure to back up the original clip first). take a long clip into the viewer, make an IN and OUT duration of like 30 frames and then subclip that, Modify > Make Subclip. a new subclip will appear in the browser with a torn clip icon and the name Subclip. Right click on the subclip and choose Media Manager.... Check the Delete unused media from duplicated clip. As you toggle that the green Modified bar at the top change from the full clip size to a tiny modified size. If it does not then one of two things ... user error or the system is screwed up. That's the easiest way to test media manager.

  • How to discard blocks from memory ?

    Hi,
    How to discard blocks from memory ?
    Thank you.

    To add to what has already been posted. The full Oracle version should be included on all posts since many features and most bugs are version dependend.
    Oracle will flush dirty blocks from the buffer cache and overlay unchanged blocks as needed to fit new requests to the buffer cache. It also reuses space in the shared pool so the question of which blocks you want to flush from memory and why can be important to getting the most appropriate answer to your questions.
    On a production instance it should be unnecessary to manually flush either the buffer cache or shared pool as a normal part of opertations.
    HTH -- Mark D Powell --

  • Remove unused space

    I have 10 schema in a tablespace. I have drop 6 schema but my datafile size is not decrease.I want to remove unused space from datafile.How is it possible?
    Thanks

    select max(block_id)+bytes
    from dba_extents
    where tablespace_name = '<affected tablespace>'
    Sybrand Bakker
    Senior Oracle DBA

  • How many free disk space after install OS X lion (10.7) ?

    Hi,
    I would like to know that how many free disk space after install OS X lion (10.7) on MBA i5.
    Many Thanks,
    Eric

    I want to buy MBA i5, I would like to free disk space of MBA 13" i5, Could anyone tell it to me? Thanks
    As you're buing a new MacBook Air, it will come pre-installed with Lion.  The actual installation will be somewhat larger than a "clean" Lion install as it will come with iLife preinstalled.  Obviously, with an Air's limited storage space, you want to be sure that you have enough room for any applications and data that you'll want to keep on the SSD as well.  It is fairly easy to upgrade the SSD on an Air:
    http://eshop.macsales.com/shop/SSD/OWC/Aura_Pro_Express
    The amount of RAM you have installed is probably more important.  Fortunately, the newest 13" MacBook Airs all come with 4GB standard now.

  • Snapshot log and unused space

    I have a snapshot log that is big in size, yet empty. How can i shrink the shapshot log smaller ? Looking for the comparable command for a snapshot that we use for a table - by truncating the table. How do we do it in the snapshot/materialized view world ? I don't want to drop and recreate the snapshot log either.......at least not, if i can help it.
    Using Oracle 9.2 here on unix platform.

    Question: Do you understand why the table, without an index, has 32KB assigned and 4KB used?
    Answer: ASE will allocate an extent (8x 4KB pages = 32KB) when the table is created, and then assign (ie, 'use') one of those pages for immediate use by the table
    Question: What happens when an index is created?
    Answer: ASE will also allocate an extent (8x 4KB pages = 32KB) when the index is created, and then assign (ie, 'use') one of those pages for immediate use by the index
    If you run 'sp_spaceused tmp,1' you'll get a detailed breakdown of allocated/used/unused space for each index.
    NOTE: If you're running ASE 15.7 ESD#2 (or higher), the 'create table' command has a 'deferred_allocation' option that delays the allocation of an extent (for the table and each index) until the first row is inserted.

  • Recmail unused space from Tablespace 11g  (Permenant TS / Temp / UNDO)

    Hi,
    I found many different ways to reclaim unused space however I wonder if there is a good path to do the same.
    For undo .. I know the we have to recreate the TS.
    For Temp is recreation is the only resort or there is another valid way?
    Also let me know the best way for doing this in normal Tablespace.
    Cheers.

    I found many different ways to reclaim unused space however I wonder if there is a good path to do the same.
    For undo .. I know the we have to recreate the TS.
    For Temp is recreation is the only resort or there is another valid way?
    Also let me know the best way for doing this in normal Tablespace.Temporary tablespace is temporary, It is not reserved by any object. When in case of sorting temp will be used.
    you need to analyze what is the threshold it is reaching on average daily? If it is really that much big size of files you don't need, then you can decrease.
    How to Shrink the datafile of Temporary Tablespace [ID 273276.1]
    How To Shrink A Temporary Tablespace in 11G ? [ID 452697.1]

Maybe you are looking for

  • Restart and shut down problems on MBA

    Hi Community, I have the OS X Lion 10.7.3 Software on my MBA, since I bought it last year in the summer, so maybe my case is a warranty issue! I normally put my MBA to sleep, but sometimes try to shut it down, it worked just fine before, but since a

  • Iso 7 update has lost my notes

    i have recently updated my iphone 4s to the iso 7 and have lost my notes ....how do i get this back pls help...

  • How to close port 32773 in solaris 9

    Hi Need your kindly assistance to close port on solaris 9. Have done the rpcinof -p but can't found the port 32773 showing.According to my research, 32773 port is for rpc services. root@mcisdev # rpcinfo -p program vers proto port service 100000 4 tc

  • Error in parsing value for 'clip'. Declaration dropped

    I have a site working for years, www.atlantida-adm.com.br, with the new version a javascript box with scroll doesn't work. It still working on IE, but my customers are asking me why stop work on Firefox. I use Firefox 15.0.1 as my default browser and

  • Unhappy T-61 CTO owner

    I thought I would let you know that my boss has a XPS M1330 with a internal video chip issue that is the same as the problems we are experiencing with our SBB NVIDIA QUADRO NVS 140M. He emailed Dell and this is how they responded: "Thank you for cont